Google Natural Language API Entity Extraction - n8n Workflow

Use this powerful n8n workflow to extract named entities (people, organizations, locations) from any web page URL using the Google Natural Language API. Automate data analysis tasks.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

Data Analysts: Need to quickly categorize and identify key entities mentioned across numerous web sources.
SEO Specialists: Analyzing competitors' pages to understand topical relevance and authority mentions.
Content Managers: Automating the structuring of unstructured text content from fetched articles.
Developers: Looking for a reusable n8n templates endpoint to integrate advanced NLP capabilities into their applications without writing custom infrastructure code.

Overview

Extracting meaningful data from raw HTML content is challenging. This powerful n8n workflow solves this by acting as a fast, reliable middleware between your application or script and the Google Natural Language API. Instead of handling web scraping, HTML cleanup, and complex API authentication manually, this n8n automation template handles the entire pipeline.

Upon receiving a URL via a dedicated n8n trigger, the system fetches the content, cleans it up, and submits it for analysis. The result is a structured JSON response identifying people, places, organizations, and other named entities, complete with salience scores and metadata. This efficient n8n node structure saves significant development time for anyone needing high-quality textual analysis.

How it Works

This entity extraction n8n workflow follows four sequential steps, triggered externally:


  1. Trigger Reception: The workflow starts when the Webhook n8n trigger receives an incoming POST request containing a JSON body with the target url.

  2. Content Retrieval: An HTTP Request n8n node immediately fetches the full HTML content of the specified URL.

  3. Data Preparation: A Code n8n node takes the raw HTML, trims it (if necessary, up to 100,000 characters), and formats it into the precise JSON payload required by the Google Natural Language API, setting the document type to 'HTML'.

  4. API Analysis: A second HTTP Request n8n node (acting as the Google Entities n8n node) sends the prepared payload to the Google API endpoint (analyzeEntities). Crucially, this step requires your Google API key to be passed as a query parameter.

  5. Response: The final results—the list of detected and categorized entities—are returned directly to the initiating request via the Respond to Webhook n8n node, completing the execution of the n8n workflow.

Installation Guide

To deploy this n8n workflow successfully, follow these steps:


  1. Import the n8n template: Copy the provided JSON and import it into your n8n instance.

  2. Enable Credentials: This n8n workflow uses the Google Natural Language API.

  3. Configure API Key: Locate the Google Entities HTTP Request n8n node. In the Query Parameters section, replace YOUR-GOOGLE-API-KEY with your actual, active Google Cloud API key. Ensure the Natural Language API is enabled in your Google Cloud project.

  4. Activate the Webhook n8n trigger: Once the workflow is configured, click 'Activate' in the top right corner. Copy the unique URL provided by the Get Url webhook n8n trigger node.

  5. Testing: Send a POST request to the copied webhook URL with a JSON body containing the URL you wish to analyze (e.g., {"url": "https://tech-article.com"}).

Node Details

This n8n workflow relies on core n8n node components for scraping, scripting, and API communication:

Get Url (Webhook n8n trigger): This is the entry point. It waits for a POST request that provides the URL to be analyzed. It's configured to respond using a later response n8n node.
Get URL Page Contents (HTTP Request n8n node): Retrieves the raw HTML content of the URL passed from the n8n trigger. It uses an expression ={{ $json.body.url }} to dynamically target the input URL.
Respond with detected entities (Code n8n node): A critical step that prepares the data. It receives the raw HTML, applies a simple length check/trim, and wraps the content in the specific document object structure expected by the Google API, ensuring optimal input for the next n8n node.
Google Entities (HTTP Request n8n node): Sends the structured request to Google's Natural Language API endpoint (/v1/documents:analyzeEntities). It includes the necessary Content-Type: application/json header and requires manual insertion of the API key in the query parameters.


  • Respond to Webhook (Response n8n node): Finalizes the execution, taking the output from the Google API n8n node and sending it back as the response to the initial request.

Related n8n Workflows

Free

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

Hueston is a website design and marketing agency passionate about automation. We craft engaging digital experiences while implementing smart marketing strategies that deliver results. Our team specializes in leveraging automation tools to streamline workflows and boost efficiency for our clients. Let us help your business grow through technology-driven solutions.

Featured*