Retrieve process variables using inbound connectors

I created a custom inbound connector based on the webhook, following the example of what happens with the Slack connector. However, I’m having issues with variables. I want to initiate the process through the webhook and receive some variables that I’ve defined in the template (for example: request.body.thingId) to make a request to an internal API.

The problem I’m facing is that these variables are being retrieved in the ‘activate’ phase, where they don’t exist yet. Is there a way for me to retrieve them in the ‘triggerWebhook’ phase? I know there would be the option to pass them in the request body, but it would be ideal for the modeling to have them in the element template.

Hi @some_developer ,

The variables defined in the element template are retrieved from the InboundConnectorContext which is injected at the ‘activate‘ phase, so this way you won’t be able to retrieve variables in the ‘triggerWebhook’ phase.
Using the request body (of the request which triggers the webhook) to pass these values would be your best option in this scenario.

Ok, thank you!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.