Help

Re: Webhook Automations with Data Passed

874 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Kosta_Kondraten
7 - App Architect
7 - App Architect

So I’m really confused about where JSON inputs figure in Webhook Automation with scripter combinator.

Let me explain - so I have a webhook - let’s call it whatever here is a random one:

https://hooks.airtable.com/workflows/v1/genericWebhook/appzNOZaonMIXQNnZ/wflafthnU7LpwoV3K/sampleWeb...

So I’ve just configured it with Insomnia and everything works and comes back with Success and that’s great - I’m excited but…

I want to pass variables to this Webhook… however no matter what I try it just doesn’t register. Here is the JSON I’m passing to my Webhook:

{“Company”: “HereBoy”, “Text”: “More Flavor”}

Here is my code in the script:

let table = base.getTable("SMS");
let inputC = input.config(); 
await table.updateRecordAsync('rec69N1WoIfzlUXJ1', {
    "LinkID" : inputC.Company,
})

Webhook seems to be registering the values that are coming in when I check:

Shared with CloudApp


But when it’s a “set in stone” text it works - however my custom variable isn’t registered… if I could pass custom variables to the webhook for my script to work with that would be soooo awesome… maybe I’m fetching them wrong?

Thank you!

1 Reply 1

You've probably figured this one out by now, but I suspect that within the Script Action you've simply forgotten to add the input from the Webhook for your "company" body key/value.

Karlstens_0-1672645245737.png

For an extra tip, note how I'm using a deconstruction method on the input.config() to simplify the extraction of value data - it's very easy once you understand how it works, and saves a lot of doubling up when you start to deal with lots of input.config() variables.