I have an external API call being made in an instant trigger module with data that is needed to be sent back in the webhook response for subsequent calls. Is it possible for a webhook response to include the instant trigger response data?
For more context, I am building a custom app that receives user data from an external system based on an event (webhook). The flow is something like this:
- External service sends GET webhook to mycustomapp with no payload
- mycustomapp recognizes there is no payload and makes an API call to another external service to get an public key and sends the public key back in the webhook response
- Then more stuff happens, but not relevant here.
Can’t figure out if this is possible from the docs, and trying various scenarios makes me believe a webhook can’t really access data or temp variables. Gemini seems to think I should be able to form the webhook response like this, but it doesn’t seem to work:
{
"respond": {
"status": 200,
"type": "json",
"body": "{{modules.TRIGGER_MODULE_NAME.RESPONSE_KEY_HERE}}"
}
}
and the instant trigger module named TRIGGER_MODULE_NAME response look like this:
"response": {
"output": {
"RESPONSE_KEY_HERE": "{{body}}"
}
...