Skip to main content

How to add an input to a script

  • July 11, 2022
  • 1 reply
  • 117 views

Forum|alt.badge.img

Hey everyone,

I’m new to using scripts and I’m hoping someone can help me out.

I’m running an automation that runs a script which includes the input from the trigger but I have no idea how to add the input to the script.

Here is the script, the input is supposed to be sent as the body to the webhook url:

let response = await fetch('https://hook.eu1.make.com/o3pnw2043wkr9zs9mcavdrix', {method: 'POST', body: '*Input should go here*'});
console.log(await response.text());

Thank you

1 reply

Justin_Barrett
Forum|alt.badge.img+21
  • Inspiring
  • 4647 replies
  • July 12, 2022

Welcome to the community, @Tami! :grinning_face_with_big_eyes: The doc page on the automation system’s “Run a script” action shows how to add input variables: