Skip to main content
Sequences (Outreach → Sequences) send a series of messages to one contact at a time: emails, chat messages, surveys, push notifications and WhatsApp messages, with waits, if/else checks and actions in between. Contacts join by hand, from a segment, a workflow, a pipeline or an event, and leave when the sequence ends, when its goal is reached or when one of its stop rules matches. The Gleap MCP server lets AI agents such as Claude, ChatGPT, Cursor or Kai build and run sequences for you: draft a whole sequence from a one-line request, preview every message for a real contact, send test emails, take it live once you agree, and read the results.

Connect

Add the Gleap MCP server as a custom connector in your AI client and sign in with Gleap (OAuth): Clients that can’t do OAuth send the headers x-gleap-api-key and x-gleap-project-id instead. The agent acts with your role in the project.

Tools

Steps

Steps are read top to bottom. Every step has a unique id (up to 64 characters) and a type. A sequence holds up to 100 steps, and if/else paths nest up to 5 levels deep.

Messages

Survey, push and WhatsApp steps send something you already made under Outreach. The agent finds it with list_surveys or list_outbound_messages and puts its id in outboundId.

Emails written by Kai

Add kai: { enabled: true, prompt: "…" } to an email step and Kai writes each contact their own subject and message when the step is due, from their activity, company, conversations, your help center and website. Kai-written emails are billed as AI usage. The step’s own subject and content become the fallback for people Kai knows nothing specific about; without a fallback the step is skipped for them.

When they’re not online

Chat message and survey steps can wait for the contact to be active in your app instead of being shown the next time they open it:
The step waits up to amount unit for the contact to come online. If they don’t show up in time, they get the fallback email (its own subject and content) or, with fallback: "skip", the step is skipped.

Timing and logic

Empty yes or no paths continue with the step after the if/else. Put a wait before an engagement check to give people time to open or reply. Opens and clicks are only tracked for emails with the personal or company look: plain emails (the default look) don’t track them, so check replied for those. Opens are approximate: some email apps block them.

Actions

Variables work in subjects, content and attribute values: {{session.firstName|there}}, {{session.companyName}}, {{session.customData.role}}, {{project.name}}. Give a fallback after | for anything a contact may lack; preview_sequence lists the variables that resolve empty.

Settings

When it stops

A sequence always stops when the contact unsubscribes or the address bounces, and an out-of-office reply always pauses it until the contact is back. On top of that, exit turns on more reasons: Replies keep the sequence going by default, for every email type. They still count in the results (reply rate, replies per email), and an engagement if/else can send people who replied down another path. The reengage (Win back) template turns onReply on; blank, onboarding and trial leave it off. Sequences created before this change keep the setting they have.

How agents build a sequence

  1. get_targeting_options for the event and attribute names your project really tracks.
  2. create_sequence with a template or the whole definition. Invalid definitions are refused with the exact field that is wrong.
  3. preview_sequence for a real contact, then send_sequence_test_email for the emails.
  4. The agent shows you what the sequence sends and to whom (or you open the reviewUrl in the editor).
  5. Once you say “go live”, the agent calls set_sequence_status with live. Later edits go through update_sequence and publish_sequence_changes.
Example request to an agent:
Build a trial sequence: a welcome email from me, a survey in the app after a week (email them the question if they don’t come back within 3 days), and if they haven’t opened the welcome email after 3 days, a WhatsApp reminder.
The agent creates a draft with a welcome email, a 3-day wait, an engagement if/else on opened for welcome with a whatsapp step on the No path, a wait, and a survey step with online and an email fallback. It asks before taking it live.

Guardrails

  • create_sequence always saves a draft, and update_sequence on a live sequence only saves unpublished changes. Nothing reaches contacts until set_sequence_status or publish_sequence_changes, which agents call only after you agreed.
  • Going live is checked by the server: every email needs a subject and content (or a Kai prompt), survey, push and WhatsApp steps need the message they send, waits need a duration and if/else steps a condition or an engagement check.
  • enroll_in_sequence contacts customers right away, so agents use it only for the contacts you asked for.
  • send_sequence_test_email goes only to your own address or addresses you gave.