How to pass parameters to my synthetic script or a variable from the script to the webhook payload?

I would like to create a monitor that will do the same functional check for different endpoints, how can I parameterize my script for this purpose?

Second part is about passing a variable value from the script to the webhook, is this possible or there is any workaournd ?

Hi, @Reda: For the first part of your post, you may find this technique helpful:

I don’t know of any way to pass a variable from a Synthetics script to a webhook notification channel.

1 Like

Hi @Reda - Welcome to the Explorers Hub!

Did @philweber get you started on the right path for your question? I just want to make sure we keep working at it if you need any follow-ups.

@hross partially yes. I’m so confused like many others users how it is not possible to pass a variable from the synthetics scripts to the webhook payload cause we want to have a meaningful error message in the external systems.

@Reda

It sounds like you would like to pass a Synthetic Check error message, or custom defined values from a check to an Alert notification channel webhook payload. Currently, this functionality is not available but I’ve captured this as a feature request on your behalf. If there is other information about your use case for this you would like to include let us know.

In the meantime, it maybe best to use the Insights API to retrieve error information on the SyntheticCheck event for external systems.

thanks @Michel_L , As I’ve already taken a look at insights I’m not sure they are suitable for my use case

1 Like

@Michel_L
Could you please update on this as this conversation is 2 year old, do we a solution currently to pass script_log via Webhook?