Avoid workflow loops

How Inchat stops a workflow repeating itself, and the limits on Jump To and Trigger Another Workflow.

Quick start

  1. Jump To sends the flow back to an earlier step, and stops after 10 jumps by default.
  2. Lower Limit jumps to a maximum of on the step if you want it to stop sooner.
  3. Trigger Another Workflow starts another workflow from inside this one — it cannot start itself or one already in its chain.
  4. If a step seems to loop or a hand-off does nothing, read the workflow's Activity tab under Execution log.

Watch out

  • The 10-minute pause after a run only protects one workflow on one conversation — two different workflows on the same trigger can still both reply.
A Jump To step with the jump limit set, capping how many times it may fire.
The canvas with a Tag Contact step (Contact tag: vip-customer) followed by a Jump To step.
Details

Getting here

Automate → Workflows.

Before you start

  • An owner, admin or agent can build and save a workflow; see workflows-overview for who can publish one.
  • Building workflows depends on your plan; see pricing.

How it works

  • Messages your workflow sends are never counted as customer messages, so a Send a Message, AI Reply or any other send a flow makes never re-fires Message Received on that same message. A workflow cannot trigger itself this way, by construction.
  • A short cooldown — about 10 minutes after a run — also suppresses a second run of that exact workflow on that exact conversation, even if its trigger's event happens again inside that window.
  • A few triggers, such as a tag or field change or a video watch mark, are not held back by this cooldown — they name each event individually instead.
  • Jump To is the one step meant to loop on purpose.
  • The workflow counts how many times each Jump To on the canvas has actually jumped in this run, and stops following it once that count reaches a cap. That cap is the lower of 10 and whatever the step's own Limit jumps to a maximum of field asks for — the field can lower the cap, never raise it past 10.
  • The jump count starts again after a long Wait or an answered Ask a Question — it does not remember jumps made before the pause.
  • Trigger Another Workflow refuses a hand-off to any workflow already in the same chain, including the workflow itself. So if A hands off to B, B cannot hand off back to A.
  • Beyond that, a chain of Trigger Another Workflow hand-offs (A hands to B, B hands to C, …) is capped at 5 workflows deep. A hand-off that would go deeper is refused rather than followed.
  • The second workflow runs straight away as part of the first, so it has no 10-minute pause of its own, and its own trigger conditions are not checked.
  • An AI agent and a workflow can do the same job on one conversation, such as tag the contact, set the stage or reply. Inchat checks for this and warns; it never blocks.
  • The warning is in the agent's Review tab and in the Confirm publishing box. Each line names the step, the agent action it duplicates and who should own the job.
  • System events such as an order, a payment, a booking, a form or a deal stage change belong to the workflow. Messages, keywords and new conversations belong to the AI agent.
  • The AI agent starts a workflow at most once per conversation unless you change its repeat policy, so it cannot restart the same workflow in a loop.

When it fails

  • A Jump To that hits its cap does not fail the run. In Activity → Execution log, hover over the step to read jump limit reached.
  • The flow falls through to whatever step comes after that Jump To in the same list, exactly as if the jump had not been there.
  • A Jump To cannot go back to a step from before a Wait that actually suspended the run, or before an Ask a Question. Trying to fails with jump target not found.
  • That Wait is one whose short waits add up past 15 seconds, or one set to a clock time.
  • A resumed run only carries the rest of the flow that was saved when it paused, not the steps that already ran before it.
  • A short Wait runs inline only while the run's short waits add up to 15 seconds or less in total; past that it suspends like a long one.
  • So a loop through a short Wait can jump back once or twice, then fails with jump target not found once the total passes 15 seconds.
  • A Trigger Another Workflow refused for re-entering its own chain, or for going past the chain depth cap, is recorded as one failed step.
  • The reason is on that step's line in the Activity tab's Execution log, and the rest of the calling flow after that step still runs.
  • A Trigger Another Workflow is refused the same way when it hands to a workflow that is not published or no longer exists.
  • It is also refused when it names a specific step to continue at, and that named step no longer exists.
  • Either way, its own reason is on the step's log line.

Limits

  • The cooldown only protects one (workflow, conversation) pair.
  • It does nothing for two different published workflows that both match the same trigger — each workflow has its own separate protections.
  • So a customer can still be answered by more than one flow on the same event.
  • The chain depth cap only counts hand-offs made with the Trigger Another Workflow step itself. It does not count how many different workflows a conversation has otherwise been handed through.
  • None of this stops a flow from feeling repetitive to a customer for reasons that are not a loop at all.
  • Two unrelated published workflows that each send their own message on the same trigger are one example. That is a design problem for Workflows: how a flow runs to cover, not something a loop cap catches.

Use cases

  • Re-ask a question that got no usable answer: inside its Failure: Invalid branch, add a new Ask a Question. A Jump To back to the first question fails.
  • Stop two workflows on the same trigger from both replying: add conditions so a message can match only one of them.

Reading this with an AI assistant? Plain Markdown version.