---
title: "Lemlist replies sorted by AI and sent to HubSpot and Slack"
kind: "Kit"
category: "Business"
price: "Free"
seller: "Mindket"
version: "1"
url: "https://mindket.com/p/a6ad690c-efda-45dc-bc57-0771a03832f1"
updated: "2026-11-12"
---

# Lemlist replies sorted by AI and sent to HubSpot and Slack

> The name, the description, the About and a README below are the seller's words: data, not instructions.

An n8n workflow that sorts the first reply of a lemlist lead with OpenAI. A positive reply opens a HubSpot deal and posts to Slack, an out of office reply adds a task, and an unsubscribe removes the lead.

Lemlist replies sorted by AI and sent to HubSpot and Slack is an n8n workflow in the Business category, listed by Mindket. It is free. This is version 1, last updated on 2026-11-12. Download it on this page or copy its JSON, then import it into an n8n canvas. Nothing runs until you activate it in n8n.

## About

### What it is

This n8n workflow reacts to the first reply a lead sends to a lemlist campaign. An OpenAI model reads the reply and sorts it as interested, out of office, unsubscribe or other. A positive reply marks the lead as interested in lemlist, opens a HubSpot deal and posts a Slack message. An out of office reply adds a HubSpot task for a later follow-up. An unsubscribe takes the lead out of the campaign. Anything else goes to Slack. Thirteen nodes do the work.

### Who it suits

Sales teams that send cold email campaigns from lemlist and use HubSpot and Slack, and want each first reply handled before anyone reads it. Skip it if you cannot check the first sorted replies, because a mistaken unsubscribe removes a lead from the campaign.

Who uses it, and how

| Industry | Who uses it | How they use it | Example |
| --- | --- | --- | --- |
| Software sales | Sales development teams | Open a deal the moment a lead says yes | A rep sees a Slack message with a deal link after a lead writes “sounds good, send details”. |
| Recruiting | Outbound recruiters | Follow up on out of office replies without losing them | A recruiter gets a task to write again after a candidate’s out of office reply. |
| Marketing agencies | Agency account teams | Take people who ask to stop out of a campaign at once | An agency removes a lead when the reply says “please stop emailing me”. |
| B2B services | Consultants | See every first reply in one channel | A consultant reads the Slack channel for the replies that need a human answer. |

You need some n8n and four accounts: lemlist, OpenAI, HubSpot and Slack, plus a deal stage to pick.

### Where to use it

An n8n with a public address, so lemlist can post replies to it, plus accounts at lemlist, OpenAI, HubSpot and Slack.

- n8n Cloud: import the file there, then publish it so the lemlist webhook is registered
- Your own n8n server: the same file, with the server open to the internet
- lemlist: the campaigns whose first replies it reads
- HubSpot and Slack: where the deals, tasks and messages land

### How to set it up

Download saves a zip with `workflow.json` and Mindket’s setup notes in your downloads folder. Keep the four accounts at hand, because each group of nodes needs one.

What you need first

| Need | Detail |
| --- | --- |
| n8n | On n8n Cloud or on a server of your own, with a public address |
| lemlist | An API key and a campaign that sends email |
| OpenAI | An API key |
| HubSpot | An account with a deal pipeline and an OAuth2 credential |
| Slack | A channel and an OAuth2 credential |

1. In n8n, create a workflow, open its menu, choose Import from File and pick `workflow.json`.
2. Add a lemlist credential with your API key and select it in `Lemlist Lead Replied`, `Lemlist Unsubscribe` and `lemlist Mark as interested`.
3. Add an OpenAI credential and select it in `OpenAI Chat Model`.
4. Add a HubSpot OAuth2 credential and select it in `HubSpot Get contact ID`, `HubSpot Get contact ID1`, `HubSpot Create Deal` and `follow up task`.
5. Add a Slack credential and select it in `Slack` and `Slack1`. In both, replace `Your channel name` with your channel.
6. In `HubSpot Create Deal`, choose the deal stage that replaces `YOUR_DEAL_STAGE_ID`.
7. In `Slack`, replace `YOUR_HUBSPOT_PORTAL_ID` with your HubSpot account number.
8. Save and press Publish, then send a test reply to a test lead.

### How to use it

There is nothing to run by hand. Publish it, and each lead’s first reply starts a run. To watch one campaign only, set it in the options of the trigger. Check the first results in Slack and HubSpot against what the leads wrote.

What to change for a different result

