---
title: "Sort lemlist replies with OpenAI and alert Slack"
kind: "Kit"
category: "Marketing & SEO"
price: "Free"
seller: "Mindket"
version: "1"
url: "https://mindket.com/p/dbfe3862-73ff-4dd1-86ee-ed5af4438855"
updated: "2026-11-12"
---

# Sort lemlist replies with OpenAI and alert Slack

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

An n8n workflow that sorts each new reply to your lemlist campaigns with OpenAI. It posts a Slack alert, unsubscribes leads who ask to stop, and marks interested leads in lemlist.

Sort lemlist replies with OpenAI and alert Slack is an n8n workflow in the Marketing \& SEO 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 sorts each new reply to your lemlist campaigns. An OpenAI model puts the reply in one of five categories, and a Slack alert shows the category, the campaign and the lead. A reply that asks to stop unsubscribes the lead in lemlist, and an interested reply marks the lead as interested. Ten nodes do the work, beside eight sticky notes.

### Who it suits

Sales and outreach teams who run cold email campaigns in lemlist and want replies sorted without reading each one. Skip it if you want the AI to write the answer, since this workflow only sorts and alerts.

Who uses it, and how

| Industry | Who uses it | How they use it | Example |
| --- | --- | --- | --- |
| Sales | Outbound sales teams | See every reply in Slack with its category | A rep sees an Interested reply in Slack and answers it within minutes. |
| Agencies | Lead generation agencies | Keep campaign lists clean | An agency sees a lead who asked to stop unsubscribed with nobody touching it. |
| Recruiting | Recruiters | Spot candidates who want to talk | A recruiter sees which replies are interested and which are out of office notes. |
| Founders | Startup founders | Follow replies without opening lemlist | A founder reads the replies to a campaign from a phone in Slack. |

You need a little n8n: import a file, add three credentials and choose a Slack channel.

### Where to use it

Any n8n that can reach lemlist, OpenAI and Slack will run it. lemlist calls n8n when a reply arrives. So the workflow must be switched on, and n8n needs an address that lemlist can reach.

- n8n Cloud: import the file into a new workflow there and switch it on
- Your own n8n server: the same file and steps, with a public address for n8n
- One campaign only: set Campaign ID on the trigger
- Every reply: switch Is First off on the trigger

### How to set it up

Download saves a zip with `workflow.json` and Mindket’s setup notes in your downloads folder. The lemlist API key is in your lemlist settings under Integrations.

What you need first

| Need | Detail |
| --- | --- |
| n8n | On n8n Cloud, or on a server whose address lemlist can reach |
| lemlist | A lemlist account and an API key, for a lemlist credential |
| OpenAI | An API key, for an OpenAI credential |
| Slack | A Slack credential and a channel for the alerts |

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 Trigger on new reply`, `Lemlist unsubscribe` and `Mark lead as interested`.
3. Add an OpenAI credential and select it in `OpenAI Chat Model`.
4. Add a Slack credential, select it in `Send alert to Slack` and choose the channel.
5. Switch the workflow on.
6. Reply to a message from one of your campaigns to see the alert.

### How to use it

Once it is on, the first reply of each lead to your campaigns shows up in Slack. The alert states the category, the campaign, the sender, the lead and a preview of the first 100 characters of the reply. Unsubscribe and interested replies also change the lead in lemlist.

What to change for a different result

| To change | Where |
| --- | --- |
| The categories | The list in the prompt of \`Categorize lemlist reply\` |
| Which categories act | The rules in \`Route reply to the right branch\` |
| The Slack channel and look | \`Send alert to Slack\` |
| Which campaigns | Campaign ID in \`Lemlist Trigger on new reply\` |
| Every reply, not only the first | Is First in \`Lemlist Trigger on new reply\` |
| The model | Model in \`OpenAI Chat Model\` |

### Example

A lead replies to a campaign with a short message asking for a demo next week. The model files the reply under Interested.

Slack shows an alert with the category, a link to the campaign and the lead’s email, and lemlist marks the lead as interested. A reply that asked to stop receiving email would unsubscribe the lead instead.

### For newcomers and experts

**If you are new.** A webhook is a way for one service to call another when something happens. Here lemlist calls n8n when a lead replies, and n8n does the rest. A Switch node sends an item down one route or several.

**For experts.** The Switch node runs every matching rule, so an interested reply goes both to Slack and to lemlist. `Merge data` joins the reply and the model’s answer by position, because both come from the same item.

Where to look closer

| Node | What it does | What to know |
| --- | --- | --- |
| \`Lemlist Trigger on new reply\` | lemlist Trigger 1, event for replied emails, Is First on | It registers a webhook with lemlist |
| \`Format text with Markdown\` | Markdown 1, turns the HTML reply into text in \`textClean\` | It continues if a reply fails to convert |
| \`Categorize lemlist reply\` | Basic LLM Chain 1.4 with an output parser | The prompt lists five categories |
| \`Structured Output Parser\` | Structured Output Parser 1.2, a manual schema with one text field | The field is \`category\` |
| \`Merge data\` | Merge 2.1, merge by position | It joins the reply and the category |
| \`Route reply to the right branch\` | Switch 3 with three rules and all matching outputs on | Slack gets every reply that has a category |
| \`Send alert to Slack\` | Slack 2.1, posts blocks to a channel | The blocks are built from the lemlist data |
| \`Lemlist unsubscribe\` | lemlist 1, Lead, Unsubscribe | It uses the campaign id and the lead email |
| \`Mark lead as interested\` | HTTP Request 2, a POST to the lemlist API | It uses the lemlist credential |

### Good to know

The original named a model that is being retired, and its prompt did not match its parser.

- Models: OpenAI’s deprecations page, read on 12 November 2026, lists the \`gpt-4o\` snapshots as shutting down on 14 January 2027 with \`gpt-6-luna\` as the replacement, so Mindket’s copy uses \`gpt-6-luna\`
- The prompt: the original asked the model for a field named \`replyStatus\`, while its output parser and its Switch read \`category\`. Mindket’s copy drops that line from the prompt, so the format given by the parser applies
- Your own channel: the original posted to a channel of its author, so the channel picker is empty
- lemlist API: lemlist’s developer documentation, read on 12 November 2026, calls its v1 API deprecated and gives no shutdown date. The pages for the two calls made here carry no deprecation note
- Test first: unsubscribing and marking a lead as interested change real data in lemlist, so try a test campaign first
- Only first replies: Is First is on, so a second reply from the same lead does not run the workflow
- Every reply goes to Slack, out of office notes included
- Your data: the reply text goes to OpenAI, and the reply preview and lead details go to Slack
- Credentials: the JSON holds none, so add the lemlist, OpenAI and Slack credentials yourself

## README

```markdown
# Sort lemlist replies with OpenAI and alert Slack

