---
title: "LinkedIn invites and Instagram DMs to people who commented"
kind: "Kit"
category: "Marketing & SEO"
price: "Free"
seller: "Mindket"
version: "1"
url: "https://mindket.com/p/31155ef6-5061-4ee2-82cd-d09ebbc43446"
updated: "2026-11-09"
---

# LinkedIn invites and Instagram DMs to people who commented

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

An n8n workflow that reaches the people who commented on your LinkedIn or Instagram post, through Unipile. LinkedIn commenters who are not yet connections get a request with a short note, Instagram commenters a direct message, one a minute.

LinkedIn invites and Instagram DMs to people who commented is an n8n workflow in the Marketing \& SEO category, listed by Mindket. It is free. This is version 1, last updated on 2026-11-09. 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 reaches out to the people who commented on one of your posts. You paste the post’s address into a form, and through Unipile it reads the comments and looks up the profile of each person who left one. On LinkedIn, anyone not yet connected to you gets a connection request with a short note. On Instagram, a commenter who passes two relationship checks gets a direct message instead. Words in the note are picked at random from a template, so the people on one post get slightly different notes signed with your account’s name. Nothing is posted in public. The run waits a minute after each send. Twenty-nine nodes run it.

### Who it suits

Consultants, creators and small-business owners whose posts draw comments from people they would like in their network. Skip it if your account matters more than the reach. LinkedIn and Instagram both forbid this kind of automation in their terms.

Who uses it, and how

| Industry | Who uses it | How they use it | Example |
| --- | --- | --- | --- |
| Consulting | Independent consultants | Run it on a case study a day after it goes out | A consultant sends a request to the eight people who commented on a project write-up. |
| Recruiting | In-house recruiters | Rewrite the note around the role, then run it on the job post | A recruiter’s note thanks each commenter and offers a call about the opening. |
| Coaching | Coaches who post on Instagram | Message the commenters on a reel | A fitness coach thanks each commenter on a reel in a direct message. |
| Events | Event organizers | Run it on the announcement post | An organizer connects with everyone who said in the comments that they would come. |

You need a little n8n and a Unipile account. Setup means two values in one node, which its author puts at about 5 minutes.

### Where to use it

Any n8n that can reach your Unipile server will run it. Your social accounts stay connected in Unipile, never in n8n.

- n8n Cloud: import the file and fill in two values
- Your own n8n server: the same file and steps
- LinkedIn: a post’s share address, the kind with \`activity-\` and a long number
- Instagram: a post or reel address with \`/p/\`, \`/reel/\` or \`/reels/\`

### How to set it up

Get it saves a zip with `workflow.json` and Mindket’s setup notes in your downloads folder. Connect your accounts in Unipile first.

What you need first

| Need | Detail |
| --- | --- |
| n8n | On n8n Cloud or on a server of your own |
| Unipile | An account, its API key and its DSN |
| LinkedIn | Your account, connected in Unipile, for the requests |
| Instagram | Your account, connected in Unipile, for the messages |

1. In n8n, create a workflow, open its menu, choose Import from File and pick `workflow.json`.
2. In Unipile, connect the accounts that should send. The workflow uses the first LinkedIn and the first Instagram account it finds there.
3. Open `API Setup` and replace `YOUR_UNIPILE_DNS` with your DSN, the host and port Unipile shows, without `https://`.
4. In the same node, replace `YOUR_UNIPILE_API` with your API key.
5. Edit the note’s template in `✍️ Generate Personalized Message` and `✍️ Generate Personalized Message1` so it sounds like you.
6. Save, open the form’s test address and try a post with two or three comments.

### How to use it

Open the form and paste the post’s address. The form thanks you at once. The run goes on behind it. Each send is followed by a minute’s wait, so thirty sends take half an hour or more. Open the run under Executions to see who was sent what, since each send node shows the person it went to and the note that went with it. A skipped commenter or a refused send moves straight to the next one.

What to change for a different result

| To change | Where |
| --- | --- |
| The note | \`template\` in both message nodes. Words in braces, split by a vertical bar, are picked at random |
| Your sign-off | Your account’s name in Unipile, or \`My Brand\` when it has none |
| The pause | \`⏱️ Wait (Rate Limiting)\` and \`⏱️ Wait (Rate Limiting)1\`, one minute each |
| Who gets a request | \`❓ Should Send Request?\`, which wants \`is\_relationship\` false |
| Who gets a message | The two conditions in \`If1\` |

### Example

You paste the share address of a LinkedIn post.

```text
https://www.linkedin.com/posts/jane-doe_sourdough-activity-7123456789012345678-AbCd
```

`Get Post ID` takes 7123456789012345678 from it, and Unipile returns the post and its comments. Sam Lee commented and is not a connection yet, so the template gives one of its many notes:

```text
Hi Sam Lee,

I appreciate you engaging with my post.

Happy to connect and exchange ideas.

