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 →
{
"name": "Telegram Keyword Search with Gemini (v1.115)",
"nodes": [
{
"parameters": {},
"name": "Start",
"type": "n8n-nodes-base.start",
"typeVersion": 1,
"position": [
240,
300
]
},
{
"parameters": {
"path": "telegram-gemini-search",
"options": {}
},
"name": "Form Trigger",
"type": "n8n-nodes-base.webhook",
"typeVersion": 1,
"position": [
440,
300
]
},
{
"parameters": {
"batchSize": 1,
"options": {}
},
"name": "Loop Over Chats",
"type": "n8n-nodes-base.splitInBatches",
"typeVersion": 2,
"position": [
640,
300
]
},
{
"parameters": {
"language": "python",
"response": {
"type": "json",
"options": {}
},
"command": "python"
},
"name": "Search Messages",
"type": "n8n-nodes-base.code",
"typeVersion": 1,
"position": [
840,
300
]
},
{
"parameters": {
"mode": "mergeByPosition",
"options": {}
},
"name": "Aggregate Messages",
"type": "n8n-nodes-base.merge",
"typeVersion": 2,
"position": [
1040,
300
]
},
{
"parameters": {
"method": "POST",
"url": "https://generativelanguage.googleapis.com/v1beta/models/gemini-pro:generateContent?key={{$credential.googleAiApiKey}}",
"sendBody": true,
"bodyContentType": "json",
"jsonBody": "={\n \"contents\": [\n {\n \"parts\": [\n {\n \"text\": \"Summarize the following messages in 1-2 paragraphs, followed by bullet points with citations. Each citation should be in the format [cite:message_id].\\n\\n---\\n\\n{{JSON.stringify($items())}}\"\n }\n ]\n }\n ]\n}",
"options": {}
},
"name": "Generate AI Summary",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.1,
"position": [
1240,
300
],
"credentials": {
"httpHeaderAuth": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"values": {
"string": [
{
"name": "summary",
"value": "={{$node[\"Generate AI Summary\"].json.candidates[0].content.parts[0].text}}"
},
{
"name": "messages",
"value": "={{$node[\"Aggregate Messages\"].json}}"
}
],
"number": [
{
"name": "chats_searched",
"value": "={{$items.length}}"
},
{
"name": "matches_found",
"value": "={{$node[\"Aggregate Messages\"].json.length}}"
},
{
"name": "summarized_messages",
"value": "={{$node[\"Aggregate Messages\"].json.length}}"
}
]
},
"options": {}
},
"name": "Format Output",
"type": "n8n-nodes-base.set",
"typeVersion": 2,
"position": [
1440,
300
]
}
],
"connections": {
"Start": {
"main": [
[
{
"node": "Form Trigger",
"type": "main",
"index": 0
}
]
]
},
"Form Trigger": {
"main": [
[
{
"node": "Loop Over Chats",
"type": "main",
"index": 0
}
]
]
},
"Loop Over Chats": {
"main": [
[
{
"node": "Search Messages",
"type": "main",
"index": 0
}
]
]
},
"Search Messages": {
"main": [
[
{
"node": "Aggregate Messages",
"type": "main",
"index": 0
}
]
]
},
"Aggregate Messages": {
"main": [
[
{
"node": "Generate AI Summary",
"type": "main",
"index": 0
}
]
]
},
"Generate AI Summary": {
"main": [
[
{
"node": "Format Output",
"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.
httpHeaderAuth
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
Telegram Keyword Search with Gemini (v1.115). Uses start, httpRequest. Webhook trigger; 7 nodes.
Source: https://github.com/zxyphoon/projects/blob/9aeec33b0f9ca4d58dc1c28c8469b78d9b144b1b/n8n/ai_studio_code.json — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
This workflow automates end-to-end social media publishing powered by Late API. It generates text content with Google Gemini, creates branded visuals with Kie.ai, uploads media to Late, and publishes
This workflow is perfect for app developers, SaaS founders, and mobile growth teams who need constant UGC-style video ads without hiring creators or agencies. If you're spending $500+ per creator and
AI Background Generation with Nano Banana (Gemini Image). Uses httpRequest, googleDrive. Webhook trigger; 35 nodes.
This template is for developers, teams, and automation enthusiasts who want a private, PIN-protected Telegram chatbot that answers questions from their own documents — without relying on external AI A
Elevate your digital presence with high-fidelity cinematic video automation. This workflow orchestrates the complex, asynchronous rendering process of OpenAI Sora—transforming static product images or