This workflow corresponds to n8n.io template #7215 — we link there as the canonical source.
This workflow follows the Agent → Google Sheets 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 →
{
"id": "EmfC3k9BlwxWhpVL",
"meta": {
"templateCredsSetupCompleted": true
},
"name": "Own Data Store in Google Sheet",
"tags": [],
"nodes": [
{
"id": "482f66af-0622-4af8-acee-0e48a07f3f96",
"name": "If",
"type": "n8n-nodes-base.if",
"position": [
-64,
192
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "or",
"conditions": [
{
"id": "46ee98fc-c32a-4a49-bba8-c8d331f64071",
"operator": {
"type": "string",
"operation": "contains"
},
"leftValue": "={{ $json['URL '] }}",
"rightValue": "youtu.be"
},
{
"id": "8711d4b1-3512-445e-8415-aa1bf2394a62",
"operator": {
"type": "string",
"operation": "contains"
},
"leftValue": "={{ $json['URL '] }}",
"rightValue": "youtube.com"
}
]
}
},
"typeVersion": 2.2
},
{
"id": "17ba2dbc-9e23-46ce-bded-ecfe17b5233b",
"name": "HTTP Request",
"type": "n8n-nodes-base.httpRequest",
"position": [
144,
48
],
"parameters": {
"url": "=Apify Actor - YouTube Transcript Ninja EndPoint URL",
"method": "POST",
"options": {},
"jsonBody": "={\n \"includeTimestamps\": \"No\",\n \"language\": \"English\",\n \"startUrls\": [\n \"{{ $json['URL '] }}\"\n ]\n}",
"sendBody": true,
"specifyBody": "json"
},
"typeVersion": 4.2
},
{
"id": "85da4c7f-ba57-4928-b6ec-0504666799b2",
"name": "Google Gemini Chat Model1",
"type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
"position": [
672,
400
],
"parameters": {
"options": {}
},
"credentials": {
"googlePalmApi": {
"name": "<your credential>"
}
},
"typeVersion": 1
},
{
"id": "f3e1374e-a910-4320-997b-6d45067e3cc7",
"name": "HTTP Request1",
"type": "n8n-nodes-base.httpRequest",
"position": [
144,
288
],
"parameters": {
"url": "={{ $json['URL '] }}",
"options": {}
},
"typeVersion": 4.2
},
{
"id": "63773875-8a87-455b-8919-070126ca879b",
"name": "Markdown",
"type": "n8n-nodes-base.markdown",
"position": [
352,
288
],
"parameters": {
"html": "={{ $json.data }}",
"options": {}
},
"typeVersion": 1
},
{
"id": "aaf6e1d7-6834-4c37-bece-e23f37f3299f",
"name": "Information Extractor",
"type": "@n8n/n8n-nodes-langchain.informationExtractor",
"position": [
560,
288
],
"parameters": {
"text": "=Article: {{ $json.data }}",
"options": {},
"attributes": {
"attributes": [
{
"name": "Title",
"required": true,
"description": "a title for this article"
},
{
"name": "Article Refined Data",
"required": true,
"description": "a detailed summary from the article to add that in my Supabase. Don't start with this article or this thing."
}
]
}
},
"typeVersion": 1.2
},
{
"id": "b470fda2-69f2-49c7-b158-65cb3448941f",
"name": "Google Gemini Chat Model2",
"type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
"position": [
464,
160
],
"parameters": {
"options": {}
},
"credentials": {
"googlePalmApi": {
"name": "<your credential>"
}
},
"typeVersion": 1
},
{
"id": "e3ab773c-ef99-4335-b1e6-c30ae2c6fa0d",
"name": "Information Extractor1",
"type": "@n8n/n8n-nodes-langchain.informationExtractor",
"position": [
352,
48
],
"parameters": {
"text": "=YouTube Video Transcript: {{ $json.transcript }}",
"options": {},
"attributes": {
"attributes": [
{
"name": "Title",
"required": true,
"description": "a title for this video"
},
{
"name": "Article Refined Data",
"required": true,
"description": "a detailed summary from the transcript to add that in my Supabase. Don't start with this video or like this thing."
}
]
}
},
"typeVersion": 1.2
},
{
"id": "8609fbb2-2fe4-4e25-bb0f-8ba6ad31fb29",
"name": "Telegram Trigger",
"type": "n8n-nodes-base.telegramTrigger",
"position": [
-576,
-480
],
"parameters": {
"updates": [
"message"
],
"additionalFields": {}
},
"credentials": {
"telegramApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.2
},
{
"id": "1ec9c1f4-6da1-46fd-8cdc-46d847b07c70",
"name": "AI Agent",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
-368,
-480
],
"parameters": {
"text": "=User Request: {{ $json.message.text }}",
"options": {
"systemMessage": "when user asks something give the answer from the given google sheet and after searching the google sheet if you don't found then politely apologies to the user."
},
"promptType": "define"
},
"typeVersion": 2.1
},
{
"id": "f1892eab-e3f3-40aa-a131-a5b5b1efde69",
"name": "Google Gemini Chat Model",
"type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
"position": [
-368,
-320
],
"parameters": {
"options": {}
},
"credentials": {
"googlePalmApi": {
"name": "<your credential>"
}
},
"typeVersion": 1
},
{
"id": "c017c9b2-adc7-43fa-8d1e-1b9d8d377179",
"name": "Send a text message",
"type": "n8n-nodes-base.telegram",
"position": [
-16,
-480
],
"parameters": {
"text": "={{ $json.output }}",
"chatId": "={{ $('Telegram Trigger').item.json.message.chat.id }}",
"additionalFields": {
"appendAttribution": false
}
},
"credentials": {
"telegramApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.2
},
{
"id": "964d23b1-d113-4932-a40b-b06549ece0e7",
"name": "Get row(s) in sheet in Google Sheets",
"type": "n8n-nodes-base.googleSheetsTool",
"position": [
-176,
-320
],
"parameters": {
"options": {},
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1GR4d8QZzg0DBewuo_jHHU9WaD_cxscxhebdb6mEAsoA/edit#gid=0",
"cachedResultName": "Sheet1"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1GR4d8QZzg0DBewuo_jHHU9WaD_cxscxhebdb6mEAsoA",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1GR4d8QZzg0DBewuo_jHHU9WaD_cxscxhebdb6mEAsoA/edit?usp=drivesdk",
"cachedResultName": "YouTube Video and Article Data"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 4.6
},
{
"id": "86e55dcc-5938-402e-b57d-e1fc059007bd",
"name": "Append row in sheet",
"type": "n8n-nodes-base.googleSheets",
"position": [
736,
48
],
"parameters": {
"columns": {
"value": {
"Data": "={{ $json.output['Article Refined Data'] }}",
"Title": "={{ $json.output.Title }}"
},
"schema": [
{
"id": "Title",
"type": "string",
"display": true,
"required": false,
"displayName": "Title",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Data",
"type": "string",
"display": true,
"required": false,
"displayName": "Data",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "append",
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1GR4d8QZzg0DBewuo_jHHU9WaD_cxscxhebdb6mEAsoA/edit#gid=0",
"cachedResultName": "Sheet1"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1GR4d8QZzg0DBewuo_jHHU9WaD_cxscxhebdb6mEAsoA",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1GR4d8QZzg0DBewuo_jHHU9WaD_cxscxhebdb6mEAsoA/edit?usp=drivesdk",
"cachedResultName": "YouTube Video and Article Data"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 4.6
},
{
"id": "c5b9b48e-3866-4c8c-88c1-b4b7eb3e4124",
"name": "Append row in sheet1",
"type": "n8n-nodes-base.googleSheets",
"position": [
928,
288
],
"parameters": {
"columns": {
"value": {
"Data": "={{ $json.output['Article Refined Data'] }}",
"Title": "={{ $json.output.Title }}"
},
"schema": [
{
"id": "Title",
"type": "string",
"display": true,
"required": false,
"displayName": "Title",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Data",
"type": "string",
"display": true,
"required": false,
"displayName": "Data",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "append",
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1GR4d8QZzg0DBewuo_jHHU9WaD_cxscxhebdb6mEAsoA/edit#gid=0",
"cachedResultName": "Sheet1"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1GR4d8QZzg0DBewuo_jHHU9WaD_cxscxhebdb6mEAsoA",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1GR4d8QZzg0DBewuo_jHHU9WaD_cxscxhebdb6mEAsoA/edit?usp=drivesdk",
"cachedResultName": "YouTube Video and Article Data"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 4.6
},
{
"id": "99a38def-5b64-4507-94d8-5cf47ccb7ce2",
"name": "Append or update row in sheet",
"type": "n8n-nodes-base.googleSheets",
"position": [
1136,
288
],
"parameters": {
"columns": {
"value": {
"URL ": "={{ $('Google Sheets Trigger').item.json['URL '] }}",
"Stored": "\u2705"
},
"schema": [
{
"id": "URL ",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "URL ",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Stored",
"type": "string",
"display": true,
"required": false,
"displayName": "Stored",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [
"URL "
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "appendOrUpdate",
"sheetName": {
"__rl": true,
"mode": "list",
"value": 800289465,
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1GR4d8QZzg0DBewuo_jHHU9WaD_cxscxhebdb6mEAsoA/edit#gid=800289465",
"cachedResultName": "Sheet2"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1GR4d8QZzg0DBewuo_jHHU9WaD_cxscxhebdb6mEAsoA",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1GR4d8QZzg0DBewuo_jHHU9WaD_cxscxhebdb6mEAsoA/edit?usp=drivesdk",
"cachedResultName": "YouTube Video and Article Data"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 4.6
},
{
"id": "ab850a10-f51f-4ab7-a498-f8c8ad0f29ba",
"name": "Google Sheets Trigger",
"type": "n8n-nodes-base.googleSheetsTrigger",
"position": [
-496,
192
],
"parameters": {
"event": "rowAdded",
"options": {},
"pollTimes": {
"item": [
{
"mode": "everyMinute"
}
]
},
"sheetName": {
"__rl": true,
"mode": "list",
"value": 800289465,
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1GR4d8QZzg0DBewuo_jHHU9WaD_cxscxhebdb6mEAsoA/edit#gid=800289465",
"cachedResultName": "Sheet2"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1GR4d8QZzg0DBewuo_jHHU9WaD_cxscxhebdb6mEAsoA",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1GR4d8QZzg0DBewuo_jHHU9WaD_cxscxhebdb6mEAsoA/edit?usp=drivesdk",
"cachedResultName": "YouTube Video and Article Data"
}
},
"credentials": {
"googleSheetsTriggerOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 1
},
{
"id": "2a200cc4-797d-41af-9b7a-141932ba3adc",
"name": "Filter",
"type": "n8n-nodes-base.filter",
"position": [
-288,
192
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "a8608350-5169-4bb1-b918-0a1f5cc13b49",
"operator": {
"type": "string",
"operation": "exists",
"singleValue": true
},
"leftValue": "={{ $json['URL '] }}",
"rightValue": ""
},
{
"id": "f2ebc482-feb4-49fa-975b-c68db3cb7a37",
"operator": {
"type": "string",
"operation": "empty",
"singleValue": true
},
"leftValue": "={{ $json.Stored }}",
"rightValue": ""
}
]
}
},
"typeVersion": 2.2
},
{
"id": "7d1bcee5-48e5-48d2-8c39-f0e34911d637",
"name": "Append or update row in sheet2",
"type": "n8n-nodes-base.googleSheets",
"position": [
944,
48
],
"parameters": {
"columns": {
"value": {
"URL ": "={{ $('Google Sheets Trigger').item.json['URL '] }}",
"Stored": "\u2705"
},
"schema": [
{
"id": "URL ",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "URL ",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Stored",
"type": "string",
"display": true,
"required": false,
"displayName": "Stored",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [
"URL "
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "appendOrUpdate",
"sheetName": {
"__rl": true,
"mode": "list",
"value": 800289465,
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1GR4d8QZzg0DBewuo_jHHU9WaD_cxscxhebdb6mEAsoA/edit#gid=800289465",
"cachedResultName": "Sheet2"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1GR4d8QZzg0DBewuo_jHHU9WaD_cxscxhebdb6mEAsoA",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1GR4d8QZzg0DBewuo_jHHU9WaD_cxscxhebdb6mEAsoA/edit?usp=drivesdk",
"cachedResultName": "YouTube Video and Article Data"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 4.6
},
{
"id": "a347917e-bacd-418c-861b-ad6149739922",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
-656,
-576
],
"parameters": {
"color": 6,
"width": 896,
"height": 432,
"content": "# Requesting Data"
},
"typeVersion": 1
},
{
"id": "7962782e-1a0b-47d1-b282-f6ff248de89d",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-656,
-32
],
"parameters": {
"color": 6,
"width": 2080,
"height": 592,
"content": "# Storing Data through YouTube Video URL / Article Link"
},
"typeVersion": 1
},
{
"id": "6a44be32-f815-4211-ae78-512c790c7060",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
1536,
80
],
"parameters": {
"color": 6,
"width": 1184,
"height": 480,
"content": "---\n\n# \ud83d\udee0 Setup Guide\n\n**Author:** [Rakin Jakaria](https://www.youtube.com/@rakinjakaria)\n\nFollow these steps to get started:\n\n1. **Connect your [Telegram Bot](https://core.telegram.org/bots#botfather)**\n Make sure your Telegram bot token is added to both the **Telegram Trigger** and **Send a text message** nodes in your N8N instance.\n\n2. **Plug in your [Apify](https://console.apify.com/actors/dB9f4B02ocpTICIEY/input) API token**\n You\u2019ll need this to fetch YouTube video transcripts. Replace the token inside the **HTTP Request** node URL with your own.\n\n3. **Plug in your [Gemini](https://aistudio.google.com/apikey) credentials**\n This allows the AI nodes to summarize video/article data using Google Gemini. Add your Gemini API key to the **Google Gemini (PaLM) API** credentials in N8N.\n\n4. **Connect your [Google Sheets](https://docs.google.com/spreadsheets/) account**\n This is where all your processed data will be stored. Make sure your Google Sheets OAuth credentials are set up and the sheet is shared with the connected account.\n\nOnce all four are connected, your workflow will be ready to run! \u2705\n\n---\n"
},
"typeVersion": 1
},
{
"id": "28025c13-a495-4642-95e7-9553270eae82",
"name": "Sticky Note3",
"type": "n8n-nodes-base.stickyNote",
"position": [
1536,
-672
],
"parameters": {
"color": 6,
"width": 464,
"height": 208,
"content": "\n# 1\ufe0f\u20e3 Purpose of This Agent\n\nThis workflow lets you:\n\n* **Extract summaries** from YouTube videos or articles.\n* **Store them** in a Google Sheet for later use.\n* **Query stored data** via Telegram.\n\n"
},
"typeVersion": 1
},
{
"id": "d64e3424-3c87-4847-85a1-adb924c1cde2",
"name": "Sticky Note4",
"type": "n8n-nodes-base.stickyNote",
"position": [
1536,
-352
],
"parameters": {
"color": 6,
"width": 544,
"height": 320,
"content": "# 2\ufe0f\u20e3 How to Use\n\n* Add a **YouTube link** or **article link** to the Google Sheet (**Sheet2**).\n* The workflow will automatically:\n\n * **Detect** the link type.\n * Use **Apify** (for YouTube transcripts) or **HTTP Request** (for articles).\n * **Summarize** using Google Gemini.\n * **Append** data to **Sheet1**.\n* In **Telegram**, send a message to the bot to **search stored summaries**."
},
"typeVersion": 1
}
],
"active": false,
"settings": {
"executionOrder": "v1"
},
"versionId": "64e8f139-a1ad-49de-8218-23eb6fd3ddbe",
"connections": {
"If": {
"main": [
[
{
"node": "HTTP Request",
"type": "main",
"index": 0
}
],
[
{
"node": "HTTP Request1",
"type": "main",
"index": 0
}
]
]
},
"Filter": {
"main": [
[
{
"node": "If",
"type": "main",
"index": 0
}
]
]
},
"AI Agent": {
"main": [
[
{
"node": "Send a text message",
"type": "main",
"index": 0
}
]
]
},
"Markdown": {
"main": [
[
{
"node": "Information Extractor",
"type": "main",
"index": 0
}
]
]
},
"HTTP Request": {
"main": [
[
{
"node": "Information Extractor1",
"type": "main",
"index": 0
}
]
]
},
"HTTP Request1": {
"main": [
[
{
"node": "Markdown",
"type": "main",
"index": 0
}
]
]
},
"Telegram Trigger": {
"main": [
[
{
"node": "AI Agent",
"type": "main",
"index": 0
}
]
]
},
"Append row in sheet": {
"main": [
[
{
"node": "Append or update row in sheet2",
"type": "main",
"index": 0
}
]
]
},
"Append row in sheet1": {
"main": [
[
{
"node": "Append or update row in sheet",
"type": "main",
"index": 0
}
]
]
},
"Google Sheets Trigger": {
"main": [
[
{
"node": "Filter",
"type": "main",
"index": 0
}
]
]
},
"Information Extractor": {
"main": [
[
{
"node": "Append row in sheet1",
"type": "main",
"index": 0
}
]
]
},
"Information Extractor1": {
"main": [
[
{
"node": "Append row in sheet",
"type": "main",
"index": 0
}
]
]
},
"Google Gemini Chat Model": {
"ai_languageModel": [
[
{
"node": "AI Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Google Gemini Chat Model1": {
"ai_languageModel": [
[
{
"node": "Information Extractor",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Google Gemini Chat Model2": {
"ai_languageModel": [
[
{
"node": "Information Extractor1",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Get row(s) in sheet in Google Sheets": {
"ai_tool": [
[
{
"node": "AI Agent",
"type": "ai_tool",
"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.
googlePalmApigoogleSheetsOAuth2ApigoogleSheetsTriggerOAuth2ApitelegramApi
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
How it works:
Source: https://n8n.io/workflows/7215/ — 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 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.
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
> AI-powered nutrition assistant for Telegram — log meals, set goals, and get personalized daily reports with Google Sheets integration.
This automation is designed to help you generate AI-powered music tracks, cover art, and fully rendered music videos — all triggered from a simple Telegram chat and managed via Google Sheets.
This workflow is designed for marketers, content creators, agencies, and solo founders who want to publish long‑form posts with visuals on autopilot using n8n and AI agents.