Share feedback, ideas and get community help

Updated 2 weeks ago

Integration with N8N

I’m trying to store a value (resultId) early in my workflow and reuse it later, even after it gets lost or becomes null during intermediate steps like the AI Agent node. Specifically, I need to:

  1. Capture resultId from the Webhook payload.
  1. Save it so I can use it persistently throughout the workflow, even if subsequent nodes (like AI Agent) overwrite or remove it.
  1. Reference resultId dynamically in an HTTP Request Node to construct a URL.
What I’ve Tried:

  1. Using $flow.set() and $flow.get():
This works temporarily during the workflow execution but doesn’t persist after the AI Agent step.



  1. Using Static Workflow Data (getWorkflowStaticData):
I attempted to save the resultId globally with:

const staticData = this.getWorkflowStaticData('global');
staticData.savedResultId = $json.body.resultId;
return $json;

And retrieve it later with:

const staticData = this.getWorkflowStaticData('global');
return { savedResultId: staticData.savedResultId };

However, this didn’t work for constructing the dynamic URL in the HTTP Request Node.




  1. Item Matching:
Tried saving the resultId in a Set Node and passing it dynamically, but it still became undefined in the later steps.




Current Workflow Design:

Webhook Node: Receives the initial payload with body.resultId.

Set/Code Node: Saves resultId for later use.

AI Agent Node: Performs processing but causes resultId to become null.

HTTP Request Node: Needs resultId to construct the URL:

https://typebot.co/api/v1/typebots/.../results/{{ savedResultId }}/executeWebhook


Key Issue: I cannot reliably persist resultId through the workflow, especially when intermediate nodes like the AI Agent overwrite or remove it.

What I Need: A simple way to:

  1. Save resultId early in the workflow (e.g., from the Webhook payload).
  1. Ensure it’s accessible later, regardless of what intermediate nodes do.
  1. Dynamically reference it in the HTTP Request Node.
B
1 comment
Can you record a video I don't understand your post 🤔
Add a reply
Sign up and join the conversation on Discord