Skip to main content

Schedule and auto-post images to Instagram with Google Sheets, Drive and AI captions

Workflow preview

Workflow preview
100%
Schedule and auto-post images to Instagram with Google Sheets, Drive and AI captions preview
Open on n8n.io

Important notice

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

1. Workflow Overview

Description This n8n workflow automatically publishes posts to Instagram Business accounts and Facebook Pages using Google Sheets as your content calendar. You schedule posts in the sheet, and n8n ...

Best for

  • Social Media automation workflows
  • Multimodal AI automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.scheduletrigger, n8n-nodes-base.set, n8n-nodes-base.googlesheets, n8n-nodes-base.if, n8n-nodes-base.googledrive, @n8n/n8n-nodes-langchain.agent, n8n-nodes-base.facebookgraphapi, n8n-nodes-base.code

Source and attribution

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

Original n8n.io source

1.1 Workflow description

Title
Schedule and auto-post images to Instagram with Google Sheets, Drive and AI captions
Workflow name
Schedule and auto-post images to Instagram with Google Sheets, Drive and AI captions

Description

This n8n workflow automatically publishes posts to Instagram Business accounts and Facebook Pages using Google Sheets as your content calendar. You schedule posts in the sheet, and n8n processes them, uploads media (if any), posts via Meta’s Graph API, and updates the sheet with success/failure. n8n

How it Works

Google Sheets rows marked “Pending” and due for publishing are picked up by a scheduled trigger. Posts are then routed to the proper social platforms and published via Meta’s Graph API. Finally, n8n writes back the publish status and timestamp to the sheet. n8n

🧠 Step-by-Step

1️⃣ Scheduled Trigger

The workflow automatically checks Google Sheets at fixed intervals (e.g., every 15 min) for posts that are ready (status = Pending, publish time reached).

2️⃣ Config & Credentials Store reusable settings including:

  • Google Sheets ID & Sheet name
  • Meta App credentials (App ID, App Secret)
  • Access token for Meta Graph API
  • Instagram Business Account ID
  • Facebook Page ID

These configs make the workflow modular and secure.

3️⃣ Setup: Create a Meta (Facebook) App To post via the Graph API, you must first set up a Meta developer app:

🔗 Create App (Meta for Developers): Go here to start: https://developers.facebook.com/docs/development/create-an-app/

Steps:

  • Log in at Meta for Developers.
  • Click Create App and choose Business as the app type.
  • Facebook Developers
  • Add a name and contact email.
  • In the app dashboard, Add Product → choose Instagram Graph API and Facebook Login.

📌 After creation, your app will have an App ID and App Secret in Settings → Basic — save both for n8n.

4️⃣ Link Accounts & Get IDs Before publishing you need:

  • Instagram Business account (not a personal account)
  • Facebook Page linked to that Instagram account

Link them in Facebook Page settings → Linked Accounts.

Then, generate an access token with permissions (instagram_basic, pages_show_list, etc.) using the Graph API Explorer and your new Meta app.

From the token response or via Graph API calls, extract:

  • Facebook Page ID
  • Instagram Business Account ID

These go into your n8n nodes for publishing.

5️⃣ Fetch & Filter Posts Read rows from Google Sheets and filter those ready to publish (status = Pending, scheduled time reached).

6️⃣ Image Handling If an image link is present, download or retrieve it (Google Drive or external URL). If not, continue with a text-only post.

7️⃣ Platform Routing Route the post to:

  • Instagram publishing branch
  • Facebook publishing branch (or both depending on the sheet’s platform column)

8️⃣ Posting via Meta Graph API Instagram

  • Use Graph API endpoints to create and publish media containers and then make the publish call.

Facebook

  • Use Graph API to post to the Facebook Page feed (via /feed or /photos endpoint).

9️⃣ Update Sheet Status After each attempt, update Google Sheets with:

  • Status (Success/Fail)
  • Published timestamp

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 - Daily Trigger

Type / Role
n8n-nodes-base.scheduleTrigger - scheduleTrigger
Config choices
Version 1.3

Block 2 - Workflow Configuration

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 3 - Get Next Scheduled Post

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

Block 4 - Check If Post Found

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 5 - Download Image from Drive

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

Block 6 - Prepare AI Context

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 7 - Generate Caption and Hashtags

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 3

Block 8 - Post to Instagram

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

Block 9 - Update Sheet - Posted

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

Block 10 - Update Sheet - Failed

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

Block 11 - No More Posts

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 12 - Check Post Success

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 13 - OpenAI Chat Model

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenAi - lmChatOpenAi
Config choices
Version 1.3

Block 14 - Search files and folders

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

Block 15 - 6b. Wait for Container Processing

Type / Role
n8n-nodes-base.wait - wait
Config choices
Version 1.1

Block 16 - Get Public URL From Facebook

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

Block 17 - Upload Image to Facebook

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

Block 18 - Get Access Token from Facebook

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

Block 19 - Publish Post to Instagram

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

Block 20 - 📅 WORKFLOW START

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

Block 21 - 🔐 AUTHENTICATION

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

Block 22 - 🤖 AI CONTENT GENERATION

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

Block 23 - 🤖 AI CONTENT GENERATION1

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

3. Summary Table

Workflow Schedule and auto-post images to Instagram with Google Sheets, Drive and AI captions
Complexity advanced
Nodes 23
Categories Social Media, Multimodal AI
Author Dinakar Selvakumar
Published 19 Dec 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/11964/11964.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 Schedule and auto-post images to Instagram with Google Sheets, Drive and AI captions do?

Description This n8n workflow automatically publishes posts to Instagram Business accounts and Facebook Pages using Google Sheets as your content calendar. You schedule posts in the sheet, and n8n ...

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 Social Media, Multimodal AI use case.