Help

Trigger an automation from webhook with preselected choices

Topic Labels: Automations
1438 5
cancel
Showing results for 
Search instead for 
Did you mean: 
Kosta_Kondraten
7 - App Architect
7 - App Architect

I’d like to create a webhook that triggers a Script I have built. However the scipt has a button input to allow the user to select what they would like to do… I was wondering if it’s possible for the webhook to not only run the script but also make a choice/choices from the script questions?

Thanks!

5 Replies 5

The type of script that you have that asks the user for specific choices won’t work in an automation because those scripting features don’t even exist in that environment. While there are some similarities between scripts run in the Scripting extension and scripts that run in automations, there are key features that are specific to each one with relation to input, and they don’t cross over.

That said, if you know what options you want to choose, you could modify your script to accept that data as part of the webhook call. Ultimately what you need isn’t a literal button click. You just need the resulting data that comes from that click, and you can pass that via the webhook.

Thank you - I was just curious but that’s okay I don’t need to pass it in if it’s not possible to select choices… if I can pass values to the webhook that the script would have access to then that’s really awesome too.

ChrisDrit
6 - Interface Innovator
6 - Interface Innovator

I may be misunderstanding your question, but I’m assuming if you capture that button click with a glue service like Make you’d be able to conditionally make choices there and use a Webhook response to redirect the user to wherever you want them to go (based upon those choices). Hope that was actually helpful :grimacing:

Can I capture JSON passed to the webhook in POST or whatever and use those values in the script then?

@Kosta_Kondratenko Yes. That’s the whole purpose of the webhook trigger: to allow you to send JSON data to the automation for further processing.