Skip to content

JS-based basic functions for AirTable app script and Automation script.

Notifications You must be signed in to change notification settings

dilip-borad/airtable-js-functions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 

Repository files navigation

Airtable JS Functions

Function getAllDataFromTable

Allow to fetch/get all data from table with using views. By default you need to pass some of the parameters when you call it.

let tableObj = base.getTable("Table-Name");
let records = await getAllDataFromTable({
  table: tableObj,
  view: "viewName",
  fields: [
    { "name": "Actual Field Name 1", "access": "fieldAccessName1" },
    // Also pass asString as true when you want to access object value as a string.
    { "name": "Actual Field Name 2", "access": "fieldAccessName2", asString:true } 
  ]
});

Function makeAPIRequest

Make simple API request

let body = {"requestKey":"requestValue"};
let response = await makeAPIRequest({
  url: `url of the API`,
      method: "Request Method",
      headers: {
          'Authorization': `Bearer api-key`,
          'Content-Type': 'application/json'
      },
      body: body
});

About

JS-based basic functions for AirTable app script and Automation script.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published