AutomationFlowsAI & RAG › Agent Business AI

Agent Business AI

Agent-Business-Ai. Uses telegramTrigger, httpRequest, googleSheets, telegram. Event-driven trigger; 6 nodes.

Event trigger★★★★☆ complexity6 nodesTelegram TriggerHTTP RequestGoogle SheetsTelegram
AI & RAG Trigger: Event Nodes: 6 Complexity: ★★★★☆ Added:

This workflow follows the Google Sheets → HTTP Request 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
{
  "nodes": [
    {
      "parameters": {
        "updates": [
          "message"
        ]
      },
      "id": "1",
      "name": "Telegram Trigger",
      "type": "n8n-nodes-base.telegramTrigger",
      "typeVersion": 1,
      "position": [
        200,
        300
      ],
      "credentials": {
        "telegramApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "functionCode": "const text = $json.message.text.toLowerCase();\nlet type = 'general';\n\nif(text.includes('finance')||text.includes('argent')) type='finance';\nif(text.includes('plan')) type='plan';\nif(text.includes('idee')) type='business';\nif(text.includes('client')||text.includes('maps')) type='leads';\nif(text.includes('site')) type='site';\n\nreturn [{json:{text,type,chatId:$json.message.chat.id}}];"
      },
      "id": "2",
      "name": "Router",
      "type": "n8n-nodes-base.function",
      "typeVersion": 1,
      "position": [
        450,
        300
      ]
    },
    {
      "parameters": {
        "url": "https://api.deepseek.com/v1/chat/completions",
        "method": "POST",
        "jsonParameters": true,
        "headers": {
          "Authorization": "Bearer YOUR_API_KEY",
          "Content-Type": "application/json"
        },
        "bodyParametersJson": "={\"model\":\"deepseek-chat\",\"messages\":[{\"role\":\"system\",\"content\":\"Tu es un agent business IA. Tu fais finance, planning, prospection, sites web et analyse.\"},{\"role\":\"user\",\"content\":\"TYPE: {{$json.type}}\\nDEMANDE: {{$json.text}}\"}]}"
      },
      "id": "3",
      "name": "AI Core",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 1,
      "position": [
        700,
        300
      ]
    },
    {
      "parameters": {
        "functionCode": "let output = $json.choices?.[0]?.message?.content || JSON.stringify($json);\nreturn [{json:{output,chatId:$node[\"Router\"].json.chatId}}];"
      },
      "id": "4",
      "name": "Format AI",
      "type": "n8n-nodes-base.function",
      "typeVersion": 1,
      "position": [
        950,
        300
      ]
    },
    {
      "parameters": {
        "operation": "append",
        "sheetId": "YOUR_SHEET_ID",
        "range": "CRM!A:D",
        "options": {},
        "data": "={{[$json.chatId, $json.output, new Date(), $node[\"Router\"].json.type]}}"
      },
      "id": "5",
      "name": "Memory CRM Save",
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 1,
      "position": [
        950,
        500
      ],
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "chatId": "={{$json.chatId}}",
        "text": "\ud83e\udd16 AGENT BUSINESS IA :\\n\\n{{$json.output}}"
      },
      "id": "6",
      "name": "Send Telegram",
      "type": "n8n-nodes-base.telegram",
      "typeVersion": 1,
      "position": [
        1200,
        300
      ],
      "credentials": {
        "telegramApi": {
          "name": "<your credential>"
        }
      }
    }
  ],
  "connections": {
    "Telegram Trigger": {
      "main": [
        [
          {
            "node": "Router",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Router": {
      "main": [
        [
          {
            "node": "AI Core",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Core": {
      "main": [
        [
          {
            "node": "Format AI",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format AI": {
      "main": [
        [
          {
            "node": "Memory CRM Save",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Send Telegram",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

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

Agent-Business-Ai. Uses telegramTrigger, httpRequest, googleSheets, telegram. Event-driven trigger; 6 nodes.

Source: https://gist.github.com/ibrahimdiango514/4a59bc1111f44ba8b01bbf0102c8b4f2 — 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

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

Generate AI viral videos with NanoBanana & VEO3, shared on socials via Blotato 2. Uses @blotato/n8n-nodes-blotato, googleSheets, lmChatOpenAi, toolThink. Event-driven trigger; 94 nodes.

@Blotato/N8N Nodes Blotato, Google Sheets, OpenAI Chat +9
AI & RAG

This project is a template for building a complete academic virtual assistant using n8n. It connects to Telegram, answers frequently asked questions by querying MongoDB, keeps the community informed a

Telegram, MongoDB, Telegram Trigger +6
AI & RAG

Arvifund - Supabase (Fixed v5). Uses httpRequest, telegram, googleSheets, telegramTrigger. Event-driven trigger; 91 nodes.

HTTP Request, Telegram, Google Sheets +9
AI & RAG

Arvifund - Supabase. Uses httpRequest, telegram, googleSheets, telegramTrigger. Event-driven trigger; 90 nodes.

HTTP Request, Telegram, Google Sheets +8