Help

Re: Webhook Automation - wanting to pass some variables to an Integromat Webhook

1261 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Hal_Atkins
5 - Automation Enthusiast
5 - Automation Enthusiast

Beginning help needed with writing a script using a Webhook with Integromat. The first part of the script I’ve got, taking that from other community posts:

let url = "https://hook.integromat.com/xxxxxxxxxxxxxxx?updateInfo=";
let inputConfig = input.config();

And Airtable allows for creation of input variables, which I’ve got three:

cuID
companahID
status

So there needs to be one more line in the script, which spends the variables to the webhook URL - but I don’t know how to write that code. I think it begins like this…

await fetch(url + config.updateInfo

What comes after that?

1 Reply 1
Anthony_William
5 - Automation Enthusiast
5 - Automation Enthusiast
I have a script that works almost exactly like that. You just need to change the inputs to your inputs as shown below. It then concatenates a URL with your webhook and sends it over!
 
let inputConfig = input.config();
let recordID = inputConfig.inputRecord;
let recordEventID = inputConfig.inputEventID;
let outlookCategory = inputConfig.inputOutlookCategory;
let syncSource = inputConfig.inputsyncSource;
console.log(recordID);
console.log(recordEventID);
console.log(outlookCategory)
console.log(syncSource)
let url="Webhook goes here"
console.log(url);

let request= url.concat('?recordID=',recordID,"&",'recordEventID=',recordEventID,"&",'outlookCategory=',outlookCategory,"&",'syncSource=',syncSource);

console.log(request);


await Promise.all([
    fetch(request)])