Cheers,
Jane Doe
```

The request goes out with that note. A minute later the loop moves to the next commenter.

### 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. Here `If` sends LinkedIn addresses along the top row and everything else along the bottom one. Each row loops over the commenters one at a time. Start small. Try a post with few comments first, then open each node and read what Unipile sent back to it.

**For experts.** Every call is an HTTP Request to Unipile’s API, with your key in an `X-API-KEY` header.

The calls to Unipile

| Node | Call | What to know |
| --- | --- | --- |
| \`🔍 Get Accounts\` | \`GET /api/v1/accounts\` | The first LINKEDIN and INSTAGRAM accounts are the ones used |
| \`🔍 Fetch All Comments\` and \`🔍 Fetch All Comments1\` | \`GET /api/v1/posts/{id}/comments\` | One page only. The answer’s cursor for more is not followed |
| \`🔗 Check Connection Status\` | \`GET /api/v1/users/{id}\` | Reads \`is\_relationship\` |
| \`📨 Send Connection Request\` | \`POST /api/v1/users/invite\` | Sends \`provider\_id\`, \`account\_id\` and the note, which Unipile caps at 300 characters |
| \`🔗 Get Profile Info\` | \`GET /api/v1/users/me\` | Nothing reads its answer |
| \`📨 Send Connection Message\` | \`POST /api/v1/chats\` | Opens a chat with the commenter’s \`provider\_messaging\_id\` and the text |

Both sends have an error branch, so a refused request skips its wait.

### Good to know

The risk here falls on your accounts more than your bill.

- Platform terms: LinkedIn’s User Agreement, section 8.2, forbids bots and other unauthorized automated methods to add contacts or send messages. Instagram’s Terms forbid automated access without its express permission
- Restrictions: an account that sends too many requests or messages can be restricted
- Unipile’s terms: section 6 forbids using its service in a way that breaks a connected platform’s terms
- LinkedIn’s caps: LinkedIn limits invitations each week. Unipile’s limits page, read on 3 November 2026, gives a paid account about 200 a week and a free one about 5 notes a month
- Instagram’s pace: the same page suggests at most 10 Instagram actions an hour, and a send every minute passes that within ten minutes, so keep runs small or lengthen both waits
- Wrong notes: the author’s notes on both waits describe one to two hours. The nodes wait one minute
- Second invites: the LinkedIn check reads only \`is\_relationship\`, so someone you already invited is asked again
- Address shape: a LinkedIn address without \`activity-\` and a number stops the run at \`Get Post ID\`
- Billing: no AI model runs. The cost is your Unipile plan
- Your data: commenters’ names and profiles pass through Unipile and your n8n
- Your key: it sits in \`API Setup\` in plain text, so take it out before you share the workflow
- Credentials: the JSON holds none

## README

````markdown
# LinkedIn invites and Instagram DMs to people who commented

An n8n workflow for the people who comment on your posts. You paste a post's address into a form. Through Unipile, the
workflow reads the post's comments and looks up each commenter. On LinkedIn, anyone who is not yet a connection gets a
connection request with a short note. On Instagram, a commenter who passes two checks gets a direct message. It waits a minute
after each send.

Read Good to know before the first run. LinkedIn and Instagram both forbid this kind of automation in their terms.

## What is inside

- `workflow.json`: the workflow as n8n exports it, 29 working nodes and three sticky notes. It holds no credential and no
  key. Several nodes carry their author's notes, which n8n shows in each node's settings.
- `README.md`: these notes.

## What we changed from the original copy

- `Get Post ID` reads the post's number with `activity-(\d+)-` again. The export had dropped the backslash, so the pattern
  looked for the letter d and every LinkedIn run stopped there.
- `Get Post ID1` lost two backslashes the same way, and its pattern would not even parse. It reads the code from a `/p/`,
  `/reel/` or `/reels/` address again.
- The sample note in the node notes of both message nodes was signed with a person's first name. It now says Your name.
- The form and the two waits lost their webhook ids, and the workflow carries this listing's name.
- `API Setup` already held the placeholders `YOUR_UNIPILE_DNS` and `YOUR_UNIPILE_API`, so they stay as they came.

## Before you start

- An n8n instance, on n8n Cloud or your own server.
- A Unipile account, its API key and its DSN.
- Your LinkedIn account, your Instagram account or both, connected in Unipile.

## Set it up

1. In n8n, create a workflow, open its menu and choose Import from File. Pick `workflow.json`.
2. In Unipile, connect the accounts that should send. The workflow uses the first LinkedIn account and the first Instagram
   account that Unipile lists.
3. Open `API Setup`. Replace `YOUR_UNIPILE_DNS` with your DSN: the host and port your Unipile dashboard shows, without
   `https://`.
4. In the same node, replace `YOUR_UNIPILE_API` with your Unipile API key.
5. Read the template in `✍️ Generate Personalized Message` and `✍️ Generate Personalized Message1`, and change it to
   sound like you.
6. Save, open the test address of `📋 Form: Enter Post URL` and paste a post with two or three comments.
7. Check each send in the run. Press Publish only if you want the form's live address.

## How a run goes

