πŸ“± Post Instagram images with captions from Google Drive using Gemini Vision

⚑ 20 views Β· πŸ“± Social Media & Email Marketing

πŸ’‘ Pro Tip β€” Heads up β€” if this workflow’s Instagram scraping breaks (it happens whenever Meta updates their frontend), ScraperNode is a community node that handles profiles, posts, reels, and comments without any HTML parsing.

View All Scrapers

Description

Quick Overview

This workflow runs on a schedule to pick an image from a Google Drive folder, generate an Instagram caption with Google Gemini Vision, and publish the post through the Instagram Graph API using the required create-container and publish steps.

How it works

  1. Runs every 3 days at 19:30 on a scheduled trigger.
  2. Sets the Instagram Business Account ID, CTA link, and brand context used throughout the workflow.
  3. Searches a specified Google Drive folder for an image and downloads the file.
  4. Sends the image to Google Gemini Vision to generate a formatted Instagram caption returned as JSON.
  5. Calls the Facebook/Instagram Graph API to create an Instagram media container with the image URL and generated caption.
  6. Publishes the created media container to the Instagram Business account via the Graph API.

Setup

  1. Add Google Drive OAuth2 credentials and update the Google Drive folder ID used for the image search.
  2. Add a Google Gemini API key (Google Gemini node credentials).
  3. Add a Facebook Graph API credential with permission to publish Instagram content (for example, instagram_content_publish) and connect it to the correct Instagram Business account.
  4. Replace the placeholder Instagram Business Account ID in the Config step and set your CTA link and brand context values.

πŸ”— Nodes Used

HTTP Request, Google Drive, Schedule Trigger, Google Gemini

πŸ“₯ Import

Download workflow.json and import into n8n: Workflow menu β†’ Import from File

πŸ“– Importing guide Β· πŸ”‘ Credential setup