AI-Powered Instagram Carousel Generator from Google Sheets - n8n Workflow

Automate content creation and social media publishing using this n8n workflow. Generate multi-slide Instagram carousels with OpenAI's GPT-Image-1 and manage inputs via Google Sheets.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?


  • Social Media Managers who need to scale content production rapidly.

  • Marketing agencies looking for automated image generation and posting.

  • Content creators utilizing AI for routine social media tasks.

  • Users searching for robust n8n templates integrating Google Sheets and OpenAI.

Overview

Scaling content creation for platforms like Instagram can be time-consuming, especially when creating multi-image carousels. This powerful n8n workflow solves that challenge by completely automating the content pipeline, starting from a simple input spreadsheet. It utilizes an n8n trigger to check a Google Sheet for pending topics. For each pending item, it uses an advanced OpenAI integration to first generate creative image prompts (slides) and then uses OpenAI's image generation model (like DALL-E) to create the visuals. The images are securely uploaded via Cloudinary before being compiled and published as a high-quality carousel post to Instagram, making this a true set-and-forget automation. This comprehensive n8n node structure ensures reliable and consistent content delivery.

How it Works

The process begins with the Schedule Trigger, the core n8n trigger, which runs periodically to initiate the content check.


  1. Data Retrieval: The workflow fetches rows marked 'Pending' from a specified Google Sheets document.

  2. AI Content Strategy: If pending items exist, the n8n workflow passes the topic to an OpenAI Chat Model (via an LLM Chain) to generate structured prompts for each slide of the carousel and the overall caption.

  3. Image Generation Loop: The workflow enters a 'Loop Over Items' n8n node, iterating through each generated slide prompt. For every iteration, the OpenAI HTTP Request node generates an image.

  4. Image Hosting: The generated binary image data is converted into a file and uploaded to Cloudinary, ensuring the image is publicly accessible via URL, which is a requirement for the Instagram API.

  5. Instagram API Preparation: After the loop completes, the workflow collects the Cloudinary URLs and sends them to the Instagram API via an HTTP Request n8n node to generate individual Media Container IDs.

  6. Carousel Assembly: A custom Code n8n node aggregates these individual Media Container IDs into a single array, which is then used by the 'IG Media Carousel' HTTP Request node to create the final carousel container, including the AI-generated caption.

  7. Publishing and Cleanup: After a brief waiting period, the 'IG post Media' n8n node publishes the carousel. Finally, Google Sheets nodes update the status of the original row to 'Completed', ensuring the n8n workflow does not re-process the same content.

Installation Guide

To deploy this powerful n8n workflow, follow these steps:


  1. Import the Template: Download the provided JSON file and import it into your n8n instance via the 'Workflows' section.

  2. Google Sheets Credentials: Configure the 'Get Pending' and subsequent Google Sheets n8n node blocks with your Google account credentials, pointing them to the correct spreadsheet and sheet name containing your content topics.

  3. OpenAI Credentials: Set up your OpenAI credentials for the 'Generate Description for Instagram' and other related AI n8n node components. Ensure your API key has access to both chat models and image generation (GPT-Image-1/DALL-E).

  4. Cloudinary Configuration: Configure the 'Cloudinary' HTTP Request node with your Cloudinary API key and secrets for secure image uploading.

  5. Instagram/Facebook Graph API Setup: The core publishing logic uses custom HTTP Request n8n node setups. You must obtain an Instagram Business Account ID and a long-lived Access Token from the Facebook Graph API to authorize posting. This token needs to be embedded in the relevant Instagram HTTP Request n8n node configurations ('IG images ID', 'IG Media Carousel', etc.).

  6. Activate: Once all credentials and parameters are set, activate the n8n trigger (Schedule Trigger) to begin automated execution.

Node Details


  • Schedule Trigger: This is the initial n8n trigger, set to run the workflow at defined intervals, checking for new pending content.

  • Google Sheets (Get Pending): Fetches the latest content concepts that are awaiting processing.

  • OpenAI (Generate Description for Instagram & Chat Model): A specialized n8n node chain that utilizes LLMs to transform a simple topic idea into detailed prompts and a compelling Instagram caption.

  • Loop Over Items: A crucial flow control n8n node that ensures the subsequent image generation and upload steps are executed sequentially for every required slide in the carousel.

  • OpenAI - Generate Image (HTTP Request): Sends the refined prompt to the OpenAI API to generate the visual content for a single carousel slide.

  • Cloudinary (HTTP Request): Handles the secure upload of the generated image, returning a public URL used for Instagram's publishing API.

  • IG images ID (HTTP Request): This n8n node interfaces with the Instagram Graph API to create a media container ID for each individual image URL.

  • Code (Images ID Array): A powerful custom code n8n node used to aggregate all the individual media container IDs generated in the loop into the single array required for the carousel posting API call.

  • IG Media Carousel & IG post Media (HTTP Requests): These finalize the Instagram posting process, first creating the overall carousel container and then publishing the content using the collected IDs and caption.

Related n8n Workflows

Paid

Nodes: 15 Nodes
Updated: December 26 2025
View all
Created by

AI Engineer & Full Stack Developer skilled in designing intelligent agents, workflow automation, and NLP solutions. Experienced with LLMs, Relevance AI, make, zapier, and n8n. Proficient in integrating AI and chatbots into web apps, optimizing processes, and leveraging automation for real-time productivity. Strong background in backend and frontend development, REST APIs, and database management.

Featured*