Use this if you want Twain to process every new Clay row automatically. If you want the messages back in your Clay table, use Get started with Twain and Clay instead.
What this is
If you're building your lead list in Clay and want Twain to research and write sequences automatically as you add rows, this is the setup. Instead of pulling leads into a campaign manually, you set up a Twain automation with an API trigger and connect it to your Clay table via an Automation ID. Every row you run in Clay pushes the lead straight into Twain.
This is different from the standard Clay enrichment flow (where you use a Campaign ID inside the Clay action). With an automation, Clay drives the trigger, and Twain handles everything from there.
Note: This video shows an earlier version of the setup, when automations were called Workflows and had their own menu item. Automations now live on the campaign. Follow the written steps below for the current flow.
Step 1: Set up an automation in Twain
Open the campaign the leads should flow into. The campaign's agent and brief tell Twain what to research and write.
In the Automation row under Agent, click Setup. The Automation Builder opens.
In the Import step, choose API – Custom trigger as the lead source.
Pick the mode: Generate in Base, High or Ultra. Credits are charged per lead according to the mode (Base 1, High 2, Ultra 8 plus 2 per step).
In the Export step, choose where processed leads should be pushed, or skip it if leads should stay in Twain. Click More for the full list, including HeyReach, HubSpot, Instantly, Lemlist, Salesforce, Salesforge, Smartlead and Attio.
In Notifications, turn on Send email or Notify on Slack if you want updates on processed leads.
Finish the setup.
In the automation panel you'll then find:
Copy Automation ID: you'll need it in Clay
Get Clay Template: opens a pre-configured Clay template
Read API Docs: for custom setups beyond Clay
Watch Tutorial: the setup video
Step 2: Set up Clay
Click Get Clay Template in the automation panel to open the Clay template.
In the template:
Find the Twain enrichment column.
Paste your Automation ID into the configuration.
Map your LinkedIn Profile URL (required for individual-level research) and Email (optional).
Save.
Step 3: Run
Hit run in Clay. Leads appear in your Twain campaign within a few seconds. Click into any lead to see the research and the generated sequence.
Need a custom setup?
If you're not using Clay, you can push leads via the Twain API directly. Open the menu at the bottom of the sidebar and click API key, then open the API documentation and find the endpoint for adding contacts to an automation (called workflow in the API).
