Use this efficient n8n workflow template to automate Brazilian company data lookup (CNPJ) using the free MinhaReceita API and automatically enrich corresponding rows in Google Sheets. Scalable and robust n8n automation.
Download this n8n workflow template and start using it instantly.
Sales and Business Intelligence Analysts: Need up-to-date cadastral data for Brazilian firms.
Compliance and Legal Teams: Requiring official CNPJ information (e.g., status, legal nature).
Data Operations Specialists: Looking for robust, scalable n8n templates for external API integration and batch processing.
Anyone self-hosting n8n: Seeking a reliable n8n workflow to manage and enrich large datasets.
Managing and enriching large lists of identifiers, especially for specific regions like Brazil, often requires manual lookups or expensive enterprise tools. This powerful n8n workflow solves this by providing a robust, free solution for CNPJ data enrichment. Utilizing the MinhaReceita.org public API, this n8n automation efficiently reads hundreds of CNPJs from a Google Sheet, fetches comprehensive official data (including contact details, corporate name, legal status, and address), and writes the enriched data back to the correct rows. This n8n workflow drastically reduces manual data entry time and ensures your business data is accurate and up-to-date, making it an essential n8n template for data processing in the region.
The process begins with the 'Execute Workflow Manually' n8n trigger. After execution starts, the workflow initializes necessary variables, including your Telegram ID and the MinhaReceita API base URL, using the 'Settings' n8n node.
rownumber metadata captured by the initial Google Sheets n8n node to ensure the updated information is written exactly to the correct row in the spreadsheet.YOURTELEGRAMID with your actual Telegram Chat ID. In the 'Notify When Finish' n8n node, set up or select your Telegram API credentials.This n8n workflow template uses several key n8n node types to achieve its goal:
Execute Workflow Manually (n8n trigger): The starting point for the n8n workflow. It initiates the data processing task immediately upon manual execution.
Set (Settings n8n node): Defines configuration variables like telegramid and the apibaseurl for centralized management of external resources.
Google Sheets (Get All CNPJs in Sheet): Function: Reads data from the spreadsheet. Key Configuration: Uses the 'Read' operation and applies a filter based on an empty 'razaosocial' column to select only unprocessed CNPJs.
Split In Batches (Loop CNPJs): Function: Manages the iterative nature of the n8n workflow by chunking the list of CNPJs into batches of 100 before processing them via the API.
HTTP Request (Send API Request): Function: Contacts the external MinhaReceita API. Key Configuration: Dynamically builds the URL using expressions: ={{ $('Settings').item.json.apibaseurl }}{{ $json.cnpj }}.
Google Sheets (Update CNPJ Info in Sheet): Function: Writes the enriched data back into the sheet. Key Configuration: Uses the 'Update' operation and matches the row using the dynamic row_number received from the first Google Sheets n8n node, ensuring precise data replacement.
Limit: Ensures the subsequent 'Notify When Finish' n8n node only receives one item, preventing message spam.
Telegram (Notify When Finish): Function: Sends a confirmation message via Telegram once the complete bulk operation of this n8n workflow is finished.
Automate B2B lead generation using this powerful n8n workflow. Pull data from Leadfeeder, enrich company details with Clearbit, and save qualified leads to Google Sheets automatically using scheduled n8n templates.

An expert n8n workflow designed for bulk email and profile data enrichment using Dropcontact's asynchronous batch requests, handling up to 1500 profiles per hour.

Use this n8n workflow to automatically enrich Pipedrive leads using Clearbit, score prospects based on criteria, and send instant alerts to Slack for high-value opportunities. Get these n8n templates now.

A robust n8n workflow for end-to-end contract lifecycle management (CLM). Use this n8n template to automate AI extraction, risk scoring, approval routing, and CRM synchronization with Salesforce and Postgres.

A robust n8n workflow for syncing contacts from Microsoft Entra ID (Azure AD) to Zammad. This n8n templates solution handles user creation, updates, and deactivation automatically.

Brazilian Full Stack Developer passionate about making automation accessible to everyone. I create free n8n workflows that solve real problems - from NASA space content to marketing automation. Proving that powerful automation doesn't need to be expensive or complicated. Teaching through templates, one node at a time.







































