Guides

Trigger a workflow on opportunity stage change

Use a Record Updated trigger to run a workflow when an opportunity moves into a target stage.

This guide wires a workflow to run whenever an opportunity moves into a specific stage, such as Discovery to Qualified.

What You'll Build

A Record Updated trigger that watches opportunity stage changes, maps the changed opportunity into a workflow input, and runs the published workflow automatically.

When to Use This

Use this pattern when a stage move should kick off a repeatable action:

  • Create follow-up tasks when a deal becomes qualified.
  • Run account research when an opportunity enters discovery.
  • Notify a manager when a deal moves to procurement.
  • Enrich or score an account when a deal reaches a high-intent stage.

Prerequisites

  • A published workflow that takes an opportunity_id (or record_id) input. If you don't have one, build a simple version following Build your first workflow, with opportunity_id as the input instead of account_id.
  • Admin access to Automation.
  • At least one opportunity pipeline stage you want to watch.

Estimated time: 10-15 minutes.

Concepts used: Triggers, Workflows, Variables.

1. Create a Record Updated Trigger

Navigate to Automation → Triggers and click New trigger.

Configure:

  • Trigger type: Record Updated
  • Record type: Opportunity
  • Condition field: the opportunity stage field (stage_id in most orgs)
  • Condition value: the target stage you want to fire on, such as Qualified

The stage picker shows active stages from your pipelines. Select the target stage rather than typing a stage id by hand.

The trigger declares outputs such as the changed record id and update context. See Triggers for the full mental model.

2. Assign the Workflow

In the trigger detail page, click Assign workflow and pick your workflow.

The assignment dialog shows the workflow's inputs on the left and trigger outputs on the right. Map:

  • inputs.opportunity_idrecord_id

Any input that isn't mapped to a trigger output will need a literal value or a Liquid expression. Required inputs that aren't mapped will block the assignment.

3. Test the Trigger

From the trigger detail page, click Test to run the workflow with a real recent stage-change event from your CRM. The test executes the assigned workflow with the mapped inputs so you can verify the trigger is wiring through correctly without waiting for a real stage move.

If no matching recent event exists, move a test opportunity into the target stage and try again.

4. Watch Live Runs

Once the trigger is enabled:

  • Live runs appear in the trigger's Runs tab and in /automation/executions.
  • Each run carries trigger context, so you can filter executions by trigger source and inspect the workflow inputs that were passed in.
  • The workflow run uses the published workflow version, not any draft edits.

Success Check

You are done when:

  • Moving an opportunity into the target stage creates a trigger run.
  • The trigger run starts the assigned workflow.
  • The workflow run receives the expected opportunity_id.
  • The workflow completes or shows a clear error in Runs.

Common Pitfalls

  • The old implicit {{trigger.*}} namespace is gone. Trigger outputs are mapped explicitly onto workflow inputs, which is why the assignment dialog exists.
  • If you change the workflow's input shape after assigning a trigger, re-open the trigger and remap. The system will warn you about unmapped required inputs.
  • Triggers fire on the published version of the workflow. Drafts only run from inside the builder.
  • Stage conditions use your org's current pipeline/stage values. If a recommended automation was installed from a template, review any highlighted stage fields before publishing.

Next Steps

On this page