Help

Generate Google doc with Airtable (using Google Script)

Topic Labels: Automations
Solved
Jump to Solution
1584 3
cancel
Showing results for 
Search instead for 
Did you mean: 
Ludo_Figueiredo
5 - Automation Enthusiast
5 - Automation Enthusiast

Hello, I am making a special CRM. I have customer information (name, phone, address…) and with this information, I would like to fill a google doc (there are variables like {{name}} and they have to be replaced with airtable data ).

1

I am used to javascript but I am a beginner in the API world. I have already tried that:
2

3

I don’t know how I can tell my script to only use the data from the row where my checkbox is checked (and how to tell Airtable to run my google App script when the checkbox is checked. I wanted to try the Google web app and use webhook but I don’t know if airtable can send webhook or if I have to add it a special code). I would like to only use code and not an app like Zapier (for flexibility and because I am curious).

Best regards.

1 Solution

Accepted Solutions
kuovonne
18 - Pluto
18 - Pluto

Airtable can call a webhook using fetch in a script.

Have your Airtable script gather the info for the record and post the data to the Google App Script,

See Solution in Thread

3 Replies 3
kuovonne
18 - Pluto
18 - Pluto

Airtable can call a webhook using fetch in a script.

Have your Airtable script gather the info for the record and post the data to the Google App Script,

ARC_Gonza
5 - Automation Enthusiast
5 - Automation Enthusiast

Hello
I'm trying to do just what you describe in your message. Were you able to fix it with google app script? Could you tell me how?
Thank you so much.

Hello, 

First I create a json object with my airtable data:

Ludo_Figueiredo_0-1695195278264.png

 

I also have a variable called url:

let url = "the url link provided by google script";
 

Then I get that data into my google script with the function doPost(e) and I parse the result:

Ludo_Figueiredo_1-1695195453345.png

I also created a Google doc with my variables {{ name of the text to be replaced }} and I always create a copy from that template in my code. To finish, I use the drive API and body.replaceText('{{ name of the text to be replaced }}', data )

Ludo_Figueiredo_2-1695195609051.png

I have been really fast but if you have any questions don't hesitate.