n8n

How to Automate Lemlist HubSpot Lead Management?

Handle replies from email outreach in seconds. Sales teams get instant next steps while marketing lists stay clean. Best for teams that use Lemlist and track deals in HubSpot.

When a lead replies, an app event from Lemlist starts the flow. OpenAI reads the message and returns one label: Unsubscribe, Interested, or Out of Office. A Merge keeps the original data and the AI result together, then a Switch routes the path. Unsubscribe removes the lead from the Lemlist campaign. Interested marks the lead as interested, finds the HubSpot contact by email, creates a deal, and posts a Slack alert with the deal link. Out of Office finds the contact and creates a HubSpot task to follow up later. A fallback sends a Slack note so nothing is lost.

You need HubSpot, Lemlist, Slack, and OpenAI accounts plus n8n credentials. Expect faster handoffs, fewer mistakes, and more deals created without extra work. Common uses are SDR inbox triage, quick routing for busy teams, and clean unsubscribe handling. Setup is simple once credentials are connected and IDs are mapped, like the Lemlist campaign ID and HubSpot deal stage.

What are the key features?

  • Lemlist lead replied trigger starts the flow the moment someone answers your email.
  • OpenAI classifies the message as Unsubscribe, Interested, or Out of Office with a single word output.
  • Switch node routes each label to the right actions so nothing is mixed up.
  • Automatic unsubscribe in Lemlist to respect lead preferences.
  • Mark interested in Lemlist through a direct API call for proper campaign tracking.
  • HubSpot contact lookup by email and deal creation with the correct stage and association.
  • Slack alert for interested leads with a direct link to the new HubSpot deal.
  • Out of Office handling creates a HubSpot follow up task tied to the contact.
  • Fallback Slack notification so unclassified replies are still visible to the team.

What are the benefits?

  • Reduce manual reply triage from 2 hours a day to 10 minutes
  • Cut first response time to interested leads to under 5 minutes
  • Improve CRM data accuracy by matching contacts via email
  • Connect Lemlist, HubSpot, Slack, and OpenAI in one flow
  • Handle up to 10 times more replies without adding headcount

How do you set it up?

  1. Import the template into n8n: Create a new workflow in n8n > Click the three dots menu > Select 'Import from File' > Choose the downloaded JSON file.
  2. You'll need accounts with HubSpot, Lemlist, Slack and OpenAI. See the Tools Required section above for links to create accounts with these services.
  3. In the n8n credentials manager, create a Lemlist API credential. Copy your API key from your Lemlist account API page and paste it into the credential. Name it clearly, for example Lemlist Team API.
  4. Open the Lemlist Lead Replied trigger node and select your Lemlist credential in the Credential to connect with dropdown. Save and execute once to let Lemlist register the webhook. Send a test reply from a Lemlist lead to confirm it fires.
  5. Open the OpenAI node. In the credentials dropdown, click Create new credential, paste your OpenAI API key, and save. Set the prompt so the output is only one word: Unsubscribe, Interested, or Out of Office.
  6. Check the Merge node is set to combine by position and prefer input1 values. Leave as is if already configured.
  7. Open the HTTP Request node that marks a lead as interested. Replace YOUR_CAMPAIGN_ID in the URL with your real Lemlist campaign ID. Make sure the Lemlist API credential is selected.
  8. In the HubSpot credentials manager, create a HubSpot OAuth2 credential. Follow the on screen login and approve scopes for contacts, deals, and engagements. Use a clear name like HubSpot Prod OAuth.
  9. Open the HubSpot Get contact ID nodes and confirm the email field maps to leadEmail. Keep first and last name fields if you want HubSpot to enrich the contact.
  10. Open the HubSpot Create Deal node and set the pipeline stage to the correct stage ID for your account. Adjust the deal name format if needed. Ensure associatedVids uses the contact ID from the previous node.
  11. Open both Slack nodes. Choose your Slack OAuth2 credential, select the target channels, and edit the message text if needed. Post a test message to confirm access.
  12. Run live tests for each path: send a reply saying Unsubscribe, one showing clear interest, and one with an out of office message. Verify unsubscribe in Lemlist, new deal in HubSpot with a Slack alert, and a HubSpot task for out of office.
  13. Troubleshoot: if the interested call fails, check the Lemlist campaign ID and API key. If HubSpot steps fail, confirm scopes and that the contact exists. If Slack does not post, reauthorize the app and check channel permissions. If labels look wrong, tighten the OpenAI prompt and confirm the Switch checks $json.text exactly.

Tools Required

$24 / mo or $20 / mo billed annually to use n8n in the cloud. However, the local or self-hosted n8n Community Edition is free.

HubSpot

Sign up

Free: $0 / mo; API access included (private app or OAuth). Limits on Free: 250,000 API calls/day and 100 requests per 10 seconds per private app.

Lemlist

Sign up

Email Pro: from $55 / mo (annual) or $69 / mo; includes API access (lowest plan usable with n8n via API)

OpenAI

Sign up

Pay-as-you-go: GPT-5 at $1.25 per 1M input tokens and $10 per 1M output tokens

Slack

Sign up

Free plan: $0 / mo; limited to 10 apps (third-party or custom) and usable via Slack API

Similar Templates

Join Futurise to access 1,200+ automation templates

Get instant access to ready-made automation workflows for n8n, Make.com, AI agents, and more. Download, customise, and deploy in minutes.