Workflow conditions and filters

Conditions decide exactly which replies a workflow touches. There are 28 of them, from labels and sentiment to time since the last reply, target account domains, campaign names, the day of the week and who sent the message. Combine any of them with AND, OR and NOT.

The reply

ConditionWhat it checksComparisonsExample
Labels
labels
Which labels the thread has right now.equals, not equals, any of (OR), not (NOT), is empty, not emptyOnly run when the thread is labeled Interested or Meeting Request.
Label sentiment
label_sentiment
Whether the thread's label is positive, neutral or negative, so one rule covers every positive label you create.equals positive, neutral or negativeAlert Slack for any positive label, now and when you add new ones.
Message text
messages
Keywords in the prospect's messages.contains, does not contain, AND, OR, NOTRoute replies that mention "pricing" or "contract" to a senior rep.
Subject
subjects
Keywords in the email subject line.contains, does not contain, AND, OR, NOT, is empty, not emptyTreat subjects containing "Book a demo" as inbound form leads.
Read or unread
seen
Whether anyone on the team has opened the thread.equals read or unreadEscalate interested replies that are still unread.
Has a draft
has_draft
Whether a reply draft, written by a rep or a reply agent, is waiting on the thread.equals yes or noPing the rep only when an AI draft is ready to approve.

Timing and status

ConditionWhat it checksComparisonsExample
Last message from
last_msg_from
Who sent the latest message in the thread.equals me or prospectOnly remind the rep when the prospect spoke last.
Ongoing conversation
ongoing_conversation
Whether there is a real back and forth, or only your outbound messages.equals yes, no or only sentSkip threads where the prospect never replied.
Time since a reply
reply_since
How long since the last message, your last reply, or their last reply, in minutes, hours or days.less than, greater than, equals, not equals, betweenThe prospect replied more than 4 hours ago and nobody has answered.
Last message date
last_message
The date of the latest message in the thread.between, equals, not equals, before, afterOnly act on conversations from this quarter.
Reminder
reminder_at
Whether a follow-up reminder is set on the thread, and when it is due.due in, past due by, not setFind positive replies with no follow-up reminder set.
Message counts
count_by
How many replies, sent messages or follow-ups the thread has.equals, less than, greater than, betweenAfter 3 follow-ups with no answer, move the lead to Nurture.
Day of weekIn the app
day
Which day the event happened. Set in the app on Incoming Message and Add Label workflows.any of Monday to Sunday, in the workspace time zoneWeekend replies get an instant acknowledgement and a Monday reminder.

The prospect

ConditionWhat it checksComparisonsExample
Prospect name
name
The prospect's name.equals, not equals, contains, starts with, ends with, AND, OR, NOT, is empty, not emptyExclude test leads named "Test".
Prospect email
email
The prospect's email address.equals, not equals, contains, starts with, ends with, AND, OR, NOT, is empty, not emptyOnly run for prospects with a work email.
Company domain
domain
The domain of the prospect's email.equals, not equals, starts with, ends with, contains, AND, OR, NOT, is empty, not emptyTarget account list: alert the account owner when any of 50 domains replies.
Custom fields
custom_fields
Any custom field on the prospect, by field name.equals, OR, is empty, not emptyOnly push leads to the CRM when Company size is filled in.
Phone numberIn the app
phone
Whether the lead has a phone number yet. Set in the app.is empty, is not emptyInterested and no phone: run phone enrichment first.
Assigned memberIn the app
assigned_member
Which rep owns the lead. Set in the app.is a member, unassigned, anyoneNotify only the owner's Slack channel, or alert the manager about unassigned positives.
Call history and outcomeIn the app
call_outcome
Calls made with the MI Inbox Dialer and their outcome. Set in the app.called or not, by outcomeNo answer on the call: send an SMS and set a reminder.

Where it came from

ConditionWhat it checksComparisonsExample
Campaign name
campaign_name
The sequencer campaign the reply came from, by name. Empty means the email came in outside any campaign.equals, not equals, contains, AND, OR, NOT, is empty, not emptySend replies from Enterprise campaigns to the enterprise channel.
Channel
channel_id
The mailbox or LinkedIn account the reply landed in.equals, not equals, any of (OR), not (NOT)Replies to one rep's mailboxes go to that rep.
Source tool
source
Which integration the reply came through, such as Instantly, Smartlead or HeyReach.equals, not equals, any of (OR), not (NOT)Handle HeyReach LinkedIn replies differently from email.
Sequencer
sequencer
Whether the lead is in a Smartlead or lemlist sequence.is or is not Smartlead or lemlistPause the Smartlead campaign only for leads that are in one.
Sent from
sent_from
How an outgoing message was sent, including through the API or one API key.equals Master Inbox, a rep by hand, a reply agent, or the APILog every message your own automation sent through the API.
List
inbox_type_id
Which list the thread sits in, such as Call/Reply or Meeting Booked.equals, not equals, any of (OR), not (NOT)Only alert on threads in the HOT list.
Folder
folder
Whether the thread is in Archive, Marketing, Spam or Trash.equals, not equals, any of (OR), not (NOT)Never act on anything in Spam.
Chili Piper link and meeting typeIn the app
chili_piper
Which Chili Piper link or meeting type produced a booking. Set in the app on Meeting Booked.workspace, meeting type, scheduling linkBookings from the phone team's link stop the email follow-up.

Conditions in an API request

Each rule is keyed by any short id you choose. This one matches positive replies from your target accounts where the prospect spoke last:

{
  "conditions": {
    "a1": {
      "field": "label_sentiment",
      "operator": "AND",
      "condition": "equals",
      "values": [
        "positive"
      ]
    },
    "b2": {
      "field": "domain",
      "operator": "AND",
      "condition": "equals",
      "values": [
        "northwind.com",
        "tallbridge.com"
      ]
    },
    "c3": {
      "field": "last_msg_from",
      "operator": "AND",
      "condition": "equals",
      "values": [
        "prospect"
      ]
    }
  }
}

The full list of allowed values is live at GET /workflows/filter-fields. Reference: workflow API guide.

Questions

How many conditions can one workflow have?

As many as you need. Combine them with AND, OR and NOT, and nest them in groups, the same way you build views in the inbox.

Can I use conditions through the API?

Yes. Send them in trigger_config.conditions on the create-workflow request. Conditions marked In the app are set in the workflow builder.

Why did my workflow not run for a prospect who never replied?

Workflows with conditions only match prospects who have replied. Leave conditions off to act on everyone.

See conditions in real workflows

Browse 177 workflows sales teams run.

Open the library