1. The form takes one address. `API Setup` holds your Unipile values, and `🔍 Get Accounts` lists your connected accounts.
2. `If` sends an address that contains `linkedin.com` to the LinkedIn row. Anything else goes to the Instagram row.
3. The LinkedIn row:
   - `Get Post ID` takes the number after `activity-` and the id of your first LinkedIn account.
   - `🔍 Fetch LinkedIn Post` and `🔍 Fetch All Comments` read the post and its comments. `📤 Split Comments Array` makes
     one item for each comment.
   - `🔄 Loop Over Items` hands over one commenter at a time, and `🔗 Check Connection Status` reads their profile.
   - `❓ Should Send Request?` passes only a profile whose `is_relationship` is false.
   - `✍️ Generate Personalized Message` writes the note, and `📨 Send Connection Request` sends the request with it.
   - `⏱️ Wait (Rate Limiting)` waits one minute before the loop takes the next commenter. A skipped person or a failed send
     goes straight to the next one.
4. The Instagram row:
   - `Get Post ID1` takes the post's code from the address and the id of your first Instagram account.
   - `🔍 Fetch Instagram Post` and `🔍 Fetch All Comments1` read the post and its comments.
   - For each commenter, `🔗 Get Profile Info` asks for your own profile and `🔗 Check Followers Status` for theirs.
   - `If1` lets them through when both `relationship_status.followed_by` and `relationship_status.has_received_invitation`
     are false.
   - `✍️ Generate Personalized Message1` writes the text, and `📨 Send Connection Message` starts a chat with it.
   - `⏱️ Wait (Rate Limiting)1` waits one minute before the next commenter.

The form answers as soon as you send it, and the run goes on behind it. Thirty commenters who all get a send take at least
half an hour.

## The note

Both message nodes share one template. Words in braces, split by `|`, are picked at random, so two commenters rarely get the
same note. `{{fullname}}` becomes the commenter's name. `{{signatureName}}` becomes your account's name in Unipile, or
`My Brand` when it has none. A LinkedIn note uses the first and last name, an Instagram one the profile's full name.

```text
Hi Sam Lee,

I appreciate you engaging with my post.

Happy to connect and exchange ideas.

Cheers,
Jane Doe
```

Unipile's documentation allows 300 characters in an invitation note. The template stays well under that unless you add a lot.

## Change the look

- The note: `template` in both message nodes. Keep `{{fullname}}` and `{{signatureName}}`.
- The pause: `⏱️ Wait (Rate Limiting)` and `⏱️ Wait (Rate Limiting)1`, one minute each. A longer wait is kinder to your
  account.
- Who gets a LinkedIn request: the condition in `❓ Should Send Request?`.
- Who gets an Instagram message: the two conditions in `If1`.
- The form's words: `📋 Form: Enter Post URL`.

## Good to know

- LinkedIn's User Agreement, section 8.2, forbids bots and other unauthorized automated methods to add contacts or send
  messages. Instagram's Terms forbid accessing it or collecting information by automated means without its express
  permission. An account that sends too many requests or messages can be restricted.
- Unipile's Terms of Use, section 6, forbid using its service in a way that breaks a connected platform's terms.
- LinkedIn limits how many invitations an account can send each week. Unipile's provider limits page, read on 3 November
  2026, gives a paid account about 200 a week. A free account gets about 5 invitations with a note a month, and this
  workflow always adds a note.
- The same page suggests at most 10 Instagram actions an hour and 100 a day. Sending once a minute goes past that on any busy
  post. Keep runs to a handful of commenters, or set both waits far longer.
- The author's node notes on both waits describe a random wait of one to two hours. The nodes themselves wait one minute.
- The LinkedIn row checks only `is_relationship`, so someone you already invited is asked again. Unipile's documentation
  lists a recent invitation to the same person among the reasons for a 422 error. A refused send moves on without waiting.
- Only the first page of comments is read. Unipile returns a cursor for the rest, which the file does not follow.
- A LinkedIn address needs `activity-` and a number in it, as a post's share link has. Other LinkedIn addresses stop the run
  at `Get Post ID`. Any address without `linkedin.com` goes down the Instagram row.
- `🔗 Get Profile Info` fetches your own profile for every Instagram commenter, and nothing reads the answer.
- Some spun combinations read badly, such as "you taking time to liking". Trim the choices before a real run.
- No AI model runs here. The cost is your Unipile plan.
- Each commenter's name and profile pass through Unipile and your n8n, and every note goes out from your own account.
- The Unipile key sits in `API Setup` in plain text, so take it out before you share the workflow.
````

## What is in it

2 files, 45 KB, downloaded as a zip.

```text
README.md  7 KB
workflow.json  37 KB
```

## Workflow check

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

- Steps: 29 steps, starting on a form
- AI: No step calls an AI model
- Sign-ins: Signs in to: a web service
- API keys: No API key is left in the file; 1 blank in it for your own key
- Step types: Mindket’s checker reads all 9 of its step types

## Get it

- [Get it on your Mindket account](https://account.mindket.com/account/?product=mindket#/market/31155ef6-5061-4ee2-82cd-d09ebbc43446)
- [Its page on Mindket](https://mindket.com/p/31155ef6-5061-4ee2-82cd-d09ebbc43446)
