π¬ Generate B2B lead magnet articles with AI deep research and Google Docs
β‘ 19 views Β· π¬ Content Creation & Video
Description
Who is this for?
This workflow is built for B2B marketers, consultants, founders, and agency owners who need to produce high-quality, research-backed thought leadership content β without spending hours on research and writing.
What this workflow does
This agent-powered workflow takes a simple topic input and transforms it into a comprehensive, professionally formatted lead magnet article saved directly to Google Docs. It runs parallel deep research across 5 strategic angles, compiles the findings, and produces a polished long-form article ready for LinkedIn, your blog, or a downloadable PDF.
How it works
- Topic Input β You submit a topic via the built-in chat trigger.
- Strategic Query Generation β An AI agent refines your topic into 5 targeted research queries covering market context, pain points, frameworks, case studies, and future trends.
- Parallel Deep Research β Each query is researched independently by an AI agent, producing 400β600 words of data-rich content per section.
- Compilation & Structuring β All research is merged into a structured article with a table of contents, statistics, and sources.
- Final Writing & Editing β A writing agent produces the complete 2,500β4,000 word article with proper formatting.
- Google Docs Output β The article is created as a formatted Google Doc with bold text, headings, and a shareable link.
- Tracking β Each generated article is logged to a Google Sheet for tracking.
Setup steps
- Connect your Ollama instance β Set up your Ollama API credentials (or swap the LLM node for OpenAI, Anthropic, etc.).
- Connect Google Docs OAuth2 β Create OAuth2 credentials for the Google Docs API.
- Connect Google Drive OAuth2 β Create OAuth2 credentials for the Google Drive API (used to make the doc shareable).
- Connect Google Sheets OAuth2 β Create OAuth2 credentials and update the Sheet URL in the βLog to Tracking Sheetβ node to point to your own spreadsheet.
- Update author name β In the βValidate Queriesβ Code node, change
YOUR_AUTHOR_NAMEto your name. - Activate and test β Open the chat trigger URL and submit a topic.
Requirements
- n8n instance (self-hosted or cloud)
- Ollama running locally (or substitute with any supported LLM provider)
- Google Cloud project with Docs, Drive, and Sheets APIs enabled
- OAuth2 credentials for Google services
How to customize
- Swap the LLM β Replace the Ollama Chat Model node with OpenAI, Anthropic, Google Gemini, or any LangChain-compatible model.
- Change the output format β Modify the βFinal Editor and Polishβ system prompt to produce blog posts, whitepapers, or email sequences instead.
- Adjust research depth β Edit the number of strategic queries or word count targets in the agent prompts.
- Add distribution β Extend the workflow to post directly to LinkedIn, send via email, or upload to your CMS.
π Nodes Used
Google Sheets, HTTP Request, AI Agent, Ollama Chat Model, Chat Trigger
π₯ Import
Download workflow.json and import into n8n:
Workflow menu β Import from File