Back to course
Email Sequencer

Learn how ops teams use the Clay Sequencer to run cold outbound email end to end, from buying and warming the inboxes you send from to writing, sending, and reading the results. You'll set up sending infrastructure, enroll a Clay audience that updates itself right up to the moment of the send, write with variables and AI snippets, and use the deliverability numbers to keep your domains healthy.

Progress

Your Crash Course on Clay's Sequencer
1
Your Crash Course on Clay's Sequencer
How Cold Outbound Email Works
2
How Cold Outbound Email Works
How Email Deliverability Works
3
How Email Deliverability Works
Buying Domains and Email Accounts in Clay
4
Buying Domains and Email Accounts in Clay
Bringing Your Own Inbox or Domain
5
Bringing Your Own Inbox or Domain
Using an Audience in a Campaign
6
Using an Audience in a Campaign
AI Context and Variables
7
AI Context and Variables
AI Snippets and Spintax
8
AI Snippets and Spintax
A/B Testing Your Message
9
A/B Testing Your Message
Building a Sequence
10
Building a Sequence
Sender Accounts and Settings
11
Sender Accounts and Settings
Campaign Analytics and Actions
12
Campaign Analytics and Actions
Replies and Routing
13
Replies and Routing
Global Analytics
14
Global Analytics
Global Inbox
15
Global Inbox
Automating Campaign Events
16
Automating Campaign Events
Sequencer in Workflows
17
Sequencer in Workflows
Create a Campaign with the Agent Plugin
17
Create a Campaign with the Agent Plugin

Learn and master Clay with Clay university

Featured in Clay University

All courses
/
Email Sequencer
/
Create a Campaign with the Agent Plugin
Lesson
17
/
17
About this lesson
00:00

Create a Campaign with the Agent Plugin

By the end of this lesson you'll be able to build the same campaign as the previous lesson from your own AI tool instead of the Clay UI. Same prompt, same workflow campaign, driven through the Clay Agent Plugin.

This works the same way in Claude, Codex, ChatGPT, or any other tool you already use. Note: there is still some back and forth between your AI tool and Clay while we iron out the rough edges.

🔌 Set Up the Agent Plugin

The demo here runs in Claude Code with the Clay Agent Plugin installed. Setup is a one-time job and it isn't covered on camera, so if you've never installed it, start with the Clay Agent Plugin (API & CLI) doc in Clay University.

Two things to check before you prompt anything:

  1. Confirm the plugin is installed by dropping the setup instructions into your tool, e.g. *Set up the Clay plugin by following the steps in https://github.com/clay-run/agent-plugins*
  2. Confirm you're on the correct workspace if you have more than one.

Getting all of this in place takes a little time on the first run, so the walkthrough below picks up with setup already done.

✍️ The Prompt

This is essentially the same prompt from the previous lesson, with one deliberate change: the campaign gets a different name, so we can watch the plugin build a new Workflow instead of reusing the one Sculptor already made.

The prompt covers five things:

  • The list. A list of emails in the Safe-to-send list. These are fake contacts, so nothing reaches a real person.
  • The campaign and the sender. Create a new campaign that emails this list from a named sender account.
  • The enrichment. Run an enrichment, and once it's done, have the campaign ask each person their favorite coffee shop at that location.
  • The node. Create the campaign using the Enroll in campaign node.
  • The campaign name. The workflow campaign has already been started, and it's called Agent Plugin Coffee New York City Campaign.

The campaign named in that last line has to exist in Clay before you send the prompt.

🧱 Create the Workflow Campaign First

You have to switch over to Clay and create the campaign before you send the prompt. The plugin references a campaign that already exists. It does not create one from nothing.

To build the shell:

  1. Go to Campaigns and create a new campaign
  2. Select the workflow campaign type - you need this specific type for the campaign to run via the API, the CLI, or the Agent Plugin
  3. Rename it to the exact name you used in the prompt
  4. Save

The campaign only needs to exist as a draft at this point. You launch it later.

🤖 What the Plugin Built

Send the prompt and the plugin works through the steps in order. It identifies the sender account, finds the draft campaign, and lays out the steps it intends to take before it builds anything.

Two things to read in its output:

  • It built a new Workflow rather than reusing the old one from the Sculptor lesson. That's what the name change was for.
  • It reused the email copy from that campaign instead of writing new copy. That's fine for a test. If you want something different, ask it to draft new copy.

🔗 Launch the Campaign So Enrollment Can Bind

Then you hit the blocker: the campaign has to be launched before enrollment can work. A draft campaign can't accept enrollments, so the plugin stops and waits.

Go back into the campaign, click Launch campaign, then return to your AI tool and tell it you've launched. It re-checks and confirms the campaign is active with an eligible list.

That's the full order of operations, and it's the same one from the previous lesson: create the campaign as a draft, name it in the prompt, then launch it before the enrollment step can bind. Nothing in a prompt can launch a campaign for you.

✅ Test With One Record

Once the campaign is active, the plugin asks whether to enroll all 192 people in the Safe-to-send list or run a test first.

Test first. Publish, then test with one record. Ours worked end to end.

🔍 Verify It in Clay

Everything the plugin built is visible in the UI:

  1. Go to your Workflows and find the one it created, named for the campaign it enrolls into
  2. Open the Workflow to confirm it's enrolling into the right campaign
  3. Check the runs to see the single test record
  4. Open the campaign's analytics to see that one lead processed, enrolled, and completed

From there you can send to the rest of the list, change the email, or keep iterating.

🚀 What's Next

The goal here is for you to use every Clay feature from the tools you're already in every day. This is new and still moving, so be specific in your prompts, test with one record before you send to a list, and check the Clay Agent Plugin (API & CLI) doc as it grows.

Next up
Email Sequencer

View next lesson