All docs
/
Getting started
/
Conditional runs

Conditional runs

Add programmable logic to your Clay workflows.

Overview

What are conditional runs?

Conditional runs allow you to execute specific actions or enrichments in a workflow only if certain conditions are met, helping you add programmable logic to your workflows.

Applications

Upload to CRM: Add a contact only if it has a valid email.

  • Condition: {{email}} is not empty

Sequencer Filtering: Add leads to a sequence based on lead score or industry.

  • Condition: {{lead_score}} > 80 AND {{industry}} == "SaaS"

Write to Table: Populate a column only if the lead’s region matches a target location.

  • Condition: {{region}} == "North America"

Round-Robin Assignments: Create a column for each rep and use a conditional run for actions based on assignments.

  • Condition: {{assigned_rep}} == "Kareem"

How do they work?

Conditional runs are built on Conditional statements and evaluate a condition as true or false to determine whether to execute or skip an action.

Structure of conditional runs

Conditional runs are structured like an if-else statement:

if (conditional statement is true) {

run the enrichment

} else {

don’t run the enrichment

}

To create a conditional statement within the Conditional formula generator:

Reference Dynamic Variables

  • Use / to select variables or columns from your workflow, such as {{company_size}} or {{revenue}}.
  • These variables dynamically adapt based on your data.

Apply Comparison Operators

  • Compare values using operators like equals, greater than, or not equal to.
  • Example: {{company_size}} > 500.

Combine with Logical Operators (Optional)

  • Add complexity to your conditions with:
    • AND: Requires all conditions to be true.
    • OR: Passes if at least one condition is true.
    • NOT: Reverses a condition (e.g., NOT {{status}} == "Closed").

How do I use conditional runs?

Step 1: Open the Conditional runs editor

Navigate to the Run Settings of the action you want to configure and click on “Use AI”.

Step 2: Define the conditional logic

Define the logic that determines how the condition will evaluate.

Step 3: Generate the Formula

Click “Generate formula” to automatically translate your condition into a formula.

Step 4: Verify the Output

Look at the sample outputs on the right to ensure your condition behaves as expected.

Adjust your condition as needed based on the results.

See also

Conditional statements

Comparison operators

Logical operators

Explore other docs

Export

Getting started with Sequencer

Sequencer runs cold email campaigns at scale from your Audiences data, handling sending infrastructure, copy, and deliverability in one place.

View article
Export

Connect your own email accounts

Connect email accounts you already own — Google Workspace, Microsoft 365, or any mailbox that supports SMTP — and use them as sending accounts for your campaigns.

View article
Export

Email warmup

What email warmup does, how it differs on purchased and self-connected accounts, and why you'll see unfamiliar emails while it runs.

View article
Export

Get leads ready to sequence

Everything a lead needs before a campaign can enroll it — a People segment in Audiences, an email address, and the enrichment your sequence draws on.

View article
Export

Build your sequence

Write, personalize, and pressure-test the emails your campaign sends — before a single one goes out.

View article
Export

A/B test your sequence copy

Run two versions of your campaign copy against each other, then send the rest of your leads to whichever one performs better.

View article
Export

Launch and manage a campaign

Set a campaign's schedule and credit budget, launch it, and manage sending as leads move through the sequence.

View article

Other popular resources

Experts

Find a Clay Expert

Explore our network of Clay experts and agencies.

View experts
Community

Join our slack community

Find help in our slack community, and support channels.

Go to slack
Cohorts

Join a cohort, learn Clay fast!

The faster way to master Clay. Sign in if you're enrolled in a cohort (current or past) or apply!

Learn more about cohorts
Talents

Hire GTME Talent

Find and connect with GTM talent who've demonstrated expertise in building advanced workflows

Explore GTME talents