An n8n workflow that sorts each new reply to your lemlist campaigns. An OpenAI model puts the reply in one of five categories, and a
Slack alert shows what came in. Replies that ask to stop unsubscribe the lead, and interested replies are marked in lemlist.

## What is inside

- `workflow.json`: the workflow as n8n exports it, ten working nodes and eight sticky notes. It holds no credential.
- `README.md`: these notes.

## What we changed from the original copy

- The original named `gpt-4o`, a model that is being retired. Mindket's copy uses `gpt-6-luna` in `OpenAI Chat Model`. See Good to
  know.
- The prompt in `Categorize lemlist reply` asked for a field named `replyStatus`, but the output parser and the Switch read
  `category`. The JSON line is gone from the prompt, so the parser's own format applies.
- The Slack channel picker was the author's own channel, so it is empty now.
- Three nodes lost the dash in their names: `Lemlist Trigger on new reply`, `Lemlist unsubscribe` and
  `Mark lead as interested`.
- The Read me sticky note now describes the unsubscribe and interested steps too.

## Before you start

- An n8n instance on n8n Cloud, or on a server whose address lemlist can reach.
- A lemlist account and an API key, found in the lemlist settings under Integrations.
- An OpenAI API key.
- A Slack credential and a channel for the alerts.

## 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 and select it in `Lemlist Trigger on new reply`, `Lemlist unsubscribe` and
   `Mark lead as interested`.
3. Add an OpenAI credential and select it in `OpenAI Chat Model`.
4. Add a Slack credential, select it in `Send alert to Slack` and choose the channel.
5. Switch the workflow on.
6. Reply to a message from one of your campaigns to see the alert.

## How a run goes

1. `Lemlist Trigger on new reply` starts when a lead replies for the first time.
2. `Format text with Markdown` turns the HTML reply into plain text.
3. `Categorize lemlist reply` asks the OpenAI model for one of five categories, and `Structured Output Parser` checks the answer.
4. `Merge data` joins the reply and its category.
5. `Route reply to the right branch` sends it to Slack, and also to lemlist when the category is Unsubscribe or Interested.
6. `Send alert to Slack` posts the category, campaign, sender, lead and a preview of the reply.
7. `Lemlist unsubscribe` unsubscribes the lead, and `Mark lead as interested` marks the lead as interested.

## Change the look

- The categories: the list in the prompt of `Categorize lemlist reply`.
- Which categories act: the rules in `Route reply to the right branch`.
- The Slack channel and look: `Send alert to Slack`.
- Which campaigns: Campaign ID in `Lemlist Trigger on new reply`.
- Every reply, not only the first: Is First in `Lemlist Trigger on new reply`.

## Good to know

- OpenAI's deprecations page, read on 12 November 2026, lists the `gpt-4o` snapshots as shutting down on 14 January 2027 with
  `gpt-6-luna` as the replacement.
- lemlist's developer documentation, read on 12 November 2026, calls its v1 API deprecated and gives no shutdown date. The pages for
  the two calls made here carry no deprecation note.
- Unsubscribing and marking a lead as interested change real data in lemlist, so try a test campaign first.
- Is First is on, so a second reply from the same lead does not run the workflow.
- Every reply goes to Slack, out of office notes included.
- The reply text goes to OpenAI, and the reply preview and lead details go to Slack.
```

## What is in it

3 files, 18 KB, downloaded as a zip.

```text
NOTICE.md  675 B
README.md  4 KB
workflow.json  14 KB
```

## Workflow check

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

- Steps: 8 steps, starting on a Lemlist event
- AI: 1 step calls an AI model: Categorize lemlist reply
- Sign-ins: Signs in to: Slack, lemlist 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/dbfe3862-73ff-4dd1-86ee-ed5af4438855)
- [Its page on Mindket](https://mindket.com/p/dbfe3862-73ff-4dd1-86ee-ed5af4438855)