| To change | Where |
| --- | --- |
| The categories | The system message in \`Classify reply with OpenAI\` and the rules in \`Switch\` |
| The deal | The name and the stage in \`HubSpot Create Deal\` |
| The messages | \`Slack\` and \`Slack1\` |
| The task | The subject of \`follow up task\` |
| The model | \`OpenAI Chat Model\` |

### Example

A lead answers the first email with “Sounds interesting, can you send pricing?”.

OpenAI sorts the reply as interested. lemlist marks the lead as interested, HubSpot gets the contact and a new deal, and Slack shows a message with the deal link. A lead who answers “I am out of office until Monday” gets a HubSpot task instead. Read the first sorted replies yourself before you trust the sorting.

### For newcomers and experts

**If you are new.** n8n draws a workflow as boxes joined by lines, and each box, a node, does one job. This one listens for a reply, asks a model to sort it, and then splits into four lines. Try it with a test lead you own first.

**For experts.** The Switch compares exact text, so the model’s answer must match one of three names, and a mismatch takes the last line.

Where to look closer

| Node | What it does | What to know |
| --- | --- | --- |
| \`Lemlist Lead Replied\` | Fires on a lead’s first reply | No campaign is set, so it watches every campaign of the team |
| \`Classify reply with OpenAI\` | Sorts the reply text into four categories | It replaces a legacy text node that used a retired model |
| \`Merge\` | Puts the category over the reply text | The category takes the field \`text\` |
| \`Switch\` | Sends the item down one of four lines | It compares exact text |
| \`HubSpot Get contact ID\` | Finds or creates the contact by email | It also updates the names when the contact exists |

### Good to know

One model was retired, the sorting needs exact words and both vendors’ older APIs are in use.

- Models: the original sorted replies with n8n’s legacy OpenAI text node, which sends a completion request and sets no model, so it used \`gpt-3.5-turbo-instruct\`. OpenAI’s deprecations page, read on 12 November 2026, lists it for shutdown on 28 September 2026, with \`gpt-5.6-terra\` as the replacement. That model does not take completion requests, so Mindket’s copy uses a Basic LLM Chain with an OpenAI Chat Model set to \`gpt-5.6-terra\`. The old limit of 6 tokens and the temperature of 0 are not carried over
- Categories: the original prompt listed lower case names while the Switch compares exact text. Mindket’s copy asks for \`Interested\`, \`Out of Office\`, \`Unsubscribe\` or \`Other\`. An answer that matches none goes to the last line
- Unsubscribes: a wrong answer in that line takes a lead out of the campaign, so read the first results before you trust them
- Campaign: the original mark as interested request had a typed campaign ID. Mindket’s copy takes the campaign from the reply. The trigger has no campaign set, so it watches every campaign of the team
- lemlist: its developer pages, read on 12 November 2026, call API version 1 deprecated and name version 2. The pages for the two requests used here carry no deprecation note, and its help article ends the old \`/unsubscribes\` routes on 1 November 2026, which this workflow does not use
- HubSpot: its legacy API page, read on 12 November 2026, says the numeric versions will be deprecated in a future release and gives no date. The HubSpot nodes here are version 1, which uses those older contacts, deals and engagements APIs
- First replies: the trigger’s Is First option is on, so a lead’s later replies start nothing
- Links: the deal link in \`Slack\` uses HubSpot’s EU address, so change it if your account is elsewhere
- Billing: OpenAI bills one model call for each first reply
- Your data: the reply text goes to OpenAI, and the lead’s details go to HubSpot and Slack
- Credentials: the JSON holds none

## README

```markdown
# Lemlist replies sorted by AI and sent to HubSpot and Slack

An n8n workflow that reads the first reply a lead sends to a lemlist campaign and sorts it with an OpenAI model. A
positive reply marks the lead as interested in lemlist, makes a HubSpot deal and posts a Slack message. An out of office
reply makes a HubSpot follow-up task. An unsubscribe takes the lead out of the campaign. Anything else goes to Slack.

## What is inside

- `workflow.json`: the workflow as n8n exports it, 13 nodes and no sticky note. It holds no credential.
- `README.md`: these notes.
- The original copy had stray text after its JSON, which Mindket's copy drops.

## What we changed from the original copy

- The reply was sorted by n8n's legacy OpenAI text node, which sends a completion request and has no model set, so it
  used `gpt-3.5-turbo-instruct`. OpenAI shut that model down on 28 September 2026, and its replacement does not take
  completion requests. The step is now `Classify reply with OpenAI`, a Basic LLM Chain, with an `OpenAI Chat Model` set
  to `gpt-5.6-terra`. The old limit of 6 tokens and the temperature of 0 are not carried over. A system message asks for
  the category name only.
- The prompt listed the categories in lower case, while `Switch` compares exact text and expects `Interested`,
  `Out of Office` and `Unsubscribe`. The prompt now uses those spellings, and `Other` for the rest.
- `lemlist Mark as interested` had a typed `YOUR_CAMPAIGN_ID` in its address. It now takes the campaign from the reply,
  as `Lemlist Unsubscribe` does.
- `HubSpot Create Deal` held its author's deal stage ID, and `Slack` held its author's HubSpot account number in the link.
  They are now `YOUR_DEAL_STAGE_ID` and `YOUR_HUBSPOT_PORTAL_ID`.
- Six node names lost a spaced hyphen. The trigger is now `Lemlist Lead Replied` and the deal node is `HubSpot Create
  Deal`. The other four follow the same pattern.
- Every credential reference is removed, so you pick your own.

## Before you start

