Get the FREE Ultimate OpenClaw Setup Guide →

Lemlist Automation

Scanned
npx machina-cli add skill ComposioHQ/awesome-claude-skills/lemlist-automation --openclaw
Files (1)
SKILL.md
5.0 KB

Lemlist Automation

Automate your Lemlist multichannel outreach workflows -- manage campaigns, enroll leads at scale, enrich with custom variables, export campaign data, and clean up unsubscribes.

Toolkit docs: composio.dev/toolkits/lemlist


Setup

  1. Add the Composio MCP server to your client: https://rube.app/mcp
  2. Connect your Lemlist account when prompted (API key authentication)
  3. Start using the workflows below

Core Workflows

1. List and Discover Campaigns

Use LEMLIST_GET_LIST_CAMPAIGNS to enumerate all campaigns by status, with pagination support.

Tool: LEMLIST_GET_LIST_CAMPAIGNS
Inputs:
  - status: "running" | "draft" | "archived" | "ended" | "paused" | "errors" (optional)
  - limit: integer (max 100, default 100)
  - offset: integer (pagination offset)
  - sortBy: "createdAt"
  - sortOrder: "asc" | "desc"

Important: The response may be wrapped as {campaigns: [...], pagination: {...}} instead of a flat list. Always extract from the campaigns key.

2. Get Campaign Details

Use LEMLIST_GET_CAMPAIGN_BY_ID to validate campaign configuration before writes.

Tool: LEMLIST_GET_CAMPAIGN_BY_ID
Inputs:
  - campaignId: string (required) -- e.g., "cam_A1B2C3D4E5F6G7H8I9"

3. Enroll Leads into a Campaign

Use LEMLIST_POST_CREATE_LEAD_IN_CAMPAIGN to add leads with optional email finding, phone lookup, and LinkedIn enrichment.

Tool: LEMLIST_POST_CREATE_LEAD_IN_CAMPAIGN
Inputs:
  - campaignId: string (required)
  - email: string (required)
  - firstName, lastName, companyName, companyDomain: string (optional)
  - jobTitle, phone, linkedinUrl, icebreaker: string (optional)
  - deduplicate: boolean (prevents cross-campaign duplicates)
  - findEmail, findPhone, verifyEmail, linkedinEnrichment: boolean (optional)
  - timezone: string (IANA format, e.g., "America/New_York")

Bulk pattern: Chunk leads into batches of ~50 and checkpoint progress between batches.

4. Add Custom Variables to a Lead

Use LEMLIST_POST_ADD_VARIABLES_TO_LEAD to enrich leads with personalization fields after enrollment.

Tool: LEMLIST_POST_ADD_VARIABLES_TO_LEAD
Inputs:
  - leadId: string (required) -- internal Lemlist lead ID (NOT email)
  - company: string (required) -- must match your company name in Lemlist
  - variables: object (required) -- key-value pairs, e.g., {"score": "42", "color": "yellow"}

Important: This is NOT an upsert -- attempting to add variables that already exist will fail. Resolve the internal leadId via LEMLIST_GET_RETRIEVE_LEAD_BY_EMAIL if you only have the email address.

5. Export Campaign Leads

Use LEMLIST_GET_EXPORT_CAMPAIGN_LEADS to download leads with state filtering for reporting or QA.

Tool: LEMLIST_GET_EXPORT_CAMPAIGN_LEADS
Inputs:
  - campaignId: string (required)
  - (supports state filtering and JSON/CSV output)

6. Unsubscribe Lead from Campaign

Use LEMLIST_DELETE_UNSUBSCRIBE_LEAD_FROM_CAMPAIGN to stop outreach by removing a lead from a campaign.

Tool: LEMLIST_DELETE_UNSUBSCRIBE_LEAD_FROM_CAMPAIGN
Inputs:
  - campaignId: string (required)
  - leadId or email: string (required)

Known Pitfalls

