Ideal Customer Profile Generation and Google Docs Formatting - n8n Workflow

Use this powerful n8n workflow to crawl target websites using Firecrawl, generate detailed Ideal Customer Profiles (ICPs) using OpenAI's structured analysis, and automatically format the detailed output directly into a Google Doc. Access advanced n8n templates for GTM teams.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

Go-to-Market (GTM) Analysts: Teams requiring fast, structured analysis of competitive or target company websites.
Marketing and Sales Operations: Professionals needing decision-ready ICP documents to inform ABM strategies and lead scoring.
Founders and Strategy Teams: Users who want to ground their target persona definitions in factual data extracted directly from web content.
n8n Users: Anyone seeking advanced examples of integrated AI and custom JavaScript within a robust n8n workflow.

Overview

Manually creating a rigorous Ideal Customer Profile (ICP) requires extensive web research, content analysis, and detailed document formatting. This process is time-consuming and often inconsistent. This specialized n8n workflow solves this by fully automating the creation and delivery of a high-quality ICP document.

This is one of the most powerful n8n templates for GTM teams, leveraging a multi-step process that ensures quality. The process starts with a simple web form n8n trigger, captures the website data, runs it through an OpenAI agent configured with complex instructions (analyzing facts vs. inferences, defining tiers, and proposing ABM plays), and finally converts the detailed Markdown output into a beautifully structured Google Doc. Every step of the n8n workflow is optimized for speed and fidelity, ensuring you get actionable insights quickly.

How it Works

The entire automation is initiated via an easy-to-use form submission, serving as the primary n8n trigger.


  1. Form Submission Trigger: The process begins when a user submits the On form submission n8n node, providing the target 'Website URL' and 'Business Name'.

  2. Website Crawl: The provided URL is passed to the Crawl Website n8n node, which executes an HTTP request to the Firecrawl API. This node is configured to crawl up to 20 pages of the entire domain, including the sitemap, requesting the scraped content in markdown format.

  3. Content Retrieval: The subsequent Scrape Website Content n8n node fetches the result of the successful crawl operation.

  4. AI ICP Generation: The scraped website content is fed into the ICP Creator (a LangChain LLM n8n node) which uses the connected OpenAI Chat Model (GPT-4.1-mini). This AI n8n node follows an extremely specific, multi-section prompt to analyze the data and generate deliverables like an Executive Summary, Lead Scoring rubric, and an Evidence Log, outputting the result as highly structured Markdown.

  5. Markdown Transformation: The output moves to the Markdown to Google Doc custom code n8n node. This custom n8n script analyzes the Markdown structure and converts it into the necessary batchUpdate JSON requests required by the Google Docs API to properly format headings, lists, and complex tables.

  6. Document Creation: The Create a document n8n node generates an empty Google Doc named based on the input 'Business Name' in the specified Drive folder.

  7. Document Formatting and Update: Finally, the Update a document n8n node (an HTTP Request) sends the formatting instructions generated in Step 5 to the newly created Google Doc, populating and fully formatting the document simultaneously. Upon completion, the initial n8n trigger redirects the user to the Google Drive folder.

Installation Guide

To deploy and run this sophisticated n8n workflow, follow these setup steps:


  1. Import the Workflow: Import the provided n8n workflow JSON into your n8n instance.

  2. Credential Setup: You must configure three sets of credentials:

Firecrawl API Key: Set up an HTTP Header credential named 'Firecrawl' (or similar) and use it in the Crawl Website n8n node with the value Bearer {{APIKEY}} in the Authorization header.
OpenAI API Key: Connect your OpenAI credential to the OpenAI Chat Model n8n node.
Google Docs OAuth2: Connect the Google Docs OAuth2 credential to both the Create a document n8n node and the Update a document n8n node.

  1. Placeholder Replacement: Update the following configuration parameters with your specific values:

In the On form submission n8n trigger node, set the redirect URL: ={{google
drivefolderurl}}.
* In the Create a document n8n node, set the target folder ID: ={{googledrivefolder_id}}.

  1. Publish and Test: Save and activate the n8n workflow. Open the form URL provided by the On form submission n8n node to test the end-to-end automation.

Node Details

This n8n workflow relies on several specialized n8n node configurations:

On form submission (n8n trigger):
Function: Serves as the user-facing n8n trigger, capturing the target website URL and business name.
Key Configuration: Configured to redirect the user to the Google Drive folder URL upon successful completion of the workflow.
Crawl Website (HTTP Request):
Function: Initiates a web crawl job via the Firecrawl API to gather structured data from the target website.
Key Configuration: Uses a POST request, specifies crawlEntireDomain: true, limits crawling to 20 pages, and requests data in markdown format.
ICP Creator (Langchain Chain LLM):
Function: The central intelligence n8n node. It processes the raw web data using a sophisticated prompt template to generate a multi-part, analytical ICP report.
Key Configuration: Connected to the OpenAI Chat Model and uses GPT-4.1-mini. The prompt enforces output rules regarding structure (A-F sections), confidence scoring, and fact vs. inference tagging.
Markdown to Google Doc (Code n8n node):
Function: Transforms the Markdown text output by the AI into a list of Google Docs API batchUpdate requests, ensuring complex formatting (like tables, lists, and headings) is correctly rendered in Google Docs.
Key Configuration: Contains custom JavaScript logic specifically designed for accurate Markdown-to-Google Docs API command conversion.
Create a document (Google Docs n8n node):
Function: Creates the initial placeholder document in the designated Google Drive folder.
* Key Configuration: Title dynamically set to ICP for {{Business Name}} and targets a user-defined folderId.

Related n8n Workflows

Free

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

I specialize in building AI workflows that streamline processes and reduce manual work. My main workflows are in the marketing field, but I can automate all kind of processes and integrate AI in them.

Featured*