Social Media Caption Generator from Google Drive using AI and Cloudinary - n8n Workflow

Automate Twitter/X caption and thread creation using this advanced n8n workflow. Triggered by Google Drive, the n8n node uses Cloudinary and GPT-4o-mini for powerful content generation.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

Marketing agencies and content teams managing high volumes of visual assets.
Social Media Managers looking to scale content production using AI.
Developers and n8n specialists interested in building advanced multimedia processing n8n templates.
Users requiring automated translation of visuals into ready-to-post social copy.

Overview

This comprehensive n8n workflow template provides an end-to-end solution for turning visual assets into high-quality, structured social media content automatically. Instead of manual transcription and caption writing, this n8n automation takes an image uploaded to Google Drive, uses Cloudinary to generate a public URL, and employs a highly specific system prompt within the n8n node to instruct GPT-4o-mini to act as a professional social strategist. The value delivered is a complete, pre-formatted marketing package—including a primary tweet, a 3-part tweet thread (hook, insight, action), optimized hashtags, suggested alt text, and recommended posting times—delivered instantly to an inbox. This robust n8n workflow significantly reduces time-to-market for visual content.

How it Works

The entire process is orchestrated by a powerful sequence of n8n nodes:


  1. Trigger Event: The n8n workflow begins with the Get files from drive n8n trigger. This Google Drive Trigger constantly monitors a specific folder for new or updated files, initiating the automation upon detection.

  2. File Retrieval: The Download the drive files n8n node immediately pulls the binary data of the file identified by the n8n trigger, preparing it for upload.

  3. Image Hosting: The upload frames to cloudinary n8n node executes an HTTP request to Cloudinary, uploading the file data and securing a public secure_url. This URL is crucial as the visual input for the AI model.

  4. AI Configuration: The Azure OpenAI Chat Model n8n node establishes the connection, specifying the use of the powerful gpt-4o-mini model.

  5. Caption Generation: The Basic LLM Chain n8n node takes the Cloudinary URL and utilizes an extremely detailed system prompt. This prompt forces the AI to analyze the image and generate a structured output that includes a subject line, a full HTML email body, a punchy primary tweet, a numbered tweet thread, suggested hashtags, and professional analysis, ensuring the generated text fits platform constraints (e.g., 280-character limits).

  6. Final Delivery: The Send email n8n node completes the n8n workflow by sending the AI-generated HTML content to the user's specified email address, providing a ready-to-use content package.

Installation Guide

To deploy this specialized n8n workflow template, follow these steps:


  1. Import: Copy the provided JSON and import it directly into your n8n instance.

  2. Google Drive Setup: Set up your Google Drive OAuth2 credential (googleDriveOAuth2Api). Configure the Get files from drive n8n trigger node to monitor the specific folder ID where you upload images.

  3. Cloudinary Credential: Configure the upload frames to cloudinary HTTP Request n8n node. You will need a generic HTTP Basic Auth credential (httpBasicAuth) containing your Cloudinary API Key and Secret, used for uploading files.

  4. Azure OpenAI Setup: Set up your Azure OpenAI API credential (azureOpenAiApi) in the Azure OpenAI Chat Model n8n node. Ensure your deployment includes the gpt-4o-mini model.

  5. SMTP Configuration: Configure the SMTP credential in the Send email n8n node and update the EMAIL> and EMAIL> placeholders.

  6. Activation: Save the n8n workflow and activate it to enable the Google Drive Trigger listener.

Node Details

Get files from drive (Google Drive Trigger n8n node): Serves as the primary n8n trigger. Monitors a user-defined Google Drive folder for file updates, initiating the flow. Key configuration: Trigger on a specific folder ID.
Download the drive files (Google Drive n8n node): Retrieves the raw binary content of the file triggered in the previous step, necessary for re-uploading.
upload frames to cloudinary (HTTP Request n8n node): Handles external API communication. Uploads the binary data as multipart-form-data to Cloudinary's upload endpoint, utilizing Basic Authentication and a specified uploadpreset to receive a public URL.
Azure OpenAI Chat Model (LangChain AI n8n node): Configures the connection to the large language model. Key configuration: Uses the gpt-4o-mini model.
Basic LLM Chain (LangChain AI n8n node): This is the core logic n8n node. It dynamically inputs the Cloudinary URL (={{ $json.secureurl }}) into a detailed prompt designed to generate highly structured, platform-optimized social media content, ensuring compliance with Twitter/X constraints.
Send email (Email Send n8n node): The final action n8n node. It sends the subject line and the complete HTML body generated by the AI to a designated recipient, finalizing the automated n8n workflow.

Related n8n Workflows

Free

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

Rahul Joshi is a seasoned technology leader specializing in the n8n automation tool and AI-driven workflow automation. With deep expertise in building open-source workflow automation and self-hosted automation platforms, he helps organizations eliminate manual processes through intelligent n8n ai agent automation solutions.

Featured*