Learn and master Clay with Clay university
Featured in Clay University
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:
- 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*
- 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:
- Go to Campaigns and create a new campaign
- Select the workflow campaign type - you need this specific type for the campaign to run via the API, the CLI, or the Agent Plugin
- Rename it to the exact name you used in the prompt
- 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:
- Go to your Workflows and find the one it created, named for the campaign it enrolls into
- Open the Workflow to confirm it's enrolling into the right campaign
- Check the runs to see the single test record
- 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.



