Automate Agile CRM Enrichment with French INSEE API

Struggling with inaccurate or incomplete company data in Agile CRM? This workflow automates enriching your CRM companies with authoritative data from the French INSEE OpenDatabase API, ensuring up-to-date addresses and official identifiers like SIREN. Save hours and increase CRM data reliability with seamless automation.
agileCrm
httpRequest
manualTrigger
+6
Workflow Identifier: 1770
NODES in Use: manualTrigger, httpRequest, stickyNote, code, set, scheduleTrigger, noOp, agileCrm, merge

Press CTRL+F5 if the workflow didn't load.

Learn how to Build this Workflow with AI:

Visit through Desktop for Best experience

What This Automation Does

This n8n workflow updates company data in Agile CRM automatically using the French government INSEE API.
The main problem it solves is slow, manual updating of company addresses and SIREN numbers that often have mistakes.
The workflow gets all company records, skips those marked read-only, fetches official data from INSEE, and updates Agile CRM companies with accurate info.
After running, Agile CRM holds verified addresses and correct SIREN codes without manual work.

The inputs start with fetching all companies from Agile CRM through the Agile CRM API.
Next, the process filters out companies flagged as read-only to avoid unwanted updates.
It then sends the company name to the INSEE SIREN API to find matching official records.
With the SIREN result, a detailed company query fetches complete data including the exact address.
Finally, it merges the original CRM data with government data, and updates the CRM entry with correct address and SIREN in a custom field.

The output is the enriched Agile CRM database where each non-read-only company now contains an accurate, official address and the correct SIREN number from the INSEE database.


Who Should Use This Workflow

Users running Agile CRM in France who need current and reliable company data should use this workflow.
It helps sales, compliance, or operations teams who waste time fixing bad addresses and missing SIREN identifiers by hand.
If your company database grows fast or has many contacts, this automation cuts errors and manual effort.

It’s for users familiar with basic n8n automation but not deep programming.
Users who want to keep company info synchronized with official French government records benefit most.


Tools and Services Used

  • n8n Automation Platform: Runs the automated workflow connecting systems.
  • Agile CRM API: Supplies company data and accepts updates.
  • INSEE OpenDatabase API (SIREN endpoint): Provides official French company registration data.

Beginner Step-by-Step: How to Use This Workflow in n8n

Step 1: Import the Workflow

  1. Download the workflow file using the Download button on this page.
  2. Inside your n8n editor, click on “Import from File”.
  3. Select the downloaded file to load the workflow.

Step 2: Configure Credentials and API Keys

  1. Open the Set Insee API Key node and replace the placeholder with your real INSEE API Key.
  2. Go to the Agile CRM nodes and connect your Agile CRM API credentials.
  3. Check that the custom fields named “SIREN” and “RO” exist in your Agile CRM, and update node fields if IDs or names differ.

Step 3: Test the Workflow

  1. Execute the workflow manually from the n8n editor.
  2. Look at each node’s output to verify companies are fetched, filtered, data pulled from INSEE, merged, and updated correctly.

Step 4: Activate Workflow for Production

  1. Turn the workflow switch ON in n8n.
  2. If you use the Schedule Trigger, confirm your n8n instance runs continuously. Self-host n8n is recommended for reliable scheduling.
  3. Regularly monitor workflow runs under the executions panel for errors.

Workflow Processing Steps

Input

  • Fetch all companies from Agile CRM with the Agile CRM node.
  • Get the INSEE API key from a Set node.

Processing

  • Filter out companies marked “RO = 1” as read-only with a Code node.
  • Query INSEE SIREN API with company names to find matches using the HTTP Request node.
  • Get detailed company info from INSEE’s SIRET API endpoint.
  • Merge Agile CRM company data and INSEE data by matching the company name.

Output

  • Update each Agile CRM company with the official address and SIREN number in custom fields through the Agile CRM update node.

Code Snippet: Filtering Out ReadOnly Companies

The Code node filters out companies flagged with “RO = 1” to avoid updating protected records.

// Get input data
const input = $input.all();
const output = input.filter(item => {
    const properties = item.json.properties || [];
    return !properties.some(property => property.name === "RO" && property.value === "1"); // Remove all ReadOnly entries
}).map(item => {
    const companyId = item.json.id;
    const denominationUniteLegale = item.json.properties[0]?.value || null; 
    return {
        json: {
            companyId,
            denominationUniteLegale
        }
    };
});

