Can I access Google API through Airtable script to generate Google Docs?I h

I have an app in G Suite that uses a trigger script from a spreadsheet to create a set of record-associated Google Docs, and retain their URLs within spreadsheet cells. This is done in the background, as a trigger. Can I access the Google Docs API to enable such a function, and how would I enable it as a trigger, similar to a trigger from a Google Sheet?

Sorry if this sounds basic, I am just starting with Air Table. Much tighter and somewhat more intuitive than G Suite.

Yes, you can absolutely access any API that you’d like from the scripting app, by writing your own custom JavaScript scripts. Airtable has assembled some example scripts in their Example Script Showcase, and a few of these access different APIs, so you can get an idea of how to script this for yourself. Also, you may find this useful: Airtable’s Scripting API.

If you don’t want to dive into JavaScript scripting, you can also turn to a “no-code” automation platform like Integromat, which is my personal favorite platform for communicating with APIs but avoiding the coding. (You’re also free to make API calls via code with Integromat as well.)

There are two ways to access the Docs API from Airtable:

  1. Google Apps Script does have a REST API making it possible to call script functions from any app. This means you could call apps script functions from either Script Blocks, Apps (using React Javascript), and Script Actions (in automation).
  2. Use Google Apps Script to create a simple web service that runs your desired functions. In this approach, you are building an API of your own that listens for Airtable calls and runs the functions you called.

I prefer the latter because it gives me additional control over the processing and all without the non-trivial elements of the oAuth2 security context required by the REST API.

1 Like