Accessing Webhook Parameters in an Instant Trigger Module for Dynamic RPC Call

Hi everyone,

I’m working on an integration using an instant trigger module with a dedicated webhook. The webhook is set up to accept various parameters and based on these, it returns different structures. My goal is to dynamically adapt the interface structure of the instant trigger based on the webhook parameters.

To achieve this, I’ve considered using an RPC function in the interface tab of the module to fetch the dynamic structure based on the webhook’s input. However, I’m facing challenges with accessing the webhook parameters directly within the module and then using them to conditionally call the RPC function.

Here’s what I need help with:

  • How can I capture and access the webhook parameters directly inside the instant trigger module?

I appreciate any guidance or examples from those who’ve tackled similar issues. If my explanation is unclear, please let me know which part needs more detail!

Thanks in advance for your assistance!

Hey Vdevs

For dynamically adapting the interface structure of your instant trigger based on webhook parameters, you can use the following approach:

  1. Capture Webhook Parameters: Ensure that your webhook is configured to capture and log the incoming parameters. These parameters will be the basis for determining the structure returned by your RPC function.
  2. Access Webhook Parameters Inside the Module: To access the webhook parameters directly within the instant trigger module, you need to store these parameters temporarily when the webhook is triggered. This can be achieved by using an internal storage or context variable.
  3. Call RPC Function Conditionally: Use the stored webhook parameters to conditionally call the RPC function. This involves writing a logic that checks the parameters and calls the appropriate RPC function to fetch the desired structure
1 Like

Hi sachinkarma19,

Thanks for your quick response.

I’ve searched through the documentation and couldn’t find any information on internal storage. It seems that the only available context variable for temporary data storage is temp.

Based on this, I tried storing a test value in temp.test within the webhook’s attachment procedure. Here’s how I modified the Instant Trigger interface configuration:

[
     "rpc://getCustomInterface?test={{temp.test}}"
]

Unfortunately, this didn’t work as expected. The variable definition {{temp.test}} is passed as a string rather than being evaluated as a variable. I attempted to use temp.test directly in the getCustomInterface RPC within the query parameters, but it returned as null.

I’ve repeatedly gone through the video courses and documentation without finding a solution to this issue.

Could you possibly provide a brief example or concept that might help resolve this? Any example code or guidance would be greatly appreciated.

Seems like I am overseeing something…

Thank you!