AutomationFlowsAI & RAG › Automate Content Requests From Telegram to Notion with Gemini AI

Automate Content Requests From Telegram to Notion with Gemini AI

ByMiftah Rahmat @miftahr on n8n.io

This workflow connects Telegram with an AI Agent (Gemini) and Notion to automate content requests. Team members can request content ideas directly in Telegram. The AI processes the request, then automatically creates a new entry in your Notion Content database.

Event trigger★★★★☆ complexityAI-powered16 nodesTelegram TriggerTelegramAgentGoogle Gemini ChatMemory Buffer WindowNotion Tool
AI & RAG Trigger: Event Nodes: 16 Complexity: ★★★★☆ AI nodes: yes Added:

This workflow corresponds to n8n.io template #8052 — we link there as the canonical source.

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
{
  "id": "M2al3wSlfXuUCOaj",
  "name": "Notion",
  "tags": [],
  "nodes": [
    {
      "id": "3a72e740-f405-4a69-a491-37b0740d7485",
      "name": "Telegram Trigger",
      "type": "n8n-nodes-base.telegramTrigger",
      "position": [
        -896,
        48
      ],
      "parameters": {
        "updates": [
          "message"
        ],
        "additionalFields": {}
      },
      "credentials": {
        "telegramApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "3d72bea4-3dfe-4348-a894-8502908f519b",
      "name": "If",
      "type": "n8n-nodes-base.if",
      "position": [
        -880,
        288
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "or",
          "conditions": [
            {
              "id": "f2d3e478-fd5e-4b27-a8fd-936c57eb8d0d",
              "operator": {
                "type": "number",
                "operation": "equals"
              },
              "leftValue": "={{ $json.message.chat.id }}",
              "rightValue": "YOUR_TELEGRAM_GROUP_ID"
            },
            {
              "id": "265d2c82-81fb-4f39-8a77-9d18f3bd2b90",
              "operator": {
                "type": "number",
                "operation": "equals"
              },
              "leftValue": "={{ $json.message.chat.id }}",
              "rightValue": "YOUR_TELEGRAM_CHAT_ID"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "86fcfcc8-e5c4-4ea9-b439-67a7d106ecce",
      "name": "Send a text message",
      "type": "n8n-nodes-base.telegram",
      "position": [
        -880,
        512
      ],
      "parameters": {
        "text": "Maaf, siapa ya? aku gak kenal!",
        "chatId": "={{ $json.message.chat.id }}",
        "additionalFields": {
          "appendAttribution": false,
          "reply_to_message_id": "={{ $json.message.message_id }}"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "5d547b75-bf66-48ed-86fb-eb7261c23d61",
      "name": "Send a chat action",
      "type": "n8n-nodes-base.telegram",
      "position": [
        192,
        -64
      ],
      "parameters": {
        "chatId": "={{ $json.message.chat.id }}",
        "operation": "sendChatAction"
      },
      "typeVersion": 1.2
    },
    {
      "id": "f0b7818b-5651-4f7d-a1b6-dd191420d3f2",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        256,
        192
      ],
      "parameters": {
        "text": "={{ $('Telegram Trigger').item.json.message.text }}",
        "options": {
          "systemMessage": "=Kamu adalah Siti, wanita berusia 25 tahun yang selalu ceria, humble dan sangat pintar. \nTugas utamamu adalah menerima perintah dari pengguna melalui Telegram, berikut contoh tugasmu:\n1. Membuat request di Notion untuk kebutuhan pengguna.\n2. Membuat Copywriting\n- Kamu bisa membuat Copywriting teks, kutipan ayat al-quran, do'a, hadist, dll.\n- Kamu juga bisa menggabungkan antara kutipan ayat al-quran dan teks atau lainnya.\n3. Mengirimkan konfirmasi ke pengguna melalui Telegram.\n\n##Ketentuan operasional:\n- Format input perintah utama adalah:\n1. Person (Orang yang akan mengerjakan request pengguna di notion)\n2. link referensi konten (opsional)\n3. Jenis Konten ( Poster, Reels)\n4. Tanggal pembuatan request\n- Jika input tidak valid atau kurang data, beri respon ramah yang menjelaskan format yang benar.\n- Kamu bisa menggunakan memori percakapan untuk memahami konteks percakapan.\n\n##Cara Membuat Request di Notion:\n1. Title\n- Menggunakan format : <Jenis Konten> DRM\nContoh: Poster DRM\n2. Content Writting\n- Buat copywriting sesuai request dari pengguna\n- Copywriting harus berisi Headline dan Isi\n- Batasi panjang karakter Headline dan Isi agar ketika ditempatkan pada Poster/Reels bisa dibaca dengan nyaman.\n3. Channel\n- Isi dengan DRM\n4. Person\n- Diisi dengan nama orang yang akan mengerjakan konten\n5. Date\n- Ini diisi dengan tanggal request konten yang akan dikerjakan oleh Person\n6. Referensi Konten (optional)\n- Jika pengguna memberikan link referensi, maka isi dengan link tersebut\n7. Jenis Konten\n- Isi dengan Poster atau Reels, yang sesuai dengan request pengguna.\n\nWajib kirim preview ke pengguna, ketika pengguna setuju maka lanjutkan ke Notion.\n\n##Gaya komunikasi:\n- Ramah, jelas, santai dan seperti sahabat.\n- Sertakan detail penting seperti link Notion saat konfirmasi.\n\n##Hari ini:\n{{ $today }}\n\n##Sekarang:\n{{ $now }}\n\n##Nama Pengguna\n{{ $('Telegram Trigger').item.json.message.from.first_name }}\n\n##Tujuan akhir:\nMemastikan semua request pengguna tercatat dengan baik.\n\n##Format Output:\n- Gaya penulisan output telegram WAJIB menggunakan attribute HTML yang didikung Telegram Bot API\n- Selalu sertakan nama pengguna"
        },
        "promptType": "define"
      },
      "typeVersion": 2.2
    },
    {
      "id": "f28727af-d890-4292-8c00-a12f1ad813d0",
      "name": "Google Gemini Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        256,
        400
      ],
      "parameters": {
        "options": {
          "temperature": 0.4
        }
      },
      "credentials": {
        "googlePalmApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "bd3739e0-e670-49f3-bc5f-2dc4cda9f0c0",
      "name": "Send a text message1",
      "type": "n8n-nodes-base.telegram",
      "onError": "continueErrorOutput",
      "position": [
        880,
        192
      ],
      "parameters": {
        "text": "={{ $('AI Agent').item.json.output }}",
        "chatId": "={{ $('Telegram Trigger').item.json.message.chat.id }}",
        "additionalFields": {
          "parse_mode": "HTML",
          "appendAttribution": false,
          "reply_to_message_id": "={{ $('Telegram Trigger').item.json.message.message_id }}"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "b89afbb8-d7d1-4e16-a0a5-daf00d57641c",
      "name": "Simple Memory",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        352,
        400
      ],
      "parameters": {
        "sessionKey": "={{ $('Telegram Trigger').item.json.message.from.id }}",
        "sessionIdType": "customKey",
        "contextWindowLength": 20
      },
      "typeVersion": 1.3
    },
    {
      "id": "4301190e-0a32-4d14-b27f-4501472a1a79",
      "name": "If2",
      "type": "n8n-nodes-base.if",
      "position": [
        -640,
        160
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "or",
          "conditions": [
            {
              "id": "5a6c3965-cd5e-4ea6-846f-058716db3510",
              "operator": {
                "name": "filter.operator.equals",
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.message.reply_to_message.from.username }}",
              "rightValue": "YOUR_TELEGRAM_NAME"
            },
            {
              "id": "8f983c12-18ac-4106-b3ab-dd5824820ad3",
              "operator": {
                "type": "string",
                "operation": "contains"
              },
              "leftValue": "={{ $json.message.text }}",
              "rightValue": "YOUR_TELEGRAM_USERNAME"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "4ac3f1d8-bb37-4eb5-9056-078825064050",
      "name": "Send a chat action1",
      "type": "n8n-nodes-base.telegram",
      "position": [
        576,
        192
      ],
      "parameters": {
        "chatId": "={{ $('Telegram Trigger').item.json.message.chat.id }}",
        "operation": "sendChatAction"
      },
      "typeVersion": 1.2
    },
    {
      "id": "f1b1880d-5147-43fd-b1be-a5be890a93f7",
      "name": "Notion",
      "type": "n8n-nodes-base.notionTool",
      "position": [
        400,
        608
      ],
      "parameters": {
        "title": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Title', ``, 'string') }}",
        "options": {},
        "resource": "databasePage",
        "databaseId": {
          "__rl": true,
          "mode": "list",
          "value": "a29bc195-96f4-4fd3-a857-d6f62b9241d8",
          "cachedResultUrl": "https://www.notion.so/a29bc19596f44fd3a857d6f62b9241d8",
          "cachedResultName": "Content Calendar"
        },
        "propertiesUi": {
          "propertyValues": [
            {
              "key": "Content Writting|rich_text",
              "textContent": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('propertyValues0_Text', ``, 'string') }}"
            },
            {
              "key": "Channel|multi_select",
              "multiSelectValue": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('propertyValues1_Option_Names_or_IDs', ``, 'string') }}"
            },
            {
              "key": "Person|multi_select",
              "multiSelectValue": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('propertyValues3_Option_Names_or_IDs', ``, 'string') }}"
            },
            {
              "key": "Date|date",
              "date": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('propertyValues4_Date', ``, 'string') }}",
              "timezone": "Asia/Jakarta"
            },
            {
              "key": "Referensi Konten|rich_text",
              "textContent": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('propertyValues5_Text', ``, 'string') }}"
            },
            {
              "key": "Jenis Konten|multi_select",
              "multiSelectValue": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('propertyValues5_Option_Names_or_IDs', ``, 'string') }}"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "c14519ba-b1e6-4532-85df-a0e64b989260",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -960,
        -64
      ],
      "parameters": {
        "width": 528,
        "height": 736,
        "content": "## Rules for Group and private\n\nGroup trigers in mention or reply chat from bot"
      },
      "typeVersion": 1
    },
    {
      "id": "c5a7c92d-3a69-4618-a9e1-792a51d770bb",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -400,
        -64
      ],
      "parameters": {
        "width": 528,
        "height": 736,
        "content": "## Rules private"
      },
      "typeVersion": 1
    },
    {
      "id": "b2390cb4-1540-4c1c-b191-0cc1ec405e4c",
      "name": "If1",
      "type": "n8n-nodes-base.if",
      "position": [
        -288,
        240
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "or",
          "conditions": [
            {
              "id": "265d2c82-81fb-4f39-8a77-9d18f3bd2b90",
              "operator": {
                "type": "number",
                "operation": "equals"
              },
              "leftValue": "={{ $json.message.chat.id }}",
              "rightValue": "YOUR_TELEGRAM_CHAT_ID"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "3627bea6-c3ef-4e5d-b821-d2a94d28cbc9",
      "name": "Send a text message3",
      "type": "n8n-nodes-base.telegram",
      "position": [
        -288,
        496
      ],
      "parameters": {
        "text": "Maaf, siapa ya? aku gak kenal!",
        "chatId": "={{ $json.message.chat.id }}",
        "additionalFields": {
          "appendAttribution": false,
          "reply_to_message_id": "={{ $json.message.message_id }}"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "240d7c56-fb5e-4783-b6b3-50e83558103d",
      "name": "Telegram Trigger1",
      "type": "n8n-nodes-base.telegramTrigger",
      "position": [
        -288,
        32
      ],
      "parameters": {
        "updates": [
          "message"
        ],
        "additionalFields": {}
      },
      "credentials": {
        "telegramApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "938067cf-bd7a-4e81-94e0-3802a67bb8e4",
  "connections": {
    "If": {
      "main": [
        [
          {
            "node": "If2",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Send a text message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If1": {
      "main": [
        [
          {
            "node": "Send a chat action",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Send a text message3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If2": {
      "main": [
        []
      ]
    },
    "AI Agent": {
      "main": [
        [
          {
            "node": "Send a chat action1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Notion DRM": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Simple Memory": {
      "ai_memory": [
        [
          {
            "node": "AI Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Telegram Trigger": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Telegram Trigger1": {
      "main": [
        [
          {
            "node": "If1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send a chat action": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send a chat action1": {
      "main": [
        [
          {
            "node": "Send a text message1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send a text message1": {
      "main": [
        [],
        []
      ]
    },
    "Google Gemini Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "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

This workflow connects Telegram with an AI Agent (Gemini) and Notion to automate content requests. Team members can request content ideas directly in Telegram. The AI processes the request, then automatically creates a new entry in your Notion Content database.

Source: https://n8n.io/workflows/8052/ — 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

Use cases Hands-free scheduling with Google Calendar Quickly capturing ideas as Notion notes via voice Sending Gmail messages directly from Telegram A personal productivity assistant available on-the-

Telegram Trigger, Agent, Gmail Tool +6
AI & RAG

Are you drowning in daily operational chaos, desperately trying to juggle sales, projects, content, and client communication? Imagine an AI brain that handles it all, freeing you to lead your business

Telegram Trigger, Telegram, OpenAI +13
AI & RAG

Telegram Trigger receives incoming messages (text, voice, photo, document). Switch routes by message type to appropriate processors: Text → forwarded as-is. Voice → downloaded and sent to Transcribe a

Memory Buffer Window, Telegram Trigger, Telegram +12
AI & RAG

Transform your Telegram messenger into a powerful, multi-modal personal or team assistant. This n8n workflow creates an intelligent agent that can understand text, voice, images, and documents, and ta

Memory Buffer Window, Telegram Trigger, Telegram +10
AI & RAG

A comprehensive n8n workflow demonstrating advanced AI agent orchestration, stateful conversation management, and multi-modal input processing for nutrition tracking applications.

Telegram, Memory Buffer Window, Google Gemini Chat +6