Gemini Pro Content Idea Generator and Google Sheets Logger - n8n Workflow

Use this powerful n8n workflow to automatically generate 5 high-quality content ideas using Gemini Pro (Google AI) and instantly save them directly into a Google Sheet for easy content planning.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?


  • Content Marketing Managers looking for rapid idea generation.

  • SEO Specialists needing quick keyword-based content outlines.

  • Freelance Writers seeking automated ideation tools.

  • n8n users who want to deploy advanced AI automation and leverage pre-built n8n templates.

  • Teams needing a streamlined content planning process linked directly to Google Sheets.

Overview

Generating fresh, relevant content ideas is often a bottleneck in the content creation pipeline. This efficient n8n workflow solves this problem by integrating a powerful generative AI model, Gemini Pro, directly with your content planning spreadsheet. By simply defining a topic in the initial n8n node, the automation takes over, generating multiple creative ideas and formatting them perfectly before appending them as new rows in your chosen Google Sheet. This specific n8n workflow is a excellent example of combining AI processing with structured data management, providing immediate value and saving countless hours previously spent brainstorming and manually copying data. It's one of the most useful n8n templates for marketing automation.

How it Works

This automation is triggered by a manual input, making it a run-on-demand n8n workflow ideal for ideation sessions.


  1. Define the Topic: The workflow starts with the Manual Input n8n trigger. The user provides a JSON object containing the topic keyword for which ideas are needed.

  2. Generate AI Content: The workflow passes the topic payload to the Generate Ideas (Google AI) n8n node. This node uses Gemini Pro to execute a pre-defined prompt, instructing it to generate 5 relevant content titles, resulting in a single text output containing multiple newline-separated ideas.

  3. Format and Restructure: The critical Format Ideas n8n node (a Function node) takes the single item output from the AI and processes it. The custom JavaScript logic splits the generated text based on newline characters. For every single idea found, it creates a new, separate item in the n8n workflow, ensuring each idea is treated as an individual piece of data ready for storage.

  4. Write to Google Sheets: Finally, the Write to Google Sheet n8n node receives the collection of individually formatted idea items. It executes an 'Append' operation, writing the content of the idea field from each item into a new row in the specified Google Sheet. This completes the cycle of the n8n workflow, ensuring the content is immediately organized.

Installation Guide

To set up this powerful n8n workflow, follow these steps:


  1. Import the n8n Workflow: Copy the provided JSON data and paste it directly into your n8n instance using the 'New' menu -> 'Import from JSON' option.

  2. Configure Google AI Credentials: Open the 'Generate Ideas (Google AI)' n8n node and provide your Google AI API key credentials. This is necessary for the Gemini Pro model connection.

  3. Configure Google Sheets Credentials: Open the 'Write to Google Sheet' n8n node. You must set up OAuth2 credentials for Google Sheets to grant n8n permission to write data.

  4. Specify Spreadsheet ID: In the 'Write to Google Sheet' n8n node, replace the placeholder YOURGOOGLESHEET_ID with the actual ID of your content planning Google Sheet.

  5. Run the n8n Trigger: Click 'Execute Workflow' or use the Manual Input configuration to provide the initial topic, for example: {"topic": "Sustainable Urban Farming"}.

Node Details

Manual Input (n8n Trigger)
Function: Serves as the starting n8n node for the workflow, allowing users to manually input the central keyword or topic for content generation.
Key Configuration: Requires the input to include a field named topic (e.g., {"topic": "AI Ethics"}).
Generate Ideas (Google AI)
Function: Sends the user-defined topic to the Google AI (Gemini Pro) model to generate exactly five related content ideas.
Key Configuration: Uses the gemini-pro model and defines a structured prompt to ensure the output is suitable for subsequent parsing.
Format Ideas (Function n8n Node)
Function: A critical step that restructures the data. It uses JavaScript to split the single block of generated text (containing 5 ideas) into 5 separate items, preparing them for bulk insertion into the spreadsheet. This is essential for proper Google Sheets integration.
Key Configuration: Custom JS code splits the text by newline (\n) and maps each resulting idea into a new item object with the key idea.
Write to Google Sheet (Google Sheets n8n Node)
Function: Appends the individually formatted content ideas into the target Google Sheet.
Key Configuration: Operation is set to Append. It targets the column Sheet1!A:A and uses the expression ={{ $json.idea }} to map the input data field to the spreadsheet column.

Related n8n Workflows

Free

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

Featured*