Automated Lemlist Reply Categorization and HubSpot Sync - n8n Workflow

Use an advanced n8n workflow to categorize Lemlist email replies using OpenAI, automatically manage leads in HubSpot (create deals/tasks), and send instant Slack alerts. Leverage these powerful n8n templates.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

Sales Development Representatives (SDRs) and Account Executives (AEs).
Marketing teams running cold outreach campaigns with Lemlist.
Operations specialists looking for robust n8n templates for sales automation.
Users needing to leverage an advanced n8n workflow for AI-driven lead routing.

Overview

This comprehensive automation solves the crucial problem of manually sorting and acting upon campaign replies. When a lead responds to a Lemlist campaign, this specialized n8n workflow instantly analyzes the email content using an advanced OpenAI n8n node. Based on the categorization (Interested, Out of Office, Unsubscribe, or Other), the n8n workflow executes precise actions: updating lead status in Lemlist, creating deals or tasks in HubSpot, and notifying the sales team via Slack. This powerful n8n template ensures rapid, accurate response management, dramatically improving sales efficiency and follow-up quality. The flexibility of this n8n workflow makes it an essential tool for high-volume outreach.

How it Works


  1. The process begins with the Lemlist n8n trigger, specifically monitoring the emailsReplied event, initiating the n8n workflow instantly when a reply is received.

  2. The raw email reply body is passed to the OpenAI n8n node, which classifies the intent into one of four predefined categories: Interested, Unsubscribe, Out of Office (OOO), or Other. This leverages the AI capabilities within the n8n node for smart classification.

  3. A Merge n8n node combines the original Lemlist lead data with the AI's categorization result, ensuring all necessary data is available downstream.

  4. The Switch n8n node routes the data flow based on the AI-determined category.

  5. If Unsubscribe: The Lemlist n8n node automatically unsubscribes the lead using the unsubscribe operation.

  6. If Interested: The lead is marked as interested in Lemlist via an HTTP Request n8n node. Simultaneously, contact details are retrieved/updated via a HubSpot n8n node, a new Deal is created in the HubSpot CRM, and a notification is sent via the Slack n8n node, including a direct link to the new deal.

  7. If OOO: Contact details are retrieved via a HubSpot n8n node, and a follow-up task is automatically generated in HubSpot, labeled "OOO - Follow up with [Name]".

  8. If Other/Fallback: A notification is sent to a specified Slack channel, alerting the team that the reply needs manual review within the Lemlist platform. This structured n8n workflow handles exceptions gracefully.

Installation Guide


  1. Import the n8n workflow: Copy the provided JSON data and paste it into your n8n instance using the 'New' -> 'Import from JSON' function.

  2. Lemlist Credentials: You will need a Lemlist API Key credential configured for the 'Lemlist - Lead Replied' n8n trigger and the 'Lemlist - Unsubscribe' n8n node. Ensure the API key grants access to modify lead data.

  3. OpenAI Credentials: Configure an OpenAI API Key credential in the 'OpenAI' n8n node.

  4. HubSpot Credentials: Configure an OAuth2 credential for HubSpot in the respective 'HubSpot - Get contact ID' and 'HubSpot - Create Deal' n8n nodes.

  5. Slack Credentials: Configure an OAuth2 credential for Slack. Update the 'Your channel name' parameter in both Slack n8n nodes to the desired target channel.

  6. Activate the Trigger: Once credentials are set, save the n8n workflow and activate the 'Lemlist - Lead Replied' n8n trigger. The n8n instance will provide a webhook URL that must be configured within your Lemlist campaign settings to send reply webhooks.

Node Details

Lemlist - Lead Replied (n8n trigger): The primary n8n trigger. It listens for the emailsReplied webhook event, initiating the entire n8n workflow execution.
OpenAI (n8n node): Performs AI classification. It uses a specific prompt to categorize the incoming email text into 'interested', 'Out of office', 'unsubscribe', or 'other'.
Switch (n8n node): The core control flow mechanism. It evaluates the categorized output from the OpenAI n8n node to direct the workflow down one of four branches.
Lemlist - Unsubscribe (n8n node): Executes the Lemlist API operation to unsubscribe a lead based on the email address and campaign ID extracted from the initial n8n trigger data.
HubSpot - Get contact ID / Get contact ID1 (n8n node): Used twice to ensure the contact exists in HubSpot using the lead email. This step is crucial before creating a deal or a follow up task.
HubSpot - Create Deal (n8n node): Executes for 'Interested' replies. It creates a new deal, linking it directly to the retrieved contact ID and setting a predefined sales stage.
follow up task (HubSpot n8n node): Executes for 'Out of Office' replies. It creates an engagement task in HubSpot for the associated contact, reminding the sales team to follow up manually after the OOO period ends.
Slack / Slack1 (n8n node): Provides real-time alerts. Configuration includes dynamic message text with links back to either the HubSpot deal or the Lemlist campaign report, based on which path of the n8n workflow executed.

Related n8n Workflows

Free

Nodes: 8 Nodes
Updated: December 26 2025
View all
Created by
Lucas Perret
Lucas Perret

Featured*