# Enroll Airtable leads into a personalized Mailshake campaign

> When a new lead lands in Airtable, research the company, write a personal opener, and enroll them into Mailshake with real merge fields.

- Workflow type: agent
- Services: Airtable, Mailshake
- Categories: Sales
- Published: 2026-07-11

## What it does

- Watches your Airtable leads table and enrolls each new row into a chosen Mailshake sequence automatically.
- Researches the lead's company before enrollment and drafts a personalized first line plus a short reason for reaching out.
- Sends both personalized lines to Mailshake as custom merge fields so the first email reads specific to that person, not templated.
- Writes the Mailshake recipient id, campaign, enrollment status, and the exact personalized lines back to the Airtable row so your team can see what was sent.
- Skips leads with no email or too little to personalize honestly, and flags those for manual review instead of adding a weak note.

## What you'll need

- An Airtable base with a leads table that has at least an email column, plus any of name, company, title, LinkedIn, or website.
- A Mailshake account with the target campaign already set up and paused or ready to send.
- Two merge tags in your Mailshake campaign template, one for the personalized opener and one for the reason we're reaching out.

## Prompt

Build an agent workflow that enrolls new leads from an Airtable table into a designated Mailshake campaign with a personalized first line, instead of a raw cold add.

Trigger: poll Airtable for new records (event type new_record) on the leads table in a base I will configure. On setup, prompt me for the Airtable base id, table name, the Mailshake campaign id, and let me override the Airtable field names that hold email, name, company, title, and linkedin/website URL.

For each new lead row the agent should:

1. Read the row's name, email, company, title, and linkedin/website fields. If there is no email, do not enroll. Use Airtable Update Record to set the row's status field to skipped_no_email and stop.

2. Do a quick web research pass on the company (recent news, product focus, funding, launches, or hiring signals) to find a specific hook worth mentioning. If nothing specific surfaces and the row is too thin to personalize honestly, do not enroll. Use Airtable Update Record to set the status field to needs_review and stop.

3. Draft two short merge values: a one-sentence personalized opener that references the specific hook (never generic), and a short reason we're reaching out line that ties our value prop to what they seem to care about. Both should read like a human wrote them for this exact person.

4. Call Mailshake Add Recipients on the target campaign, passing the email plus those two values as custom merge fields (for example first_line_opener and personalized_reason). Then call Mailshake Get Add Recipients Status and poll it until the async add job reports isFinished true, so we can capture the per-recipient outcome and the resulting Mailshake recipient id.

5. Use Airtable Update Record to write back to the same row: the Mailshake recipient id, the campaign name, the two personalized lines that were sent, and an enrollment status (enrolled, needs_review, skipped_no_email, or an error string from Mailshake such as duplicate or unsubscribed). The Airtable row is the source of truth for what actually went out.

Rules to bake in: never enroll a lead without a genuine hook, never write a templated opener, respect Mailshake's async add pattern by always polling status before writing results back, and always log the outcome to Airtable even for skipped rows so nothing is silently dropped.

## How to customize

- Point it at a different Airtable base, table, or view (for example, only rows marked ready to send).
- Swap in your own tone, industry angle, or product context so the personalized openers match your brand voice.
- Change which fields get written back to Airtable, or route different lead segments to different Mailshake campaigns using a campaign field on the row.

## FAQ

### Will this work if my leads table is missing some fields?

Yes. The only field required is an email address. If company, title, or LinkedIn is missing, the agent does the best research it can, and if the row is too thin to write something honest it flags the lead as needs_review instead of enrolling with a weak note.

### Can I enroll leads into more than one Mailshake campaign?

You can. Add a campaign column to your Airtable table and tell the agent to read it. Out of the box, every new row is enrolled into the single campaign you pick during setup.

### How does the personalization actually make it into the email?

The agent drafts two short lines per lead and sends them to Mailshake as custom merge fields. Your campaign template just needs to reference those merge tags in the first email, and Mailshake fills them in for each recipient.

### What happens if Mailshake is still processing the add when we're done?

The workflow waits until Mailshake confirms the recipient is fully added, then writes the recipient id and status back to Airtable. If Mailshake reports an error, like a duplicate or unsubscribed address, that message is logged to the row so you can see why.

### Will existing rows in my Airtable table get enrolled?

No. The trigger only fires on new rows added after the workflow starts running, so leads already in your table are left alone.

Use this prompt in General Input: https://www.generalinput.com/prompts/enroll-airtable-leads-into-a-personalized-mailshake-campaign