PitfallDetail
Wrapped campaign listLEMLIST_GET_LIST_CAMPAIGNS may return {campaigns: [...], pagination: {...}} instead of a flat array. Always extract from the campaigns key.
Cross-campaign deduplicationLEMLIST_POST_CREATE_LEAD_IN_CAMPAIGN with deduplication enabled fails with HTTP 500 "Lead already in other campaign" -- disable deduplication for intentional cross-campaign enrollment.
Bulk import failuresChunk bulk imports to ~50 per batch with checkpoints to avoid losing partial progress on intermittent failures.
Invalid leadIdLEMLIST_POST_ADD_VARIABLES_TO_LEAD returns HTTP 400 "Invalid leadId" when using an email as the leadId -- resolve the internal ID via LEMLIST_GET_RETRIEVE_LEAD_BY_EMAIL first.
Variable collisionsLEMLIST_POST_ADD_VARIABLES_TO_LEAD is not an upsert. Adding keys that already exist returns HTTP 400 "Variables X already exist".

Quick Reference

Tool SlugDescription
LEMLIST_GET_LIST_CAMPAIGNSList all campaigns with status filter and pagination
LEMLIST_GET_CAMPAIGN_BY_IDGet detailed campaign info by ID
LEMLIST_POST_CREATE_LEAD_IN_CAMPAIGNCreate and enroll a lead into a campaign
LEMLIST_POST_ADD_VARIABLES_TO_LEADAdd custom personalization variables to a lead
LEMLIST_GET_RETRIEVE_LEAD_BY_EMAILLook up a lead by email address
LEMLIST_GET_EXPORT_CAMPAIGN_LEADSExport leads from a campaign with state filtering
LEMLIST_DELETE_UNSUBSCRIBE_LEAD_FROM_CAMPAIGNRemove a lead from a campaign

Powered by Composio

Source

git clone https://github.com/ComposioHQ/awesome-claude-skills/blob/master/composio-skills/lemlist-automation/SKILL.mdView on GitHub

Overview

Automate Lemlist multichannel outreach through the Composio MCP integration. Manage campaigns, enroll leads at scale, enrich with custom variables, export campaign data, and handle unsubscribes efficiently.

How This Skill Works

The skill exposes Lemlist workflows via MCP tools to perform end-to-end outreach tasks. Core workflows include listing campaigns (LEMLIST_GET_LIST_CAMPAIGNS), validating campaign config (LEMLIST_GET_CAMPAIGN_BY_ID), enrolling leads into campaigns (LEMLIST_POST_CREATE_LEAD_IN_CAMPAIGN) with optional enrichment, adding personalization variables (LEMLIST_POST_ADD_VARIABLES_TO_LEAD), exporting campaign leads (LEMLIST_GET_EXPORT_CAMPAIGN_LEADS), and unsubscribing leads (LEMLIST_DELETE_UNSUBSCRIBE_LEAD_FROM_CAMPAIGN). Bulk enrollments are processed in batches (~50 leads) with progress checkpoints to ensure reliability.

When to Use It

  • You need to audit or discover campaigns across statuses (running, draft, archived, ended, paused, errors).
  • You’re onboarding or enrolling a large list of leads into a campaign with optional email/phone finding and enrichment.
  • You want to attach personalized variables to leads after enrollment for targeted outreach.
  • You must export campaign leads for QA, reporting, or analytics.
  • You need to unsubscribe or remove a lead from a campaign to respect opt-outs.

Quick Start

  1. Step 1: Add the Composio MCP server to your client: https://rube.app/mcp
  2. Step 2: Connect your Lemlist account when prompted (API key authentication)
  3. Step 3: Start using the workflows below

Best Practices

  • Validate campaigns before any write by using LEMLIST_GET_CAMPAIGN_BY_ID to confirm configuration.
  • Be mindful of cross-campaign deduplication; disable deduplication when intentional cross-campaign enrollment is required.
  • When adding variables, use the internal leadId (not email); if you only have an email, retrieve leadId with LEMLIST_GET_RETRIEVE_LEAD_BY_EMAIL.
  • Handle wrapped responses from LEMLIST_GET_LIST_CAMPAIGNS by always extracting the campaigns array from the campaigns key.
  • Chunk large enrollments into ~50-lead batches and checkpoint progress between batches for reliability.

Example Use Cases

  • Onboard a new list of prospects into a multi-step Lemlist sequence with enrichment (email, phone, LinkedIn) and then personalize messages with custom variables.
  • Run a regular campaign health check by listing campaigns, validating configuration, and exporting leads for QA.
  • Add dynamic variables (e.g., score, segmentation tag) to each enrolled lead to tailor follow-ups.
  • Export campaign leads to a CSV for monthly KPI dashboards and stakeholder reporting.
  • Immediately unsubscribe a lead who opted out to ensure compliance and avoid further outreach.

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers