Hi all,
I try to run this script :
"when a button is clicked in an interface this script is running. It's pointing to another automation triggered by this webhooks to create a new record in a table.
const URL_AIRTABLE_WEBHOOK = 'https://hooks.airtable.com/workflows/v1/genericWebhook/XXXXXXXXXX/YYYYYYYYYYY/ZZZZZZZZZZZ'
let config = input.config()
let response = await fetch(URL_AIRTABLE_WEBHOOK, {
method: 'POST',
body: JSON.stringify({'dossier_record_id':config.dossier_record_id}),
headers: {
'Content-Type': 'application/json',
},
});
console.log(await response.json());
But It returns :
ERROR
There was an unexpected error while executing your script.
I'm tired and I don't see my error... After all I want is to create a new record in a table when a button is clicked... is there another to do that ?
Thanks !