Skip to main content

Get started with Twain and Clay

How to connect Twain to Clay, pay with Twain or Clay credits, pass signals as custom variables, add follow-ups, A/B test, and get the messages into your tools.

Note: The videos in this article show an earlier version of the setup. The Clay action is now called Deep research and outreach copy, and personas are set on your agent. Follow the written steps for the current flow.

Which Clay action to use

In your Clay table, click Add enrichment, search for Twain and pick Deep research and outreach copy. You choose the research depth (Base, High or Ultra) right in the action.

Older tables may still use Twain's previous Clay action, which stops after 200 seconds and can't run Ultra. If you see the error "Switch this column to Twain's newer Clay integration", delete that Twain column and add Deep research and outreach copy instead.

This guide covers the standard setup: Twain writes the messages, and they come back into your Clay table. Want every new Clay row to flow into Twain automatically instead? See How to Auto-Push Leads from Clay into a Twain Automation.

Campaign Setup

How do I create a campaign for Clay leads?

  1. Create the campaign: In Twain, create a new campaign and choose Clay – Enrich table as your lead source.

  2. Pick your agent: Personas, research rules and writing style live on your agent, not on the campaign. Set them up there once and reuse them across campaigns. See How Twain Agents Work.

  3. Add context: In the Context step, tell Twain what to focus on in its research (e.g. "Look for recent podcast appearances but ignore news older than 6 months").

  4. LinkedIn URL recommended: For person-level research, pass a LinkedIn profile URL. With only a work email, Twain researches at company level.

How do I connect the two platforms?

Once the campaign is created, click Copy Campaign ID on the campaign's empty state (or use the … menu → Copy ID → Campaign ID). In your Clay table, add the Deep research and outreach copy enrichment, paste the ID and pick a mode.

You can pay in two ways:

  • With your Twain API key (sidebar menu → API key): Twain bills your Twain credits: 1 credit for Base, 2 for High, 8 plus 2 per sequence step for Ultra.

  • With Clay credits: billed in Clay, 12 Clay credits per row. Ultra isn't available with Clay credits. Use your own Twain API key for Ultra.

How do I pay with Clay credits?

  1. Add the Deep research and outreach copy action in your Clay table.

  2. Choose Clay credits as the billing option. Instead of a campaign dropdown, you'll see a text field for your Twain campaign ID.

  3. Paste the campaign ID and choose Base or High.

  4. Run the enrichment. You get the same output as with Twain credits: personalized messages, subject lines and research.


Advanced Custom Variables (Multi-Signal)

How do I pass complex signals (like G2 intent) from Clay to Twain?

The integration supports Multiple Custom Variables. This is essential for "Multi-Signal" campaigns where you have data points like G2_Visits, Pricing_Page_Hits, and Current_Tech_Stack.

What is the "Custom Variable Description" and why is it vital?

When you map a column like G2_Visits, Twain might only see the value 3. The Description field provides the AI with context:

  • Variable Value: {{G2_Visits}}

  • Variable Description: "This represents the number of times members of the prospect's organization visited our G2 comparison page." This ensures the AI doesn't "hallucinate" and claim the specific prospect visited the page if the data is only account-level.

The "They" vs. "Someone" Rule

  • Avoid Pronouns: Avoid using "they" or "you" in your descriptions. This prevents the AI from "hallucinating" and claiming the specific prospect visited a page when the data is only account-level.

  • The Gold Standard: Instead of "Number of times they visited," use "Number of times someone from the organization visited...".

  • Contextual Anchoring: Clearly define what the data represents (e.g., visits to a "Pricing" page) so the AI stays grounded in verified facts.


The "Twain-First" Editing Workflow

Why shouldn't I regenerate messages directly in Clay?

Efficiency and cost. Regenerating via Clay runs a new paid generation every time. In the Twain web app, regenerating a single lead in the same mode is free. Switching to a higher mode charges that mode's price.

What is the best workflow for saving credits?

  1. Push Samples: Run 3 to 5 leads in Clay to "push" the data to Twain.

  2. Refine in Twain (FREE): Go into the Twain UI. Use the free regeneration loop to refine your frameworks and agent instructions until the samples look perfect.

  3. Bulk Run: Once satisfied, go back to Clay and run the rest of the list.

How do I use the "Suggest" tool in the framework editor?