// Return the transformed output
return output;

This code makes sure only companies that can be edited move forward to the enrichment step.


Common Mistakes and How to Avoid Them

  • Forgetting to update the placeholder INSEE API key in the Set Insee API Key node.
  • Missing Agile CRM credentials or wrong permission scopes causing failures in fetching or updating companies.
  • Incorrect JSON path expressions in the Agile CRM update node that break address or SIREN mapping.
  • Company name mismatches causing the INSEE API to return no results—try adjusting query parameters or check company name data.
  • Indexing errors in accessing nested INSEE API arrays—ensure response structures match expectations.

Customization Ideas

  • Set updated companies to read-only automatically by adding or resetting the “RO” custom field to 1 to prevent future overwrites.
  • Modify the INSEE API query to search by SIREN or other registration IDs for precise matches.
  • Change schedule trigger frequency to match company update needs (daily, weekly, monthly).
  • Handle companies with multiple headquarters by iterating through multiple “unitesLegales” and choosing the right address.

Pre-Production Checklist

  • Test Agile CRM API credentials for reading and updating companies.
  • Verify the INSEE API key is valid and active.
  • Ensure the Agile CRM account has custom fields “SIREN” (text) and “RO” (number) created.
  • Test workflow runs on sample companies to make sure data flows as expected.
  • Backup CRM data before any large update runs for safety.

Summary of Results

✓ CRM companies have official addresses from the French government database.

✓ SIREN numbers are correctly stored in a dedicated Agile CRM field.

✓ No manual errors from wrong or outdated company data.

✓ Time savings by automated updates instead of weekly manual maintenance.

→ The user gains a cleaner, up-to-date CRM that helps sales and compliance.


Frequently Asked Questions

Check the API Key in the Set Insee API Key node. Replace with a valid key. Test key independently using curl or Postman.
Verify JSON path expressions in the Agile CRM update node. Also check the code node that filters out companies with RO=1. Try disabling filter to test.
Ensure company names are accurate and complete in Agile CRM. Modify the query in the HTTP Request node for wider matching or test with known names.
Yes, but the Agile CRM nodes must be replaced with appropriate API calls or nodes. The INSEE API HTTP requests remain similar.

Promoted by BULDRR AI

Related Workflows

Automate Viral UGC Video Creation Using n8n + Degaus (Beginner-Friendly Guide)

Learn how to automate viral UGC video creation using n8n, AI prompts, and Degaus. This beginner-friendly guide shows how to import, configure, and run the workflow without technical complexity.
Form Trigger
Google Sheets
Gmail
+37
Free

AI SEO Blog Writer Automation Workflows in n8n

A complete beginner guide to building an AI SEO blog writer automation using n8n.
AI Agent
Google Sheets
httpRequest
+5
Free

Automate CrowdStrike Alerts with VirusTotal, Jira & Slack

This workflow automates processing of CrowdStrike detections by enriching threat data via VirusTotal, creating Jira tickets for incident tracking, and notifying teams on Slack for quick response. Save hours daily by transforming complex threat data into actionable alerts effortlessly.
scheduleTrigger
httpRequest
jira
+5
Free

Automate Telegram Invoices to Notion with AI Summaries & Reports

Save hours on financial tracking by automating invoice extraction from Telegram photos to Notion using Google Gemini AI. This workflow extracts data, records transactions, and generates detailed spending reports with charts sent on schedule via Telegram.
lmChatGoogleGemini
telegramTrigger
notion
+9
Free

Automate Email Replies with n8n and AI-Powered Summarization

Save hours managing your inbox with this n8n workflow that uses IMAP email triggers, AI summarization, and vector search to draft concise replies requiring minimal review. Automate business email processing efficiently with AI guidance and Gmail integration.
emailReadImap
vectorStoreQdrant
emailSend
+12
Free

Automate Email Campaigns Using n8n with Gmail & Google Sheets

This n8n workflow automates personalized email outreach campaigns by integrating Gmail and Google Sheets, saving hours of manual follow-up work and reducing errors in email sequences. It ensures timely follow-ups based on previous email interactions, optimizing communication efficiency.
googleSheets
gmail
code
+5
Free