Hi there,
I am looking to use the Button run script field in Airtable to send specific data from my table into Zapier.
Does anyone have a template script they can share? This is what I have so far.
let url = "https://hooks.zapier.com/hooks/catch/TKID?recordID=?name=?";
let table = base.getTable("Table 1");
let view = table.getView("Grid view");
let record = await input.recordAsync("Pick a record", view);
let name = record.getCellValueAsString("Name")
let email = record.getCellValueAsString ("Email")
await fetch(url + record.id + "%name=" + name + "%email=" + email);
My understanding is the steps are:
- Create Button field
- Add in script that posts to Zapier webhook
- Catch data from Airtable
- Run rest of the Zap
Just looking for help on the Airtable script side.
Thank you.
