Skip to main content

Write personalised direct messages for Instagram with Apify, OpenAI, GSheets

Workflow preview

Workflow preview
100%
Write personalised direct messages for Instagram with Apify, OpenAI, GSheets preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

This workflow contains community nodes that are only compatible with the self hosted version of n8n. Fetch Instagram profile information with Apify and generate personalized DMs in Google Sheets. T...

Best for

  • Lead Nurturing automation workflows
  • Multimodal AI automation workflows
  • intermediate n8n builders looking for reusable templates

Tools used

n8n-nodes-base.manualtrigger, n8n-nodes-base.splitinbatches, @n8n/n8n-nodes-langchain.openai, n8n-nodes-base.googlesheets, @apify/n8n-nodes-apify.apify, n8n-nodes-base.httprequest, n8n-nodes-base.stickynote

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Michael Muenzer.

Original n8n.io source

1.1 Workflow description

Title
Write personalised direct messages for Instagram with Apify, OpenAI, GSheets
Workflow name
Write personalised direct messages for Instagram with Apify, OpenAI, GSheets

This workflow contains community nodes that are only compatible with the self-hosted version of n8n.

Fetch Instagram profile information with Apify and generate personalized DMs in Google Sheets. This is great for creator outreach, customer interviews, partnership prospecting, and streamlining your social Direct Messaging workflow. Saving hours per campaign or research study.

How it works

  • We read a list of Instagram accounts from a Google Sheet
  • We trigger the Apify Instagram Post Scraper task to fetch the latest post data per account
  • We pull the image URL of the newest post and analyze it with OpenAI Vision
  • We use the analysis plus account metadata to generate a personalized DM
  • We write the message back to the Google Sheet for easy sending and tracking

Note: Both Apify and OpenAI provide free credits that can cover initial runs of this workflow (20.08.2025).

Set up steps

  • Copy Google Sheet template and add it in all Google Sheet nodes
  • Make sure that n8n has read & write permissions for your Google sheet.
  • Add your list of Instagram accounts in the first column in the Google sheet
  • Add Apify credentials (e.g. API key)
  • Create task for Instagram Post Scraper on Apify
  • Add OpenAI API credentials

What you can achieve

How do I scale creator outreach while keeping messages personal? This workflow pulls each profile’s latest post and bio, then generates a DM that references those specifics. One consistent prompt, fresh data per profile. Personal at scale.

How do I craft partnership or affiliate pitches that feel tailored to the creator’s audience? This n8n workflow spots niche, recent themes, and milestones, then inserts a targeted value prop like an affiliate code or UTM so the pitch mirrors their content and audience.

How can I personalize interview invites using details from a recent post or bio? This workflow opens with a concrete reference from the newest post or bio, states your interview topic, and adds a short CTA. If there’s no recent post, it switches to a bio-based hook.

How do I personalize at scale for thousands of profiles without duplicating outreach? This n8n workflow processes each handle once, logs status in Google Sheets, and skips already‑messaged rows, so you get unique, data-backed DMs across hundreds of profiles without repeats.

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - When clicking ‘Execute workflow’

Type / Role
n8n-nodes-base.manualTrigger - manualTrigger
Config choices
Version 1

Block 2 - Loop Over Items

Type / Role
n8n-nodes-base.splitInBatches - splitInBatches
Config choices
Version 3

Block 3 - Analyze image

Type / Role
@n8n/n8n-nodes-langchain.openAi - openAi
Config choices
Version 1.8

Block 4 - Get Instagram accounts

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.6

Block 5 - Fetch Instagram Account Data

Type / Role
@apify/n8n-nodes-apify.apify - apify
Config choices
Version 1

Block 6 - Get Instagram Account Data

Type / Role
@apify/n8n-nodes-apify.apify - apify
Config choices
Version 1

Block 7 - Fetch Image of latest post

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 8 - Generate Personalized DM

Type / Role
@n8n/n8n-nodes-langchain.openAi - openAi
Config choices
Version 1.8

Block 9 - Add message to Account

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.6

Block 10 - Sticky Note7

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

3. Summary Table

Workflow Write personalised direct messages for Instagram with Apify, OpenAI, GSheets
Complexity intermediate
Nodes 10
Categories Lead Nurturing, Multimodal AI
Author Michael Muenzer
Published 20 Aug 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/7668/7668.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Write personalised direct messages for Instagram with Apify, OpenAI, GSheets do?

This workflow contains community nodes that are only compatible with the self hosted version of n8n. Fetch Instagram profile information with Apify and generate personalized DMs in Google Sheets. T...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Lead Nurturing, Multimodal AI use case.