Automation guide
Decision logic

Add conditions and branching

Control exactly when workflows run and which path they follow.

Chapter3/8
Time12 min
AudienceWorkflow builders

Outcomes

Use guided condition fields instead of typing payload paths blindly.
Create yes, no, failure, and custom paths.
Preview branch behavior before enabling writes.

Examples

Use these patterns while learning this chapter.

Example workflow

Payment failed recovery

invoice.payment_failed

Stripe reports a failed subscription payment and the tenant needs a polite retry sequence before suspension.

Conditions

  • Invoice status equals unpaid
  • Customer email exists
  • Subscription plan is not free

Actions

  • Notify billing admin
  • Email customer with payment link
  • Wait 3 days
  • Check invoice status again
  • Create follow-up task if still unpaid

Safety checks

  • Tenant suspension is behind a human approval node
  • Max one reminder email per day
  • Dead letter if Stripe token refresh fails
Try it: Paste a sample payment_failed payload and verify the no-email branch catches missing customer email.

Example workflow

Ticket SLA breach escalation

ticket.sla_breached

A high-priority support ticket is close to breaching SLA and managers need visibility before the customer gets frustrated.

Conditions

  • Priority is high or urgent
  • Assigned agent exists
  • Ticket status is not resolved

Actions

  • Notify support manager
  • Create escalation task
  • Send customer update from macro
  • Ask AI to summarize ticket history

Safety checks

  • Customer email uses approved support template
  • AI summary is read-only
  • Escalation task is assigned to support manager group
Try it: Run Step Test on the customer email action with mocked delivery to confirm the rendered macro is correct.

Example workflow

Project risk review

project.progress_updated

A project reaches 80 percent completion and leadership wants a risk summary plus a customer review meeting.

Conditions

  • Progress is greater than or equal to 80
  • Project status equals active
  • Client contact exists

Actions

  • Ask AI to summarize risks
  • Email project manager
  • Create client review meeting
  • Post update to project group

Safety checks

  • AI output is reviewed before client email
  • Meeting invite includes only project participants
  • No budget details are sent to members without permission
Try it: Preview with a project that has missing client contact and confirm it routes to the no path.

Step 1

Use guided condition fields

Automation Studio suggests fields based on the selected trigger, such as deal stage, customer email, invoice amount, priority, or progress percent.

1

What to do

  • Open Conditions and branching.
  • Choose a field from the Field dropdown.
  • Pick an operator like Equals, Greater than, Contains, or Exists.
  • Enter a value or select a suggested one.

Check before continuing

  • The summary line reads like a business rule.
  • Exists conditions do not require a value.

Step 2

Choose all or any matching

All match means every condition must pass. Any match means one passing condition is enough.

2

What to do

  • Use All match for strict workflows.
  • Use Any match for routing workflows with several acceptable values.
  • Preview both matching and non-matching sample payloads.

Check before continuing

  • The workflow does not run for unrelated events.
  • The no path behavior is intentional.

Step 3

Create branch paths

Branches let one workflow route work differently based on payload data or action failures.

3

What to do

  • Use Yes path for normal successful handling.
  • Use No path for fallback or notifications.
  • Use Failure path for retries and escalation.
  • Add custom paths when a process needs separate department, priority, or customer routes.

Check before continuing

  • Each branch has a clear owner.
  • Failure path actions do not create loops.

Pro tips

  • Branch labels should name the business outcome: "VIP customer", "Missing email", or "High priority".
  • Use custom branches when you would otherwise create several near-duplicate workflows.

Avoid these mistakes

  • Do not mix too many unrelated branches in one workflow.
  • Do not use text Contains for financial thresholds; use Greater than or Less than.