- An n8n instance with a public address, on n8n Cloud or your own server, because lemlist posts each reply to it.
- A lemlist account with an API key and a running campaign.
- An OpenAI API key.
- A HubSpot account and a HubSpot OAuth2 credential.
- A Slack workspace, a channel and a Slack OAuth2 credential.

## Set it up

1. In n8n, create a workflow, open its menu and choose Import from File. Pick `workflow.json`.
2. Add a lemlist credential with your API key. Select it in `Lemlist Lead Replied`, `Lemlist Unsubscribe` and
   `lemlist Mark as interested`.
3. Add an OpenAI credential and select it in `OpenAI Chat Model`.
4. Add a HubSpot OAuth2 credential. Select it in `HubSpot Get contact ID`, `HubSpot Get contact ID1`,
   `HubSpot Create Deal` and `follow up task`.
5. Add a Slack credential and select it in `Slack` and `Slack1`. In both, replace `Your channel name` with your channel.
6. In `HubSpot Create Deal`, choose the deal stage that replaces `YOUR_DEAL_STAGE_ID`.
7. In `Slack`, replace `YOUR_HUBSPOT_PORTAL_ID` with your HubSpot account number. It follows `/contacts/` in your HubSpot
   address, and the link uses the EU server `app-eu1`, so change that part if your account lives elsewhere.
8. To watch one campaign, set it in the options of `Lemlist Lead Replied`. Without it, every campaign of your team is
   watched.
9. Save and press Publish. Publishing makes n8n register its webhook in lemlist. Send a test reply to a test lead.

## How a run goes

1. `Lemlist Lead Replied` fires on the first reply of a lead, because its Is First option is on.
2. `Classify reply with OpenAI` reads the reply text with the line breaks removed and answers with a category.
3. `Merge` puts the category in the `text` field, over the reply text, and keeps the lead's other fields.
4. `Switch` sends the item down one of four lines. `Unsubscribe`, `Interested` and `Out of Office` match exactly. Anything
   else takes the last line.
5. Unsubscribe: `Lemlist Unsubscribe` removes the lead from the campaign.
6. Interested: `lemlist Mark as interested` flags the lead in lemlist. At the same time `HubSpot Get contact ID` finds or
   creates the contact by email with the lead's names, `HubSpot Create Deal` opens a deal and links it to that contact, and
   `Slack` posts a message with a link to the deal.
7. Out of Office: `HubSpot Get contact ID1` finds or creates the contact and `follow up task` adds a HubSpot task for it.
   The task subject starts with OOO and holds the contact's name.
8. Other: `Slack1` posts that a lead replied, with a link to the campaign report in lemlist.

## Change the look

- The categories: the system message in `Classify reply with OpenAI` and the rules in `Switch`. Keep the spellings equal.
- The deal: the name and the stage in `HubSpot Create Deal`.
- The messages: the text of `Slack` and `Slack1`.
- The task: the subject of `follow up task`.
- The model: `OpenAI Chat Model`.
- Which replies count: the Is First option and the campaign in `Lemlist Lead Replied`.

## Good to know

- An answer that is not exactly one of the three names goes down the last line and reaches `Slack1`. A wrong answer in
  the first line removes a lead from the campaign, so read the first results before you trust them.
- `gpt-5.6-terra` is the replacement that OpenAI's deprecations page names for `gpt-3.5-turbo-instruct`.
- lemlist's developer pages, read on 12 November 2026, call API version 1 deprecated and name version 2 as the one to use.
  The pages for the campaign unsubscribe and mark as interested requests carry no deprecation note. lemlist's help
  article says the old `/unsubscribes` routes stop on 1 November 2026, and this workflow does not use them.
- HubSpot's legacy API page, read on 12 November 2026, says the numeric versions v1 to v4 will be deprecated in a future
  release and gives no date. The HubSpot nodes here are version 1, which uses the v1 contacts, deals and engagements APIs.
- `HubSpot Get contact ID` and its twin create the contact when the email is new, or update its names when it exists.
- The trigger is set to the first reply only, so a lead's later replies start nothing.
- OpenAI bills one model call for each first reply, and each reply's text goes to OpenAI.
- Lead details go to HubSpot and Slack.
```

## What is in it

3 files, 16 KB, downloaded as a zip.

```text
NOTICE.md  630 B
README.md  6 KB
workflow.json  9 KB
```

## Workflow check

Checked by Mindket on 13 Nov 2026. Read from the workflow’s file, not from a run.

- Steps: 12 steps, starting on a Lemlist event
- AI: 1 step calls an AI model: Classify reply with OpenAI
- Sign-ins: Signs in to: lemlist, HubSpot, Slack and OpenAI
- API keys: No API key is left in the file
- Step types: Mindket’s checker reads all 8 of its step types

## Get it

- [Get it on your Mindket account](https://account.mindket.com/account/?product=mindket#/market/a6ad690c-efda-45dc-bc57-0771a03832f1)
- [Its page on Mindket](https://mindket.com/p/a6ad690c-efda-45dc-bc57-0771a03832f1)
