Automated Content Generation from Keywords to Google Docs using AI - n8n Workflow

Quickly generate professional blog content starting from a keyword using this robust n8n workflow. Integrates Dumpling AI for scraping, OpenAI for drafting, and Google Docs for storage. Deploy this n8n template today.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

Content Marketing Teams looking to scale output and reduce manual research time.
SEO Professionals who need fresh, topical content based on trending keywords.
Automation Specialists interested in complex agentic n8n templates integrating multiple specialized APIs.
Bloggers who want to automatically transition from keyword idea to a complete Google Doc draft.

Overview

Generating relevant, high-quality blog content quickly is a major challenge. This sophisticated n8n workflow solves this by fully automating the pipeline, from idea generation to final draft production. The system starts with a simple keyword provided via an n8n trigger form. It then leverages Dumpling AI to expand the search query and find highly relevant, fresh (1-2 days old) news articles. Once sources are scraped and cleaned, the aggregated content is fed to the OpenAI n8n node, which acts as a professional writer, synthesizing the information into a polished, original blog post. The final step saves the completed article directly into a designated Google Docs folder, providing a ready-to-publish asset. This specific n8n workflow demonstrates how to build resilient, multi-step AI agents using modular n8n node components.

How it Works

This automation begins when the dedicated n8n trigger, the 'Form Submission (Keywords)' n8n node, receives a keyword. The workflow proceeds through several critical steps:


  1. Keyword Expansion: The initial keyword is sent to the 'Dumpling AI Autocomplete' n8n node, which generates related, relevant search suggestions.

  2. Iterative Research: The workflow splits the suggestions and enters a batch loop ('Loop Suggestions'). For each suggestion, it uses a 'Wait' n8n node for rate limiting, followed by the 'Dumpling AI Google News' n8n node to fetch articles.

  3. Filtering Freshness: The retrieved articles are split and processed by a custom 'Code' n8n node ('Filter Articles (1–2 Days Old)'). This critical n8n node uses JavaScript logic to filter out all but the most current articles (specifically, those published 1 to 2 days ago), ensuring the content is topical. It then limits the output to the top 2 articles.

  4. Scraping and Cleaning: The 'Dumpling AI Scraper' n8n node reliably extracts the full, raw content from the filtered article URLs. A subsequent 'Clean & Prepare Article Content' n8n node (a second Code node) removes common web clutter, navigation links, and extraneous Markdown elements.

  5. Aggregation: All cleaned articles from the various loop runs are collected by the 'Aggregate Articles' n8n node.

  6. AI Drafting: The compiled research is passed to the 'OpenAI: Generate Blog Draft' n8n node (configured for GPT-4.1-mini). Using a highly detailed system prompt, OpenAI generates a new title and a full Markdown blog post in a strict JSON format.

  7. Final Delivery: The Google Docs n8n node first creates a new document using the generated title ('Google Docs: Create Blog File'), and then a subsequent Google Docs n8n node inserts the Markdown-formatted blog post content into the newly created file ('Google Docs: Insert Blog Content'). This concludes the n8n workflow.

Installation Guide

To deploy this comprehensive n8n workflow, follow these steps:


  1. Import the JSON: Copy the provided n8n workflow JSON structure and paste it into your n8n instance via the 'New' menu -> 'Import from JSON'.

  2. Set up Credentials: This template requires three external service credentials:

Dumpling AI: Configure an 'HTTP Header Auth' credential for Dumpling AI API access.
OpenAI: Set up the 'OpenAiApi' credential, ensuring access to the specified model (GPT-4.1-mini).
* Google Docs: Establish an 'OAuth2 API' credential for Google Docs with permissions to create and edit documents.

  1. Configure Google Docs Folder: In the 'Google Docs: Create Blog File' n8n node, update the folderId parameter (1NU00YbKNiHJptNuQZH6kgVUhLvDzE0ka in the example) to point to your desired Google Drive folder.

  2. Activate the n8n Trigger: Access the 'Form Submission (Keywords)' n8n trigger node to retrieve its unique webhook URL or embed code. Test the n8n workflow by submitting a keyword through the generated form or by using the 'Test Workflow' feature in the n8n environment.

  3. Activate the Workflow: Once credentials and configurations are verified, set the workflow to 'Active' to enable live operation.

Node Details

Form Submission (Keywords) (n8n trigger): The starting point of the n8n workflow. Collects the user's desired topic keyword.
Dumpling AI Autocomplete (HTTP Request n8n node): Expands the single keyword into multiple relevant search queries via the Dumpling AI API, making the research process robust.
Dumpling AI Google News (HTTP Request n8n node): Fetches the latest news articles based on the autocomplete suggestions.
Filter Articles (1–2 Days Old) (Code n8n node): A custom JavaScript n8n node that applies business logic to timestamp data, filtering results to ensure content relevance and novelty. It keeps only articles published between 1 and 2 days ago.
Limit Articles (Limit n8n node): Ensures efficiency by restricting the research pipeline to only the top 2 most relevant articles per iteration.
Dumpling AI Scraper (HTTP Request n8n node): Scrapes the full content of the selected article URLs, essential for providing the raw material for the AI agent.
Clean & Prepare Article Content (Code n8n node): Sanitizes the scraped Markdown content, removing boilerplate text, links, and clutter that would distract the language model.
Aggregate Articles (Aggregate n8n node): Collates all processed article content from the iterative loop into a single JSON payload, ready for input into the large language model.
OpenAI: Generate Blog Draft (OpenAI n8n node): The core AI engine. It synthesizes the aggregated, cleaned content into a professional, original, and Markdown-formatted blog post and title, ensuring a high-quality final product. This n8n node is configured for JSON output.
Google Docs (Google Docs n8n node): Used twice: first to create the document with the AI-generated title, and second to insert the complete blog post text into the new file.

Related n8n Workflows

Free

Nodes: 11 Nodes
Updated: December 26 2025
View all
Created by
Yang
Yang

Featured*