Help

Re: Send specific fields to Zapier on Airtable Button Click

Solved
Jump to Solution
2936 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Richie_Siegel
5 - Automation Enthusiast
5 - Automation Enthusiast

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.

1 Solution

Accepted Solutions
ScottWorld
18 - Pluto
18 - Pluto

You could use a script, but it’s unnecessary. Your button can just trigger the webhook URL on its own.

Just add the Record ID of the record as a parameter to the end of the webhook URL, and then have Zapier find the record based on its ID. (You can also add in extra parameters if you’d like, but those are unnecessary as well.)

However, I strongly recommend using Make instead of Zapier. Make is infinitely more powerful & flexible & customizable than Zapier, and it is also significantly cheaper as well.

I’ve written an entire post here about Make vs. Zapier.

You can do the exact same thing that I mentioned above with Make, and you can also trigger it with a script instead of a button. Here’s how to do it with a script: https://air.tableforums.com/t/sending-airtable-data-to-an-external-webhook-such-as-make-com/159

There is a small learning curve with Make, which is why I created this basic navigation video to help.

If you’d like to hire an expert Airtable consultant to help you with any of this, please feel free to contact me through my website: Airtable consulting — ScottWorld 

 

 

 

See Solution in Thread

4 Replies 4
ScottWorld
18 - Pluto
18 - Pluto

You could use a script, but it’s unnecessary. Your button can just trigger the webhook URL on its own.

Just add the Record ID of the record as a parameter to the end of the webhook URL, and then have Zapier find the record based on its ID. (You can also add in extra parameters if you’d like, but those are unnecessary as well.)

However, I strongly recommend using Make instead of Zapier. Make is infinitely more powerful & flexible & customizable than Zapier, and it is also significantly cheaper as well.

I’ve written an entire post here about Make vs. Zapier.

You can do the exact same thing that I mentioned above with Make, and you can also trigger it with a script instead of a button. Here’s how to do it with a script: https://air.tableforums.com/t/sending-airtable-data-to-an-external-webhook-such-as-make-com/159

There is a small learning curve with Make, which is why I created this basic navigation video to help.

If you’d like to hire an expert Airtable consultant to help you with any of this, please feel free to contact me through my website: Airtable consulting — ScottWorld 

 

 

 

@ScottWorld ah thanks so much. Sorry very new to this.

So in the URL formula then I right now have the below but it isn’t splitting off Name and Email on the Zapier end. Assuming I am doing something wrong syntax wise?

"https://hooks.zapier.com/hooks/catch/TK?"&"name="&Name&"?email="&Email

You’ve got your URL setup incorrectly. It needs to look like this:

"https://hooks.zapier.com/hooks/catch/TK?name=" & ENCODE_URL_COMPONENT(Name) & "&email=" & Email

However, like I mentioned above, it’s easier & more versatile to just send the record ID to Zapier:

"https://hooks.zapier.com/hooks/catch/TK?id=" & RECORD_ID()

@ScottWorld Thanks for the help. Really appreciate it.