Open a step's framework and click Suggest (top right). Pick the data points you want in that message (e.g. a G2 visit in Message 1, the tech stack in the follow-up), then click Generate Framework.

Can I force Twain to use my own proven copy?

Yes, using the Verbatim (Quote) feature. Wrap specific text (like a CTA) in quotes in the framework editor, and the AI will generate personalization around it.


Follow-ups and LinkedIn Steps

How do I add follow-ups or LinkedIn messages?

Twain can generate up to 9 steps per sequence, combining email, LinkedIn connect requests and LinkedIn messages.

  1. Find the campaign: In Clay, check which Twain campaign your Deep research and outreach copy column points to, and open that campaign in Twain.

  2. Add a step: In the campaign, click Add Step and pick the channel, e.g. a LinkedIn follow-up or a LinkedIn connect request note.

  3. Rerun in Clay: Back in Clay, rerun the enrichment for the leads that need the new step. Twain now returns the additional messages.

  4. Map the new columns: Create columns in Clay for the added steps and push them to your tools (see below).

‼️ Rerunning costs credits. Unlike the web app, where re-generating a lead in the same campaign and mode is free, a rerun in Clay sends a new request to Twain and is charged again at the cost of the mode in that request. Only rerun the rows you actually need the extra steps for.

What do extra steps cost?

On Base and High, the cost is per lead, not per step. A nine step sequence costs the same as a three step one: 1 credit per lead on Base, 2 on High.

On Ultra, the cost is per message step, because Twain plans each step separately. Ultra costs 10 credits for the first step and 2 for each step after, so a longer sequence does cost more. See How Modes Work: Base, High, and Ultra.

Tips for multi-step sequences

  • LinkedIn: Twain automatically respects LinkedIn character limits for connection requests.

  • Logic: Use instructions like "Never mention the same insight used in Message 1" in follow-up frameworks to avoid repetition.


A/B Testing

How do I A/B test message steps and CTAs?

  1. Duplicate the campaign: In the Twain sidebar, open the campaign's … menu and click Duplicate. Campaign A keeps the original sequence, campaign B gets the variation (a new CTA, a PS line, a different opener).

  2. Edit the step: In campaign B, hover over the step and click the Edit framework icon. Change the CTA, add a PS line, or use Verbatim text for a sentence Twain should keep word for word.

  3. Check samples: Save and regenerate a few leads in Twain to check the result. Regenerating in the same mode is free.

  4. Run in Clay: Point a Deep research and outreach copy column at each campaign and run it for its half of the leads. Rerunning rows in Clay is charged again, so only rerun the leads you need for the test.

  5. Compare: Send each version to its half of the list and compare opens, replies and conversions.

✅ Pro Tip: A/B testing lets you experiment with CTAs, social proof, messaging style, and sequence length to optimize your outreach.


Getting the Messages into Your Tools

Can I export directly from Twain?

Yes, and it's often the simplest way. In Twain, open the campaign and click Export to send leads directly to Instantly, Lemlist, Smartlead, HeyReach, HubSpot, Salesforce, Apollo and more. You can turn on Skip leads with warnings to leave flagged leads out.

How do I push Twain messages from Clay to my CRM or outbound tool?

  1. Map custom fields: In the Deep research and outreach copy action, map each message step to a custom field and give it a clear name, so it's easy to find in your destination tool.

  2. Push to your tools: Emails go to Instantly, Smartlead, Lemlist or similar. LinkedIn steps go to HeyReach or other LinkedIn tools. In HubSpot and Apollo, the fields are called custom properties.

  3. Add your signature in the destination tool if needed.

  4. Test first: Always send a test before running the full campaign, and check that variables and formatting look right.

What do the "Warnings" in the Clay table mean?

Twain performs a "health check." If research is thin or a persona doesn't match, it flags a Warning. Filter these out in Clay before pushing to your sequencer (Smartlead, Instantly, etc.). When you export from Twain directly, you can turn on Skip leads with warnings to leave them out automatically.


Troubleshooting & Technical Notes

  • Real-Time Sync: There is no "live" sync. If you edit a framework in Twain, you must Rerun those rows in Clay to pull the updated copy.

  • The "Twain Link" Column: Every row in Clay generates a unique Twain URL. Click this to manually review research sources or edit a specific message before pushing it to your CRM.

  • Timeout Errors: If a row fails or times out, simply select it in Clay and click Rerun.

Did this answer your question?