sim icon indicating copy to clipboard operation
sim copied to clipboard

[REQUEST] Variables in the generic webhook in the start block for any workflow

Open arunbaby0 opened this issue 8 months ago • 3 comments

Is your feature request related to a problem? Please describe. When I try to execute a workflow via a generic web hook, is there a way to pass some dynamic variables?

Describe the solution you'd like For some of the fields in the agent prompt, we use dynamic variables. So if I want to trigger a workflow via a the webhook, I am not able to pass the variable as such.

Describe alternatives you've considered NA

Additional context

Image

arunbaby0 avatar May 30 '25 17:05 arunbaby0

@arunbaby0

When you mean dynamic variable, do you mean there will be some value in the generic webhook you're looking to access?

Can you give an example?

emir-karabeg avatar May 31 '25 03:05 emir-karabeg

@emir-karabeg For example, the curl for a deployed workflow is below curl -X POST -H "X-API-Key: sim_g1NxB7wazvCcCGkSfjoa6edCKXQn4Top" -H "Content-Type: application/json" https://www.simstudio.ai/api/workflows/0368a8f4-c2f3-4ce5-b33c-feb98280c9ba/execute

This will execute my workflow. Now assume that I need pass a variable to "name" to the workflow that I can use in the agent prompt. Can I pass it like the below? curl -X POST -H "X-API-Key: sim_g1NxB7wazvCcCGkSfjoa6edCKXQn4Top" -H "Content-Type: application/json" https://www.simstudio.ai/api/workflows/0368a8f4-c2f3-4ce5-b33c-feb98280c9ba/execute?name=Emir

Image

arunbaby0 avatar May 31 '25 03:05 arunbaby0

Enabling dynamic variable passing via generic webhooks into workflow start blocks is a crucial enhancement for workflow flexibility and external system integration. My experience in backend development, API design, and handling data payloads makes me well-suited. I'd design a robust mechanism to parse webhook payloads, map variables to workflow inputs, and ensure secure and efficient data flow for dynamic agent prompts.

Ebube540 avatar Jun 01 '25 11:06 Ebube540