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 →
{
"name": "Multi AI Agents",
"nodes": [
{
"parameters": {
"aggregate": "aggregateAllItemData",
"include": "specifiedFields",
"fieldsToInclude": "title, raw_content",
"options": {}
},
"id": "423a6089-62c2-40c9-bf2b-13c8fe861502",
"name": "Aggregate",
"type": "n8n-nodes-base.aggregate",
"typeVersion": 1,
"position": [
2000,
280
]
},
{
"parameters": {
"fieldToSplitOut": "results",
"options": {}
},
"id": "e66f59eb-995a-4c03-b054-2d6e3189dfb7",
"name": "Split Out",
"type": "n8n-nodes-base.splitOut",
"typeVersion": 1,
"position": [
1840,
280
]
},
{
"parameters": {
"method": "POST",
"url": "https://api.tavily.com/search",
"sendBody": true,
"specifyBody": "json",
"jsonBody": "={\n \"api_key\": \"YOUR-API-KEY-HERE\",\n \"query\": \"{{ $json.query.replace(/\"/g, '\\\\\"') }}\",\n \"search_depth\": \"basic\",\n \"include_answer\": true,\n \"topic\": \"news\",\n \"include_raw_content\": true,\n \"max_results\": 3\n} ",
"options": {}
},
"id": "fa11a3a4-bf61-4356-b802-e4f18960beb6",
"name": "Search Internet",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
1680,
280
]
},
{
"parameters": {
"options": {}
},
"id": "c4a0c7fd-6ced-4184-b8fa-e8c53e707fc6",
"name": "OpenAI Chat Model1",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"typeVersion": 1,
"position": [
1540,
680
],
"credentials": {
"openAiApi": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"options": {}
},
"id": "f8d4ca08-b7da-4941-b271-8b8caf1fcc28",
"name": "OpenAI Chat Model2",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"typeVersion": 1,
"position": [
1860,
680
],
"credentials": {
"openAiApi": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"operation": "update",
"documentId": {
"__rl": true,
"value": "139g8ULrzBTi7GSSCAm7lXR8mDdc6IiKr8XXV_eN01lo",
"mode": "list",
"cachedResultName": "Content Creation",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/139g8ULrzBTi7GSSCAm7lXR8mDdc6IiKr8XXV_eN01lo/edit?usp=drivesdk"
},
"sheetName": {
"__rl": true,
"value": "gid=0",
"mode": "list",
"cachedResultName": "Sheet1",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/139g8ULrzBTi7GSSCAm7lXR8mDdc6IiKr8XXV_eN01lo/edit#gid=0"
},
"columns": {
"mappingMode": "defineBelow",
"value": {
"Campaign": "={{ $('Google Sheets Trigger').item.json.Campaign }}",
"Blog": "={{ $('Blog Writer').item.json.output }}",
"LinkedIn": "={{ $('LinkedIn').item.json.output }}",
"X": "={{ $('X').item.json.output }}"
},
"matchingColumns": [
"Campaign"
],
"schema": [
{
"id": "Campaign",
"displayName": "Campaign",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true,
"removed": false
},
{
"id": "Content Subject",
"displayName": "Content Subject",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true,
"removed": true
},
{
"id": "Target Audience",
"displayName": "Target Audience",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true,
"removed": true
},
{
"id": "LinkedIn",
"displayName": "LinkedIn",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true,
"removed": false
},
{
"id": "X",
"displayName": "X",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
},
{
"id": "Blog",
"displayName": "Blog",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
},
{
"id": "row_number",
"displayName": "row_number",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true,
"readOnly": true,
"removed": false
}
]
},
"options": {}
},
"id": "803574de-8968-4486-81d4-c06c6e6eebfa",
"name": "Update Campaign",
"type": "n8n-nodes-base.googleSheets",
"typeVersion": 4.5,
"position": [
2180,
520
],
"credentials": {
"googleSheetsOAuth2Api": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"options": {}
},
"id": "34f91dbf-ea57-4a21-9d22-1a24dd017218",
"name": "OpenAI Chat Model",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"typeVersion": 1,
"position": [
1220,
680
],
"credentials": {
"openAiApi": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"pollTimes": {
"item": [
{
"mode": "everyMinute"
}
]
},
"documentId": {
"__rl": true,
"value": "139g8ULrzBTi7GSSCAm7lXR8mDdc6IiKr8XXV_eN01lo",
"mode": "list",
"cachedResultName": "Content Creation",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/139g8ULrzBTi7GSSCAm7lXR8mDdc6IiKr8XXV_eN01lo/edit?usp=drivesdk"
},
"sheetName": {
"__rl": true,
"value": "gid=0",
"mode": "list",
"cachedResultName": "Sheet1",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/139g8ULrzBTi7GSSCAm7lXR8mDdc6IiKr8XXV_eN01lo/edit#gid=0"
},
"event": "rowAdded",
"options": {}
},
"id": "7846a507-aea7-48ab-bc8b-b958d412de8c",
"name": "Google Sheets Trigger",
"type": "n8n-nodes-base.googleSheetsTrigger",
"typeVersion": 1,
"position": [
1360,
280
],
"credentials": {
"googleSheetsTriggerOAuth2Api": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"assignments": {
"assignments": [
{
"id": "b493a3c6-939a-4301-9257-055b80c28d7a",
"name": "query",
"value": "={{ $json['Content Subject'] }}",
"type": "string"
},
{
"id": "e2813669-08fd-4d0d-a215-b0634032330b",
"name": "targetAudience",
"value": "={{ $json['Target Audience'] }}",
"type": "string"
}
]
},
"options": {}
},
"id": "23dac821-424e-450a-ad4a-cf5a44db1660",
"name": "Set Search Fields",
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
1520,
280
]
},
{
"parameters": {
"agent": "conversationalAgent",
"promptType": "define",
"text": "=Article Content:\n{{ $('Aggregate').item.json.data.toJsonString() }}\n\nTarget Audience:\n{{ $('Set Search Fields').item.json.targetAudience }}",
"options": {
"systemMessage": "# System Role\nYou are a skilled and creative blog writer, capable of crafting engaging, concise, and well-structured two-paragraph blog articles based on provided content.\n\n# Task Specification\nWrite a two-paragraph blog article using the provided content. The blog should be coherent, engaging, and informative, tailored to a general audience. Ensure the tone is professional yet approachable, and the structure flows logically from introduction to conclusion.\n\n# Specifics and Context\nThis task is essential for producing quick, high-quality blog articles that capture readers' attention while accurately conveying the intended message. By writing clear and engaging content, you help brands or individuals establish thought leadership and connect with their audience effectively.\n\n# Examples\n## Example 1\n**Input:** \nContent: \"Remote work has grown 44% in the last five years. Benefits include flexibility and reduced commute times. Challenges include maintaining productivity and combating isolation.\"\n\n**Output:** \nRemote work has become a transformative trend, with a 44% increase in adoption over the past five years. The appeal lies in its flexibility, allowing employees to tailor their schedules and eliminate time-consuming commutes. This shift has unlocked new possibilities for work-life balance and broadened the talent pool for businesses willing to embrace remote setups.\n\nHowever, remote work isn\u2019t without its challenges. Employees often face difficulties in maintaining productivity outside a structured office environment and struggle with feelings of isolation. Addressing these concerns requires thoughtful solutions, such as virtual collaboration tools and strategies to foster connection, ensuring remote work remains both productive and fulfilling.\n\n## Example 2\n**Input:** \nContent: \"The Mediterranean diet includes fruits, vegetables, whole grains, and healthy fats like olive oil. Studies show it reduces the risk of heart disease and supports brain health.\"\n\n**Output:** \nThe Mediterranean diet has long been celebrated as one of the healthiest eating patterns in the world. Emphasizing fresh fruits, vegetables, whole grains, and heart-healthy fats like olive oil, this diet is as delicious as it is nutritious. Its flavorful diversity makes it easy to adopt and sustain, whether you\u2019re enjoying a vibrant Greek salad or a wholesome bowl of minestrone.\n\nWhat sets the Mediterranean diet apart is its scientifically backed health benefits. Numerous studies highlight its ability to reduce the risk of heart disease and support cognitive health, making it a cornerstone for longevity and wellness. By prioritizing natural, unprocessed foods, this lifestyle offers a sustainable approach to eating well and living better.\n\n# Reminders\n- Maintain clarity and logical flow between paragraphs.\n- Ensure the tone is engaging yet professional.\n- Keep the blog concise and aligned with the provided content.\n"
}
},
"id": "40d7a420-de9e-4e8f-973a-e5c63d472ace",
"name": "Blog Writer",
"type": "@n8n/n8n-nodes-langchain.agent",
"typeVersion": 1.7,
"position": [
1840,
520
]
},
{
"parameters": {
"agent": "conversationalAgent",
"promptType": "define",
"text": "=Article Content:\n{{ $json.data.toJsonString() }}\n\nTarget Audience:\n{{ $('Set Search Fields').item.json.targetAudience }}",
"options": {
"systemMessage": "# System Role \nYou are an expert LinkedIn content creator specializing in transforming incoming articles into highly engaging posts tailored to a specific target audience. \n\n# Task Specification \nUsing the provided article, craft a LinkedIn post that is: \n1. Written in a concise, engaging tone optimized for readability on mobile. \n2. Tailored specifically to the target audience\u2019s interests, needs, and professional goals. \n3. Plain text only, with frequent line breaks for clarity. \n4. Incorporates 1-2 emojis to enhance personality and appeal. \n5. Provides actionable value and includes a clear call to action. \n6. Contains 3-5 relevant hashtags. \n7. Outputs only the post text\u2014nothing else. \n\n# Specifics and Context \nThe post should succinctly capture the core message of the article while resonating with the audience\u2019s values. It must sound human and conversational, staying under 3,000 characters. \n\n# Examples \n## Example 1 \n**Input:** Article about productivity tips for managers. \n**Output:** \n\ud83d\udd25 Time to Supercharge Your Productivity! \n\nManagers, are your days packed with back-to-back meetings and endless to-do lists? Here\u2019s the secret to working smarter, not harder: [insight summary]. \n\n\ud83d\udc49 Top tips to stay ahead: \n1. Prioritize tasks using the Eisenhower Matrix. \n2. Block time on your calendar for deep focus. \n3. Delegate effectively to your team. \n\nWhat strategies help you lead and manage your time effectively? Share your thoughts below! \n\n#Leadership #TimeManagement #Productivity \n\n# Reminders \n- Ensure the content aligns with the target audience's interests and challenges. \n- Always include 1-2 emojis and a call to action. \n- Use plain text and only output the post content. \n"
}
},
"id": "84ac99f7-ce16-475b-a1e6-c0873bc9ba1e",
"name": "LinkedIn",
"type": "@n8n/n8n-nodes-langchain.agent",
"typeVersion": 1.7,
"position": [
1200,
520
]
},
{
"parameters": {
"agent": "conversationalAgent",
"promptType": "define",
"text": "=Article Content:\n{{ $('Aggregate').item.json.data.toJsonString() }}\n\nTarget Audience:\n{{ $('Set Search Fields').item.json.targetAudience }}",
"options": {
"systemMessage": "=# System Role \nYou are an expert Twitter content creator specializing in transforming articles into engaging, concise tweets tailored to a specific target audience. \n\n# Task Specification \nUsing the provided article, craft a tweet that is: \n1. Short, concise, and optimized for Twitter\u2019s character limit (280 characters). \n2. Tailored to resonate with the target audience\u2019s interests, needs, and goals. \n3. Incorporates 1-2 emojis to enhance personality and appeal. \n4. Offers value or insight and includes a clear call to action. \n5. Contains 1-3 relevant hashtags. \n6. Outputs only the tweet text\u2014nothing else. \n\n# Specifics and Context \nThe tweet should distill the essence of the article into a single impactful message. It must grab attention, provide immediate value, and encourage engagement (e.g., likes, replies, or clicks). \n\n# Examples \n## Example 1 \n**Input:** Article about productivity tips for managers. \n**Output:** \n\ud83d\udd25 Overwhelmed by meetings and to-dos? Managers, here\u2019s how to stay ahead: \n- Use the Eisenhower Matrix. \n- Block focus time. \n- Delegate smarter. \n\nWhat\u2019s your top time-management hack? Let\u2019s share! \u23f0 \n\n#Leadership #Productivity \n\n# Reminders \n- Keep the tone approachable and engaging. \n- Use emojis sparingly for emphasis. \n- Ensure the tweet stays within 280 characters and is tailored to the audience. \n- Only output the tweet text. \n"
}
},
"id": "00405bf5-fcf3-4ace-96bf-59fe008989d2",
"name": "X",
"type": "@n8n/n8n-nodes-langchain.agent",
"typeVersion": 1.7,
"position": [
1520,
520
]
}
],
"connections": {
"Split Out": {
"main": [
[
{
"node": "Aggregate",
"type": "main",
"index": 0
}
]
]
},
"Search Internet": {
"main": [
[
{
"node": "Split Out",
"type": "main",
"index": 0
}
]
]
},
"Aggregate": {
"main": [
[
{
"node": "LinkedIn",
"type": "main",
"index": 0
}
]
]
},
"OpenAI Chat Model1": {
"ai_languageModel": [
[
{
"node": "X",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"OpenAI Chat Model2": {
"ai_languageModel": [
[
{
"node": "Blog Writer",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"OpenAI Chat Model": {
"ai_languageModel": [
[
{
"node": "LinkedIn",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Google Sheets Trigger": {
"main": [
[
{
"node": "Set Search Fields",
"type": "main",
"index": 0
}
]
]
},
"Set Search Fields": {
"main": [
[
{
"node": "Search Internet",
"type": "main",
"index": 0
}
]
]
},
"Blog Writer": {
"main": [
[
{
"node": "Update Campaign",
"type": "main",
"index": 0
}
]
]
},
"LinkedIn": {
"main": [
[
{
"node": "X",
"type": "main",
"index": 0
}
]
]
},
"X": {
"main": [
[
{
"node": "Blog Writer",
"type": "main",
"index": 0
}
]
]
}
},
"active": false,
"settings": {
"executionOrder": "v1"
},
"versionId": "06888b61-670f-49d5-a3c8-a679f02f0c7f",
"meta": {
"templateCredsSetupCompleted": true
},
"id": "ZgF0bQWiwUrloQO3",
"tags": []
}
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.
googleSheetsOAuth2ApigoogleSheetsTriggerOAuth2ApiopenAiApi
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
Multi AI Agents. Uses httpRequest, lmChatOpenAi, googleSheets, googleSheetsTrigger. Event-driven trigger; 12 nodes.
Source: https://github.com/Ayushsinha2004/new_agent/blob/4f0adc05e2deeaabac2dcbe82940ddf4ca6a573c/n8n/rag.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 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.
AI-Powered Keyword Cannibalization Detection Workflow
A ready-to-use n8n workflow that turns new Google Sheets rows (title + summary) into brand-safe images using Nano Banana (via KIE.ai), writes the image URL back to your sheet, generates a tweet text,
Import this workflow into your n8n instance. Add your Apify, Google Sheets, and Firecrawl credentials. Activate the workflow to start your automated lead enrichment system. Copy the webhook URL from t