Your concept will definitely work with some minor tweaking. Passing in parameters via the URL is a GET request, but Airtable webhooks must be called by passing the data as JSON via a POST request. Here’s the basic setup:
const webhookUrl = "https://hooks.airtable.com/workflows/v1/genericWebhook/......."
const options = {
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({
propertyName1: propertyValue1,
propertyName2: propertyValue2
})
}
let response = await fetch(webhookUrl, options)
Customize the object inside the JSON.stringify()
function call based on the data that you want to pass to the receiving automation webhook. You can’t go very deep with your data object (a limitation in the design of Airtable’s webhooks), so I recommend running some tests to see how the data is received before committing to your object structure.
FWIW, if you ever end up doing a similar call from a Scripting block, you’ll have to replace fetch
with remoteFetchAsync
, but the core process is the same.
Thanks @Justin_Barrett ! This is great, I really appreciate the speedy response.
I’m trying to call specific variables in the stringify section, but I’m not sure how to format it. Should I be using ${data.variablename}? Here’s my attempt so far:

Thanks again!
Thanks @Justin_Barrett ! This is great, I really appreciate the speedy response.
I’m trying to call specific variables in the stringify section, but I’m not sure how to format it. Should I be using ${data.variablename}? Here’s my attempt so far:

Thanks again!
First off, beginning variable names with capital letters is discouraged in JavaScript. That’s a naming convention typically reserved for class names, which is why those names are colored differently in Airtable’s script editor. It’s recommended to use a lower-case letter to begin variable names.
The main issue, though, is that you’ll need to bring these values in using the input.config()
mechanism. My example above was focused on the fetch call itself, which is why I left that part out. Somewhere above the code that I used, you could do something like this (assuming the variable names are changed per my first comment):
const {masterID, mediaID} = input.config()
That will assign both variables to the value of their respective counterparts in input.config()
.
Then your options
variable setup should work with those new variable names:
const options = {
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({
master: masterID,
media: mediaID
})
}
@Justin_Barrett Amazing! Thank you so much, I really appreciate it. Hopefully this is useful to other people, to avoid using something like Zapier or Integromat to handle Base to Base calls.
Thanks!