Skip to main content

Generate AI images from text prompts with Gemini 2.0, Google Sheets & Drive

Workflow preview

Workflow preview
100%
Generate AI images from text prompts with Gemini 2.0, Google Sheets & Drive 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 n8n template demonstrates how to automate the creation of high quality visual content using AI. The workflow takes simple titles from a Go...

Best for

  • Content Creation automation workflows
  • Multimodal AI automation workflows
  • intermediate n8n builders looking for reusable templates

Tools used

n8n-nodes-base.stickynote, n8n-nodes-base.if, n8n-nodes-base.limit, @n8n/n8n-nodes-langchain.agent, n8n-nodes-base.code, @n8n/n8n-nodes-langchain.outputparserstructured, @n8n/n8n-nodes-langchain.lmchatgooglegemini, @n8n/n8n-nodes-langchain.googlegemini

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Muhammad Farooq Iqbal.

Original n8n.io source

1.1 Workflow description

Title
Generate AI images from text prompts with Gemini 2.0, Google Sheets & Drive
Workflow name
Generate AI images from text prompts with Gemini 2.0, Google Sheets & Drive

This n8n template demonstrates how to automate the creation of high-quality visual content using AI. The workflow takes simple titles from a Google Sheets spreadsheet, generates detailed artistic prompts using AI, creates photorealistic images, and manages the entire process from data input to final delivery.

Use cases are many: Perfect for digital marketers, content creators, social media managers, e-commerce businesses, advertising agencies, and anyone needing consistent, high-quality visual content for marketing campaigns, social media posts, or brand materials!

Good to know

  • The Gemini 2.0 Flash Exp image generation model used in this workflow may have geo-restrictions.
  • The workflow processes one image at a time to ensure quality and avoid rate limiting.
  • Each generated image maintains high consistency with the source prompt and shows minimal AI artifacts.

How it works

  1. Automated Trigger: A schedule trigger runs every minute to check for new entries in your Google Sheets spreadsheet.

  2. Data Retrieval: The workflow fetches rows from your Google Sheets document, specifically looking for entries with "pending" status.

  3. AI Prompt Generation: Using Google Gemini, the workflow takes simple titles and transforms them into detailed, artistic prompts for image generation. The AI considers:

    • Specific visual elements, styles, and compositions
    • Natural poses, interactions, and environmental context
    • Lighting conditions and mood settings
    • Brand consistency and visual appeal
    • Proper aspect ratios for different platforms
  4. Text Processing: A code node ensures proper JSON formatting by escaping newlines and maintaining clean text structure.

  5. Image Generation: Gemini's advanced image generation model creates photorealistic images based on the detailed prompts, ensuring high-quality, consistent results.

  6. File Management: Generated images are automatically uploaded to a designated folder in Google Drive with organized naming conventions.

  7. Public Sharing: Images are made publicly accessible with read permissions, enabling easy sharing and embedding.

  8. Database Update: The workflow completes by updating the Google Sheets with the generated image URL and changing the status from "pending" to "posted", creating a complete audit trail.

How to use

  1. Setup: Ensure you have the required Google Sheets document with columns for ID, prompt, status, and imageUrl.

  2. Configuration: Update the Google Sheets document ID and folder IDs in the respective nodes to match your setup.

  3. Activation: The workflow is currently inactive - activate it in n8n to start processing.

  4. Data Input: Simply add new rows to your Google Sheets with titles and set status to "pending" - the workflow will automatically process them.

  5. Monitoring: Check the Google Sheets for updated status and image URLs to track progress.

Requirements

  • Google Gemini API account for LLM and image generation capabilities
  • Google Drive for file storage and management
  • Google Sheets for data input and tracking
  • n8n instance with proper credentials configured

Customizing this workflow

Content Variations: Try different visual styles, seasonal themes, or trending designs by modifying the AI prompt in the LangChain agent.

Output Formats: Adjust the aspect ratio or image specifications for different platforms (Instagram, Pinterest, TikTok, Facebook ads, etc.).

Integration Options: Replace the schedule trigger with webhooks for real-time processing, or add notification nodes for status updates.

Batch Processing: Modify the limit node to process multiple items simultaneously, though be mindful of API rate limits.

Quality Control: Add additional validation nodes to ensure generated images meet quality standards before uploading.

Analytics: Integrate with analytics platforms to track image performance and engagement metrics.

This workflow provides a complete solution for automated visual content creation, perfect for businesses and creators looking to scale their visual content production while maintaining high quality and consistency across all marketing materials.

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 - Sticky Note7

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

Block 2 - If

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

Block 3 - Limit

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

Block 4 - AI Agent

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

Block 5 - Code

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

Block 6 - Structured Output Parser

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

Block 7 - Google Gemini Chat Model

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

Block 8 - Generate Image with Gemini

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

Block 9 - Upload file

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

Block 10 - Share file

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

Block 11 - update imageUrl

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

Block 12 - Schedule Trigger

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

Block 13 - Get row(s) in sheet

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

3. Summary Table

Workflow Generate AI images from text prompts with Gemini 2.0, Google Sheets & Drive
Complexity intermediate
Nodes 13
Categories Content Creation, Multimodal AI
Author Muhammad Farooq Iqbal
Published 18 Aug 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/7544/7544.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 Generate AI images from text prompts with Gemini 2.0, Google Sheets & Drive do?

This n8n template demonstrates how to automate the creation of high quality visual content using AI. The workflow takes simple titles from a Go...

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 Content Creation, Multimodal AI use case.