AutomationFlowsAI & RAG › AI Company Profiling with Google Gemini

AI Company Profiling with Google Gemini

Original n8n title: Ncompanyprofiling

NCompanyProfiling. Uses agent, lmChatGoogleGemini, mongoDb, outputParserStructured. Event-driven trigger; 11 nodes.

Event trigger★★★★☆ complexityAI-powered11 nodesAgentGoogle Gemini ChatMongoDBOutput Parser StructuredExecute CommandRead Write File
AI & RAG Trigger: Event Nodes: 11 Complexity: ★★★★☆ AI nodes: yes Added:

This workflow follows the Agent → Google Gemini Chat recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "name": "NCompanyProfiling",
  "nodes": [
    {
      "parameters": {},
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        -336,
        -64
      ],
      "id": "1afa0e64-e243-4480-951b-0b528b0d0a77",
      "name": "When clicking \u2018Execute workflow\u2019"
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "=You are an intelligent assistant.\n\nRead the following JSON object extracted from a LinkedIn company profile, and generate a very concise summary for company profiling.\n\nIt should only include:\n- company_name\n- industry\n- company_size\n- specialties (list of core focus areas)\n- key_markets (few major countries or regions where they operate)\n- linkedin_summary (one sentence summary of their typical activity or positioning)\n\nReturn the output in this JSON format only:\n{\n  \"company_name\": \"\",\n  \"industry\": \"\",\n  \"company_size\": \"\",\n  \"specialties\": [],\n  \"key_markets\": [],\n  \"linkedin_summary\": \"\"\n}\n\nHere\u2019s the data:\n{{ JSON.stringify($json) }}",
        "hasOutputParser": true,
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 2,
      "position": [
        960,
        -48
      ],
      "id": "2dec74ba-e0d8-4c83-83d8-1afffa5b51a4",
      "name": "AI Agent"
    },
    {
      "parameters": {
        "modelName": "models/gemini-2.0-flash-001",
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "typeVersion": 1,
      "position": [
        960,
        192
      ],
      "id": "41de0f70-b7a6-4eea-a9c3-17dd19281a2b",
      "name": "Google Gemini Chat Model",
      "credentials": {
        "googlePalmApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "operation": "fromJson",
        "options": {}
      },
      "type": "n8n-nodes-base.extractFromFile",
      "typeVersion": 1,
      "position": [
        768,
        -48
      ],
      "id": "d4c62e40-b59a-4568-b058-9d0774571436",
      "name": "Extract from File"
    },
    {
      "parameters": {
        "operation": "insert",
        "collection": "Companies",
        "fields": "=output, {{ $json.output }}",
        "options": {}
      },
      "type": "n8n-nodes-base.mongoDb",
      "typeVersion": 1.2,
      "position": [
        1328,
        -48
      ],
      "id": "3e01ca68-6622-48ec-a7d6-246487a68aa4",
      "name": "MongoDB",
      "credentials": {
        "mongoDb": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "schemaType": "manual",
        "inputSchema": "{\n  \"type\": \"object\",\n  \"properties\": {\n    \"company_name\": { \"type\": \"string\" },\n    \"industry\": { \"type\": \"string\" },\n    \"company_size\": { \"type\": \"string\" },\n    \"specialties\": {\n      \"type\": \"array\",\n      \"items\": { \"type\": \"string\" }\n    },\n    \"key_markets\": {\n      \"type\": \"array\",\n      \"items\": { \"type\": \"string\" }\n    },\n    \"linkedin_summary\": { \"type\": \"string\" },\n    \"website_link\": { \"type\": \"string\" }\n  },\n  \"required\": [\n    \"company_name\",\n    \"industry\",\n    \"company_size\",\n    \"specialties\",\n    \"key_markets\",\n    \"linkedin_summary\",\n    \"website_link\"\n  ]\n}",
        "autoFix": true
      },
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "typeVersion": 1.3,
      "position": [
        1088,
        192
      ],
      "id": "866d1299-f454-41de-9f1d-2706d928e880",
      "name": "Structured Output Parser"
    },
    {
      "parameters": {
        "modelName": "models/gemini-2.0-flash-001",
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "typeVersion": 1,
      "position": [
        1088,
        352
      ],
      "id": "5009dee8-9383-4699-94db-04e4e1e013b8",
      "name": "Google Gemini Chat Model1",
      "credentials": {
        "googlePalmApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "batchSize": "=1",
        "options": {}
      },
      "type": "n8n-nodes-base.splitInBatches",
      "typeVersion": 3,
      "position": [
        288,
        -64
      ],
      "id": "a6f9c661-df31-4302-b7cc-2a323af83cc7",
      "name": "Loop Over Items",
      "alwaysOutputData": false
    },
    {
      "parameters": {
        "jsCode": "const stdout = $input.first().json.stdout;\nconst companies = JSON.parse(stdout);\nconst arr = companies.map(company => ({ json: company }));\nreturn arr"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        80,
        -64
      ],
      "id": "3bc4377c-ebc9-4344-a8d5-b82abb6884e0",
      "name": "Companies folder extraction"
    },
    {
      "parameters": {
        "command": "python C:/Users/vinay/OneDrive/Desktop/IS/Zodopt/Linkedin_scraper/src/list_companies.py\n"
      },
      "type": "n8n-nodes-base.executeCommand",
      "typeVersion": 1,
      "position": [
        -144,
        -64
      ],
      "id": "0dca81fe-ff97-4ec3-aee6-c998570e42ab",
      "name": "Execute Command"
    },
    {
      "parameters": {
        "fileSelector": "={{ $json.path }}/about.json",
        "options": {}
      },
      "type": "n8n-nodes-base.readWriteFile",
      "typeVersion": 1,
      "position": [
        528,
        -48
      ],
      "id": "9fe4a960-84ae-4275-a513-4156e5dada74",
      "name": "Read final_profile.json"
    }
  ],
  "connections": {
    "When clicking \u2018Execute workflow\u2019": {
      "main": [
        [
          {
            "node": "Execute Command",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Extract from File": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent": {
      "main": [
        [
          {
            "node": "MongoDB",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "MongoDB": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "AI Agent",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model1": {
      "ai_languageModel": [
        [
          {
            "node": "Structured Output Parser",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [],
        [
          {
            "node": "Read final_profile.json",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Companies folder extraction": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Execute Command": {
      "main": [
        [
          {
            "node": "Companies folder extraction",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Read final_profile.json": {
      "main": [
        [
          {
            "node": "Extract from File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "d9161aca-1257-4007-9cff-ae7c947be2ee",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "id": "PZ3S83KH8taslvMX",
  "tags": []
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

NCompanyProfiling. Uses agent, lmChatGoogleGemini, mongoDb, outputParserStructured. Event-driven trigger; 11 nodes.

Source: https://github.com/Vinay-R-S/Linkedin_scraper/blob/4ae8e22862c756d004341768982ed49af5fa7a84/n8n/NCompanyProfiling_v2.json — original creator credit. Request a take-down →

More AI & RAG workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

AI & RAG

UserProfiling. Uses readWriteFile, agent, lmChatGoogleGemini, mongoDb. Event-driven trigger; 8 nodes.

Read Write File, Agent, Google Gemini Chat +2
AI & RAG

This workflow creates a multi-talented AI assistant named Simran that interacts with users via Telegram. It can handle text and voice messages, understand the user's intent, and perform various tasks.

MongoDB, Chain Llm, Google Gemini Chat +11
AI & RAG

RAG CHATBOT Main. Uses telegram, telegramTrigger, lmChatOpenAi, n8n-nodes-mcp. Event-driven trigger; 87 nodes.

Telegram, Telegram Trigger, OpenAI Chat +8
AI & RAG

Instead of manually checking separate apps for your calendar, weather, and news each morning, this workflow consolidates the most important information into a single, convenient audio briefing. The "G

HTTP Request, Google Calendar, Agent +4
AI & RAG

Scale short-form content without scaling your team. This template turns idea discovery → prompt & text generation → Veo-3 video rendering → vertical formatting → multi-channel publishing into one cohe

YouTube, Google Gemini Chat, Output Parser Structured +6