ChatbotX icon indicating copy to clipboard operation
ChatbotX copied to clipboard

Steps after a "Get User Data" step in the same node never run after the contact replies (resumed job loses the node id)

Open innovhub-stack opened this issue 1 month ago • 1 comments

Version: v1.12.0, and still present on main (caa0646, 11 Oct 2026). Seen on the Instagram channel; the code path is channel-independent.

What happens

A Send Message node (not the start node) with steps [Get User Data, Send Text, ...]: the question is sent, the contact replies, the answer is validated and saved to the custom field correctly, but the steps after Get User Data in the same node are never executed. Nothing is sent and no error appears in the flow.

Why

When the reply arrives, runChallenge (apps/worker/src/integration/handlers/challenge.ts, around line 72) resumes the node with:

await runStepsAndQuickReplies({
  ...
  targetType: "node",
  targetId: targetNode.id,
  startFromStepId: challenge.data.stepId,
  ...
})

It doesn't pass targetNodeId. After the Get User Data step succeeds, runStepsAndQuickReplies (apps/worker/src/integration/handlers/flow.ts, around line 505) re-dispatches the next step as a new sendFlow job with nodeId: props.targetNodeId, which is undefined. The sendFlow handler then falls back to the flow's start node, can't find startFromStepId in its steps, logs "startFromStepId not found in node steps" and returns. The rest of the node is dropped.

Wiring Get User Data's success/skip outputs to another node works, because that path dispatches with the connected node's id.

Steps to reproduce

  1. Create a flow: the start node sends a message with a button (or quick reply) that goes to a second node. The second node has Get User Data (any reply format) followed by Send Text "Thanks".
  2. Trigger the flow, tap the button, answer the question.
  3. The answer is saved in the custom field; "Thanks" is never sent. The worker log shows startFromStepId not found in node steps.

(If the Get User Data node is the flow's start node, the fallback happens to land on the right node and the bug doesn't show.)

Expected

The remaining steps of the node run after a valid answer (or after an auto-skip).

Possible fix

Pass the node id when resuming a challenge, in runChallenge:

targetNodeId: targetNode.id,

Workaround

Put Get User Data last in its node and connect its success and skip outputs to a separate node that holds the following steps.

innovhub-stack avatar Oct 11 '26 20:10 innovhub-stack

Thanks for reporting this. Will fix it in the next relese

viethung0o0 avatar Oct 12 '26 10:10 viethung0o0