InTouch Hub · Blue Isle Software

lemlist

Run cold-email campaigns and manage leads and sequences in lemlist via the lemlist REST API. Reads team and campaign data, lists campaign leads, and adds or removes leads from a campaign.

Provided free and as is, without warranty of any kind — including merchantability, fitness for a particular purpose, and the accuracy or completeness of any result. See the licence. You are responsible for checking what this produces before relying on it.

crm-salesemailexportleadlogstatus

lemlist

Run cold-email campaigns and manage leads and sequences in lemlist directly from InTouch. This tool wraps the lemlist REST API so jobs and the AI assistant can read team and campaign data and add or remove leads from a campaign.

It is a self-contained Python tool (Python standard library only — no third-party packages) that talks to https://api.lemlist.com/api.

What it does

Branch on the operation input. Every call returns a JSON envelope:

On bad input or a transport failure it instead returns {"error": "..."} and exits non-zero so the surrounding job step fails.

Operations

operation HTTP call required inputs notes
get_team GET /team Your team / account info.
list_campaigns GET /campaigns Optional limit (default 100), page (default 1).
list_campaign_leads GET /campaigns/{campaignId}/export/leads campaignId Exports the leads in a campaign.
get_lead GET /leads/email/{email} email Look up a single lead by email.
add_lead_to_campaign POST /campaigns/{campaignId}/leads/{email} campaignId, email Optional firstName, lastName, companyName.
remove_lead_from_campaign DELETE /campaigns/{campaignId}/leads/{email} campaignId, email Unsubscribes / removes the lead.

Inputs

input required description
apiKey yes Your lemlist API key.
operation yes One of the operations above.
campaignId for campaign ops Campaign id, e.g. cam_xxxxxxxx.
email for lead ops Lead email address.
limit no Max results for list_campaigns (default 100).
page no Page number for list_campaigns (default 1).
firstName no Lead first name for add_lead_to_campaign.
lastName no Lead last name for add_lead_to_campaign.
companyName no Lead company name for add_lead_to_campaign.

API key setup

  1. Log in to lemlist.
  2. Go to Settings → Integrations → API (or open https://app.lemlist.com/settings/integrations).
  3. Generate / copy your API key.
  4. Pass it to the tool as apiKey.

Authentication detail

lemlist uses HTTP Basic authentication with a twist: the username is always empty and the password is your API key. This tool builds the credential string ":<apiKey>", base64-encodes it, and sends it as Authorization: Basic <encoded>. A single API key is all that is needed — no OAuth or token exchange.

Examples

List the first page of campaigns:

{
  "apiKey": "YOUR_LEMLIST_API_KEY",
  "operation": "list_campaigns",
  "limit": "50",
  "page": "1"
}

Add a lead to a campaign:

{
  "apiKey": "YOUR_LEMLIST_API_KEY",
  "operation": "add_lead_to_campaign",
  "campaignId": "cam_aBcDeFg",
  "email": "[email protected]",
  "firstName": "Jane",
  "lastName": "Doe",
  "companyName": "Example Inc"
}

Look up a lead by email:

{
  "apiKey": "YOUR_LEMLIST_API_KEY",
  "operation": "get_lead",
  "email": "[email protected]"
}

Remove a lead from a campaign:

{
  "apiKey": "YOUR_LEMLIST_API_KEY",
  "operation": "remove_lead_from_campaign",
  "campaignId": "cam_aBcDeFg",
  "email": "[email protected]"
}

Notes

Publishes

The keys a later task may reference as {{taskName.key}}. Referencing anything not listed here resolves to nothing at run time.

Input Properties

Every property this tool accepts, from its own tool.iml.

Property Type Required Default Description
apiKey string yes DEPRECATED — bind an API Key credential to the task with credentialName instead. A key pasted here is stored in the workflow definition in clear and appears in every export of it. Still honoured for workflows built before the change.
operation string yes One of: get_team, list_campaigns, list_campaign_leads, get_lead, add_lead_to_campaign, remove_lead_from_campaign
campaignId string no Campaign id (e.g. cam_xxx). Required for list_campaign_leads, add_lead_to_campaign, and remove_lead_from_campaign.
email string no Lead email address. Required for get_lead, add_lead_to_campaign, and remove_lead_from_campaign.
limit string no Max number of results for list_campaigns (maps to lemlist 'limit', default 100).
page string no Page number for list_campaigns pagination (maps to lemlist 'page', default 1).
firstName string no Lead first name for add_lead_to_campaign (optional).
lastName string no Lead last name for add_lead_to_campaign (optional).
companyName string no Lead company name for add_lead_to_campaign (optional).