Assistant personnel IA - Bot Telegram

Intermédiaire

Ceci est unAI Chatbot, Multimodal AIworkflow d'automatisation du domainecontenant 11 nœuds.Utilise principalement des nœuds comme Telegram, GmailTool, Agent, TelegramTrigger, GoogleSheetsTool. utilisationGPT-4o-minietGoogle服务viaTelegrambotgestion日程et联系人

Prérequis
  • Token Bot Telegram
  • Compte Google et informations d'identification Gmail API
  • Informations d'identification Google Sheets API
  • Clé API OpenAI
Aperçu du workflow
Visualisation des connexions entre les nœuds, avec support du zoom et du déplacement
Exporter le workflow
Copiez la configuration JSON suivante dans n8n pour importer et utiliser ce workflow
{
  "meta": {
    "templateId": "AI_Personal_Assistant_Telegram_Bot"
  },
  "name": "AI Personal Assistant Telegram Bot",
  "tags": [
    "AI",
    "Personal Assistant",
    "Telegram",
    "Calendar",
    "Email",
    "Productivity"
  ],
  "nodes": [
    {
      "id": "e4981de7-db9b-455a-9c42-f3b435955c92",
      "name": "Déclencheur Telegram",
      "type": "n8n-nodes-base.telegramTrigger",
      "notes": "Receives messages from your Telegram bot. Replace credentials with your bot token from @BotFather",
      "position": [
        -16,
        -16
      ],
      "parameters": {
        "updates": [
          "message"
        ],
        "additionalFields": {}
      },
      "typeVersion": 1.1
    },
    {
      "id": "fa1352d4-0a3b-4871-9c5c-380d2f1fd1d5",
      "name": "Agent IA",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "notes": "Main AI agent using OpenAI. Customize the system message for your needs.",
      "position": [
        224,
        0
      ],
      "parameters": {
        "text": "={{ $json.message.text }}",
        "options": {
          "systemMessage": "You are a helpful personal assistant. When sending emails, always find the recipient's email using the 'Get Contacts' tool first.\n\nCurrent date and time: {{$now}}\n\nDaily Schedule Instructions:\n- Check Google Calendar for today's events (12:00 AM to 11:59 PM)\n- Format events with: title, start/end time, location, description\n- If no events: 'You have a free day! No events on your calendar for today.'\n- Email the summary with subject: 'Your Schedule for Today - [Date]'\n- Sign emails with 'Best Regards,'\n\nReplace 'USER_NAME' with your preferred name in the constraints below:\n\n<constraint>\nAddress the user as USER_NAME in all interactions.\n</constraint>"
        },
        "promptType": "define"
      },
      "typeVersion": 1.7
    },
    {
      "id": "152c29ec-c6be-4fd8-a01a-578ef0aa8d10",
      "name": "Telegram Response",
      "type": "n8n-nodes-base.telegram",
      "notes": "Sends AI agent responses back to Telegram chat",
      "position": [
        592,
        0
      ],
      "parameters": {
        "text": "={{ $json.output }}",
        "chatId": "={{ $('Telegram Trigger').item.json.message.chat.id }}",
        "additionalFields": {
          "appendAttribution": false
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "9e6fa398-829a-47fd-95c2-81284e507c51",
      "name": "Wikipedia Outil",
      "type": "@n8n/n8n-nodes-langchain.toolWikipedia",
      "notes": "Provides Wikipedia search capabilities to the AI agent",
      "position": [
        -208,
        288
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "66b8fea2-0ec0-423a-ab61-dd8fd8a7e034",
      "name": "Web Search (SerpAPI)",
      "type": "@n8n/n8n-nodes-langchain.toolSerpApi",
      "notes": "Enables web search functionality. Requires SerpAPI account and API key.",
      "position": [
        224,
        288
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 1
    },
    {
      "id": "b5ee31ee-8c99-4362-aa1f-3bc2bf1fc9a4",
      "name": "Modèle de chat OpenAI",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "notes": "AI language model. Change to gpt-4 or other models as needed. Requires OpenAI API key.",
      "position": [
        -304,
        288
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini",
          "cachedResultName": "gpt-4o-mini"
        },
        "options": {}
      },
      "typeVersion": 1.2
    },
    {
      "id": "f05203af-2ed7-46a7-8fd8-d3210e4e5a3c",
      "name": "Conversation Mémoire",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "notes": "Maintains conversation context. Adjust contextWindowLength as needed (default: 10 messages)",
      "position": [
        -80,
        288
      ],
      "parameters": {
        "sessionKey": "={{ $('Telegram Trigger').item.json.message.from.id }}",
        "sessionIdType": "customKey",
        "contextWindowLength": 10
      },
      "typeVersion": 1.3
    },
    {
      "id": "7ac0be2e-ad24-4990-bf5f-6a70d7f53698",
      "name": "Google Agenda",
      "type": "n8n-nodes-base.googleCalendarTool",
      "notes": "Manages calendar events. Replace YOUR_EMAIL@gmail.com with your calendar ID. Requires Google Calendar OAuth2 setup.",
      "position": [
        128,
        288
      ],
      "parameters": {
        "end": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('End', ``, 'string') }}",
        "start": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Start', ``, 'string') }}",
        "calendar": {
          "__rl": true,
          "mode": "id",
          "value": "YOUR_EMAIL@gmail.com"
        },
        "additionalFields": {
          "summary": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Summary', ``, 'string') }}",
          "description": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Description', ``, 'string') }}"
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "0e349248-4509-41ab-a545-e2c9f0149ed6",
      "name": "Gmail Outil",
      "type": "n8n-nodes-base.gmailTool",
      "notes": "Sends emails via Gmail. Requires Gmail OAuth2 setup with send permissions.",
      "position": [
        32,
        288
      ],
      "parameters": {
        "sendTo": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('To', ``, 'string') }}",
        "message": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Message', ``, 'string') }}",
        "options": {
          "senderName": "{{ $('Telegram Trigger').item.json.message.from.first_name }}",
          "appendAttribution": false
        },
        "subject": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Subject', ``, 'string') }}",
        "emailType": "text"
      },
      "typeVersion": 2.1
    },
    {
      "id": "14516c92-5f0c-4b5f-b055-b113edb3a36a",
      "name": "Get Contacts",
      "type": "n8n-nodes-base.googleSheetsTool",
      "notes": "Accesses contact database in Google Sheets. Replace YOUR_GOOGLE_SHEET_ID with your sheet ID. Requires Google Sheets OAuth2 setup.",
      "position": [
        544,
        240
      ],
      "parameters": {
        "options": {},
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "YOUR_GOOGLE_SHEET_ID",
          "cachedResultName": "Contacts Sheet"
        },
        "descriptionType": "manual",
        "toolDescription": "Use this to get contact information. Read, update and write data to Google Sheets"
      },
      "typeVersion": 4.5
    },
    {
      "id": "a4d12e77-9beb-4411-897c-77c33784022e",
      "name": "Get Calendar Events",
      "type": "n8n-nodes-base.googleCalendarTool",
      "notes": "Retrieves calendar events for daily schedule emails. Replace YOUR_EMAIL@gmail.com with your calendar ID.",
      "position": [
        672,
        224
      ],
      "parameters": {
        "options": {},
        "calendar": {
          "__rl": true,
          "mode": "list",
          "value": "YOUR_EMAIL@gmail.com",
          "cachedResultName": "YOUR_EMAIL@gmail.com"
        },
        "operation": "getAll"
      },
      "typeVersion": 1.3
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "timezone": "America/Chicago",
    "callerPolicy": "workflowsFromSameOwner",
    "executionOrder": "v1"
  },
  "connections": {
    "AI Agent": {
      "main": [
        [
          {
            "node": "152c29ec-c6be-4fd8-a01a-578ef0aa8d10",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Gmail Tool": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "14516c92-5f0c-4b5f-b055-b113edb3a36a": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Wikipedia Tool": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Google Calendar": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Telegram Trigger": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Conversation Memory": {
      "ai_memory": [
        [
          {
            "node": "AI Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "a4d12e77-9beb-4411-897c-77c33784022e": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "66b8fea2-0ec0-423a-ab61-dd8fd8a7e034": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    }
  }
}
Foire aux questions

Comment utiliser ce workflow ?

Copiez le code de configuration JSON ci-dessus, créez un nouveau workflow dans votre instance n8n et sélectionnez "Importer depuis le JSON", collez la configuration et modifiez les paramètres d'authentification selon vos besoins.

Dans quelles scénarios ce workflow est-il adapté ?

Intermédiaire - Chatbot IA, IA Multimodale

Est-ce payant ?

Ce workflow est entièrement gratuit et peut être utilisé directement. Veuillez noter que les services tiers utilisés dans le workflow (comme l'API OpenAI) peuvent nécessiter un paiement de votre part.

Informations sur le workflow
Niveau de difficulté
Intermédiaire
Nombre de nœuds11
Catégorie2
Types de nœuds10
Description de la difficulté

Adapté aux utilisateurs expérimentés, avec des workflows de complexité moyenne contenant 6-15 nœuds

Auteur
Ronnie Craig

Ronnie Craig

@ronnie-craig-2025

Hi, I’m Ronnie! I scaled an eCommerce biz to $14K/month in under a year, grew a YouTube channel to 1K subs in 30 days, booked 28 daycare appointments in 6 days, and built automations for nurses to track clients. I help you create content, repurpose high-performing posts, schedule with ease, monitor trends, and automate marketing—so you stay visible and consistent without burning out.

Liens externes
Voir sur n8n.io

Partager ce workflow

Catégories

Catégories: 34