RAG System (Google Drive + Supabase)
This workflow creates a RAG system that:
- Monitors Google Drive for new PDFs and automatically extracts/processes their content
- Splits documents into chunks with AI-generated context and stores them in a vector database
- Provides a chat interface where users can ask questions about the stored documents
- Uses hybrid search with reranking to find the most relevant information and generate AI responses
- Includes deduplication to avoid reprocessing unchanged files
Shared 8/31/2025
418 views
Visual Workflow
JSON Code
{
"meta": {
"instanceId": "125637e355429ab06f8886794f7df9252a3e338f92a1957141a8989e48f2b612",
"templateCredsSetupCompleted": true
},
"nodes": [
{
"id": "981c5a92-96cd-4d49-8f69-8148f2d08235",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1504,
-16
],
"parameters": {
"width": 520,
"height": 80,
"content": "### Example Input: https://www.instagram.com/reel/DKKNpv-A_8e/\n"
},
"typeVersion": 1
},
{
"id": "847c06b7-413e-405a-beb2-f818f8f6c9ff",
"name": "On form submission",
"type": "n8n-nodes-base.formTrigger",
"position": [
-1456,
-224
],
"webhookId": "8515a041-3f58-4580-a3ed-61d8d615a377",
"parameters": {
"options": {},
"formTitle": "Infinite Content Ideas",
"formFields": {
"values": [
{
"fieldLabel": "Instagram Reel URL",
"placeholder": "https://www.instagram.com/reel/"
}
]
}
},
"typeVersion": 2.2
},
{
"id": "b5daf884-3621-4e19-957e-43d23e1c9b99",
"name": "Update Sheet with Reel Concepts",
"type": "n8n-nodes-base.googleSheets",
"position": [
800,
-224
],
"parameters": {
"columns": {
"value": {
"ID": "={{ $('Save Relevant Comments to Sheet').item.json.ID }}",
"Hook": "={{ $json.choices[0].message.content.hook }}",
"Outline": "={{ $json.choices[0].message.content.outline }}",
"Template Used": "={{ $json.choices[0].message.content.template_used }}"
},
"schema": [
{
"id": "ID",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "ID",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Comment",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Comment",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Likes Count",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Likes Count",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Author",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Author",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Timestamp",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Timestamp",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Template Used",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Template Used",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Hook",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Hook",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Outline",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Outline",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [
"ID"
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "appendOrUpdate",
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1NtkAjuIdVQDF5MHN9gES6k9-83TcDx0vBZO-Zl-1p_w/edit#gid=0",
"cachedResultName": "Sheet1"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1NtkAjuIdVQDF5MHN9gES6k9-83TcDx0vBZO-Zl-1p_w",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1NtkAjuIdVQDF5MHN9gES6k9-83TcDx0vBZO-Zl-1p_w/edit?usp=drivesdk",
"cachedResultName": "Instagram Comments "
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "qVntjW61XxH91qGU",
"name": "Google Sheets account"
}
},
"typeVersion": 4.5
},
{
"id": "ffef8121-140f-4591-9c64-9dff6c4f5b91",
"name": "Generate Reel Hook and Outline",
"type": "@n8n/n8n-nodes-langchain.openAi",
"position": [
432,
-368
],
"parameters": {
"modelId": {
"__rl": true,
"mode": "list",
"value": "gpt-4.1-mini",
"cachedResultName": "GPT-4.1-MINI"
},
"options": {},
"messages": {
"values": [
{
"content": "=You are a helpful content creator assistant. \nTopic: {{ $json.choices[0].message.content.topic }}\nResearch: {{ $json.choices[0].message.content.research_overview }}"
},
{
"role": "system",
"content": "=## Overview \nYou are an AI agent tasked with transforming a researched Instagram reel topic into a compelling reel concept. Your responsibilities include crafting a high-engagement hook and structuring a clear outline based on provided research.\n\n## Context \n- You will receive a reel topic and a 300–500 word research overview generated by a previous agent. \n- Your role is to turn this into a viewer-grabbing **hook** and a logically sequenced **outline** for a potential Instagram reel on Shaz Mathew's personal account (@theshazm). \n- The account focuses on AI content marketing, YouTube lead generation, business scaling stories, and entrepreneurship insights, particularly around building content systems that drive real business results. \n- The target audience includes entrepreneurs, coaches, consultants, content creators, and B2B service providers interested in scaling their businesses through AI-powered content and systematic lead generation. \n- The tone should be personal, results-driven, and curiosity-driven while remaining actionable and authentic to Shaz's entrepreneurial journey. \n- You are not responsible for scripting, only ideation and structuring for short-form content. \n\n## Video Structure Framework\nAll reels should follow this proven 5-part structure for maximum engagement:\n- **CATCH** - Pattern interrupt that grabs attention (2-3 seconds)\n- **HOOK** - Addresses pain point & promises solution (5-8 seconds) \n- **FRUSTRATION/DESIRE** - Deepens emotional connection (5-10 seconds)\n- **SERVE** - Delivers promised value (Educational, Engaging, Entertaining)\n- **WTF (Why To Follow)** - Clear but brief value proposition/CTA\n\n## Content Templates for Shaz's Brand\nChoose the most appropriate template based on the research topic:\n\n**Authority Sales Conversion**: Client success stories + actionable tips + soft CTA\n**Stories That Sell**: Personal journey/results + challenge/solution + lesson + invitation \n**Perfect Video Pitch**: Pain point + solution + social proof + offer + objection handling\n**False Statement**: Misconception + correction + proof + expertise demonstration\n**Rule of 3's**: Hook + 3 actionable tips + promise + soft CTA\n\n## Instructions \n1. Read the `topic` and `research_overview`. \n2. **Select the most appropriate template** from the options above based on the content type.\n3. Generate a compelling hook designed to capture interest within 2-3 seconds. \n - Use pattern interrupts, bold questions, surprising insights, or powerful benefits\n - Should resonate with entrepreneurs seeking business scaling, content systems, or AI solutions\n4. Create a structured outline (4-6 bullet points) following your chosen template structure. \n - Align with Shaz's expertise: AI content systems, lead generation, business scaling, entrepreneurship stories\n - Include emotional connection points and clear value delivery\n - End with appropriate CTA (strategy call booking, community join, content engagement)\n5. Output results in JSON format with three keys: `template_used`, `hook`, and `outline`. \n\n## Tools \n- None (uses only provided data)\n\n## Examples \n- Input: \n```json\n{\n \"topic\": \"The Real Story: How I Went from $0 to $102K/Month (And What I Wish I Knew Earlier)\",\n \"research_overview\": \"Agency scaling has become increasingly challenging in 2024-2025, with market saturation and rising acquisition costs forcing entrepreneurs to adopt more sophisticated growth strategies. According to recent industry reports from AgencyAnalytics, only 23% of marketing agencies successfully scale beyond $100K monthly recurring revenue...\"\n}\n```\n- Output: \n```json\n{\n \"template_used\": \"Stories That Sell\",\n \"hook\": \"I scaled to $102K/month but made 3 mistakes that cost me $50K+ in the process.\",\n \"outline\": [\n \"CATCH: The brutal reality - 77% of agencies never hit $100K/month\",\n \"HOOK: Why I almost failed despite having the right strategies\", \n \"FRUSTRATION: Mistake #1 - Scaling before systemizing lead generation\",\n \"SERVE: The content system that changed everything + 2 other critical fixes\",\n \"WTF: How to avoid these mistakes (link to free strategy call)\"\n ]\n}\n```\n\n## SOP (Standard Operating Procedure) \n1. Ingest the `topic` and `research_overview`. \n2. **Analyze content type** and select the most appropriate template:\n - Personal stories/results → Stories That Sell\n - Client success stories → Authority Sales Conversion \n - Addressing misconceptions → False Statement\n - Teaching strategies → Rule of 3's\n - Selling solutions → Perfect Video Pitch\n3. Create a pattern-interrupt hook that grabs attention within 2-3 seconds. \n4. Structure the outline using the 5-part framework (CATCH-HOOK-FRUSTRATION-SERVE-WTF) with 4-6 points.\n5. Output in strict JSON format with the keys: `template_used`, `hook`, and `outline`.\n\n## Final Notes \n- **Template Selection is Critical**: Choose based on content type to maximize engagement and conversion potential.\n- **Follow the 5-Part Structure**: CATCH-HOOK-FRUSTRATION-SERVE-WTF ensures optimal viewer retention and action.\n- The hook should use pattern interrupts specific to Shaz's niche: AI content systems, proven scaling methods, or entrepreneurship insights. \n- Each outline point should map to the chosen template structure and deliver substantial value quickly.\n- **CTA Alignment**: Match the call-to-action to Shaz's primary goals (strategy calls, community joining, content engagement).\n- Remember reels need immediate impact—front-load the most compelling information within the first 5 seconds.\n- Ensure content reflects Shaz's authentic voice and real experience rather than generic business advice.\n\n---"
}
]
},
"simplify": false,
"jsonOutput": true
},
"credentials": {
"openAiApi": {
"id": "YlmU06HqWiBuScWV",
"name": "OpenAi account"
}
},
"typeVersion": 1.8
},
{
"id": "cdd82656-e862-4eea-9828-881715ac37a2",
"name": "Web Search Tool",
"type": "@n8n/n8n-nodes-langchain.toolHttpRequest",
"position": [
128,
-176
],
"parameters": {
"url": "https://api.tavily.com/search",
"method": "POST",
"jsonBody": "{\n \"query\": \"{searchTerm}\",\n \"topic\": \"general\",\n \"search_depth\": \"advanced\",\n \"chunks_per_source\": 3,\n \"max_results\": 1,\n \"time_range\": null,\n \"days\": 7,\n \"include_answer\": true,\n \"include_raw_content\": false,\n \"include_images\": false,\n \"include_image_descriptions\": false,\n \"include_domains\": [],\n \"exclude_domains\": []\n}",
"sendBody": true,
"sendHeaders": true,
"specifyBody": "json",
"toolDescription": "Use this tool to search the web. ",
"parametersHeaders": {
"values": [
{
"name": "Content-Type",
"value": "application/json",
"valueProvider": "fieldValue"
},
{
"name": "Authorization",
"value": "Bearer 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",
"valueProvider": "fieldValue"
}
]
},
"placeholderDefinitions": {
"values": [
{
"name": "searchTerm",
"description": "what the user is searching for information on. "
}
]
}
},
"typeVersion": 1.1
},
{
"id": "4673139e-46b2-4e5e-aefd-55176cb576b6",
"name": "Research and Create Reel Topic",
"type": "@n8n/n8n-nodes-langchain.openAi",
"position": [
48,
-368
],
"parameters": {
"modelId": {
"__rl": true,
"mode": "list",
"value": "gpt-4.1-mini",
"cachedResultName": "GPT-4.1-MINI"
},
"options": {},
"messages": {
"values": [
{
"content": "=You are a helpful research assistant. \n\nInstagram comment to analyze: {{ $json.Comment }}"
},
{
"role": "system",
"content": "=## Overview \nYou are an AI agent specialized in extracting content-worthy topics from Instagram comments on Shaz Mathew's personal account (@theshazm) and conducting real-time research to support Instagram reel ideation for his AI content marketing and entrepreneurship content.\n\n## Objectives: \nBegin by analyzing the Instagram comment from Shaz's personal account to identify a relevant, engaging, and curiosity-driven topic related to AI content marketing, YouTube lead generation, business automation, or entrepreneurship. \n\n### Important!!!\nOnce the topic is extracted, use the Tavily tool to perform real-time research based on that topic.\n\nBased on your findings, return a structured JSON object that includes:\n- A clear and compelling Instagram reel topic derived from the comment that aligns with Shaz's personal brand and expertise \n- A 300–500 word research overview that: \n - Expands on the topic with current, factual information about AI tools, content marketing trends, entrepreneurship, or business automation \n - Includes recent trends, statistics, and real-world examples from the B2B/SaaS/coaching space (citing sources like \"according to [source]\") \n - Maintains an educational, actionable, and business-focused tone optimized for short-form content with a personal touch \n - Highlights why the topic is timely, profitable, or useful for entrepreneurs, B2B service providers, coaches, and consultants \n - Connects the research to practical applications for scaling businesses, lead generation, and content systems\n - Considers how the topic can be presented in an engaging, personal storytelling format suitable for Shaz's Instagram reels\n\n## Focus Areas for Research:\n- AI content creation tools and workflows\n- YouTube marketing strategies for personal brands and B2B lead generation\n- Content repurposing automation and systems\n- Entrepreneurship journey and business scaling stories\n- Lead generation through personal branding and content marketing\n- AI-powered social media strategies\n- Converting content views into sales calls and business opportunities\n- Content marketing ROI and case studies\n- Emerging AI tools for marketing automation\n- Personal brand building for entrepreneurs and service providers\n\n## Output Instructions: \n- Your ONLY output should be a JSON object with the keys: `topic` and `research_overview`. \n- Do not include any setup text, notes, or formatting outside of the JSON object. \n- Ensure the research overview is between 300–500 words and tightly aligned with the topic. \n- Focus on actionable insights that Shaz's audience (entrepreneurs, B2B businesses, coaches, consultants) can implement.\n- Consider how the content can be adapted for short-form, personal storytelling in Instagram reels format.\n\n## Example Workflow: \n1) Receive an Instagram comment from Shaz's account (e.g., \"Bro how did you actually scale from 0 to 102k/month? Need the real story\") \n2) Extract the core topic implied by the comment (e.g., \"The Real Story: How I Scaled My Agency from $0 to $102K/Month\") \n3) Use Tavily to search for up-to-date information about agency scaling strategies, common growth challenges, and success factors \n4) Write a 300–500 word summary that outlines scaling frameworks, recent case studies, and actionable strategies suitable for personal brand reel content \n5) Return the result in this exact format: \n```json\n{\n \"topic\": \"The Real Story: How I Went from $0 to $102K/Month (And What I Wish I Knew Earlier)\",\n \"research_overview\": \"Agency scaling has become increasingly challenging in 2024-2025, with market saturation and rising acquisition costs forcing entrepreneurs to adopt more sophisticated growth strategies. According to recent industry reports from AgencyAnalytics, only 23% of marketing agencies successfully scale beyond $100K monthly recurring revenue...\"\n}\n```\n\n## Target Audience Alignment:\nEnsure all topics and research directly serve Shaz Mathew's personal brand audience:\n- Aspiring entrepreneurs looking to scale their first business\n- B2B service providers seeking systematic growth strategies\n- Coaches and consultants wanting to build personal brands that generate leads \n- SaaS founders looking to automate and scale their marketing\n- Content creators interested in AI-powered growth strategies\n- Business owners transitioning from traditional marketing to content-driven lead generation\n- Entrepreneurs seeking behind-the-scenes insights from someone who's successfully scaled"
}
]
},
"simplify": false,
"jsonOutput": true
},
"credentials": {
"openAiApi": {
"id": "YlmU06HqWiBuScWV",
"name": "OpenAi account"
}
},
"typeVersion": 1.8
},
{
"id": "dc42aca5-176c-4a9f-9e85-fc4e2577360a",
"name": "Process Each Comment",
"type": "n8n-nodes-base.splitInBatches",
"position": [
-176,
-224
],
"parameters": {
"options": {}
},
"typeVersion": 3
},
{
"id": "65be0d37-b231-46d9-be4f-287c240f0d6f",
"name": "Save Relevant Comments to Sheet",
"type": "n8n-nodes-base.googleSheets",
"position": [
-400,
-224
],
"parameters": {
"columns": {
"value": {
"ID": "={{ $('Scrape Instagram Comments').item.json.id }}",
"Author": "={{ $('Scrape Instagram Comments').item.json.ownerUsername }}",
"Comment": "={{ $('Scrape Instagram Comments').item.json.text }}",
"Timestamp": "={{ $('Scrape Instagram Comments').item.json.timestamp }}",
"Likes Count": "={{ $('Scrape Instagram Comments').item.json.likesCount }}"
},
"schema": [
{
"id": "ID",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "ID",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Comment",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Comment",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Likes Count",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Likes Count",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Author",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Author",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Timestamp",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Timestamp",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Template Used",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Template Used",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Hook",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Hook",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Outline",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Outline",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [
"ID"
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "appendOrUpdate",
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1NtkAjuIdVQDF5MHN9gES6k9-83TcDx0vBZO-Zl-1p_w/edit#gid=0",
"cachedResultName": "Sheet1"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1NtkAjuIdVQDF5MHN9gES6k9-83TcDx0vBZO-Zl-1p_w",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1NtkAjuIdVQDF5MHN9gES6k9-83TcDx0vBZO-Zl-1p_w/edit?usp=drivesdk",
"cachedResultName": "Instagram Comments "
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "qVntjW61XxH91qGU",
"name": "Google Sheets account"
}
},
"typeVersion": 4.5
},
{
"id": "7c7a641a-39f3-4bc3-8cd0-a89dee92028d",
"name": "Scrape Instagram Comments",
"type": "n8n-nodes-base.httpRequest",
"position": [
-1216,
-224
],
"parameters": {
"url": "https://api.apify.com/v2/acts/apify~instagram-comment-scraper/run-sync-get-dataset-items",
"options": {},
"jsonBody": "={\n \"directUrls\": [\"{{ $json['Instagram Reel URL'] }}\"]\n,\n \"includeNestedComments\": false,\n \"isNewestComments\": false,\n \"resultsLimit\": 15\n} ",
"sendBody": true,
"specifyBody": "json",
"authentication": "genericCredentialType",
"genericAuthType": "httpBearerAuth"
},
"credentials": {
"httpBearerAuth": {
"id": "iY8H078a2KNxUk0z",
"name": "Apify token"
}
},
"typeVersion": 4.2
},
{
"id": "3cf4d028-4cee-47ff-828f-3453b0d238e0",
"name": "Filter Relevant Comments",
"type": "n8n-nodes-base.filter",
"position": [
-624,
-224
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "b8035c7a-4a27-48b6-8632-93120cdf4b32",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.choices[0].message.content.output }}",
"rightValue": "Yes"
}
]
}
},
"typeVersion": 2.2
},
{
"id": "9659b774-1bce-4daf-95c3-57f4a53568d6",
"name": "Analyze Comment for Content Ideas",
"type": "@n8n/n8n-nodes-langchain.openAi",
"position": [
-1008,
-224
],
"parameters": {
"modelId": {
"__rl": true,
"mode": "list",
"value": "gpt-4.1-mini",
"cachedResultName": "GPT-4.1-MINI"
},
"options": {},
"messages": {
"values": [
{
"content": "=You are a helpful, intelligent content writing assistant. \n\nPlease review the following Instagram comment.\n\nInstagram Comment: {{ $json.text }}"
},
{
"role": "system",
"content": "=## Overview\nYou are an AI agent responsible for analyzing Instagram comments and determining whether they contain a relevant idea or inspiration for new content on AttractAI's AI content marketing Instagram account.\n\n## Context\n- AttractAI is an AI Social Media & AI Content Marketing Agency run by Shaz Mathew.\n- They help B2B businesses, coaches, SaaS companies, founders, and consultants book 10-30 qualified sales calls every month using AI and YouTube.\n- Their Instagram showcases how to build scalable content systems, YouTube lead generation funnels, and AI-powered content repurposing strategies.\n- AttractAI is expert in AI content infrastructure, short-form content repurposing, lead generation automation, and converting content views into booked sales calls.\n- The goal is to identify comments that could lead to tutorials, strategy breakdowns, tool walkthroughs, or deeper dives into AI content marketing + lead generation intersections.\n\n## Instructions\n1. Read the Instagram comment provided via input.\n2. Evaluate whether the comment contains one or more of the following types of content opportunities:\n - A direct or implied suggestion for a tutorial on YouTube lead funnels, AI content creation, or content repurposing systems.\n - A question about building AI content infrastructure, automating social media, or scaling lead generation through content.\n - A comment that connects content creation with lead booking, sales calls, or revenue generation.\n - Feedback or confusion that highlights areas where further explanation about AI content systems would help the audience.\n - Curiosity about turning YouTube videos into lead machines, repurposing content across platforms, or AI-driven content workflows.\n - Requests or suggestions that touch on AttractAI's areas of authority: YouTube marketing, AI content creation, lead generation, or B2B content systems.\n3. Output only:\n - **\"Yes\"** → if there is a viable content idea.\n - **\"No\"** → if the comment does not suggest a topic AttractAI could turn into content.\n\n## Tools\n- Input: `{{ $json.text }}`\n\n## Examples\n- **Input:** \"How do you turn YouTube views into actual booked calls? Need this system!\" \n **Output:** Yes\n- **Input:** \"Can you show how to repurpose one YouTube video across all social platforms using AI?\" \n **Output:** Yes\n- **Input:** \"Still struggling to create content that actually converts leads.\" \n **Output:** Yes\n- **Input:** \"Love this content! 🔥\" \n **Output:** No\n- **Input:** \"Following for the AI tips!\" \n **Output:** No\n- **Input:** \"What's the best AI tool for scripting YouTube videos that generate leads?\" \n **Output:** Yes\n\n## SOP (Standard Operating Procedure)\n1. Parse the Instagram comment from `{{ $json.text }}`.\n2. Review the content against the relevance checklist under Instructions.\n3. Assess whether the comment aligns with AttractAI's expertise or the account's core topics.\n4. Output \"Yes\" or \"No\" based on the presence or absence of content opportunity.\n\n## Final Notes\n- Emphasize relevance to AttractAI's brand: AI content systems, YouTube lead generation, content repurposing, and converting content into sales calls.\n- Avoid tagging generic compliments or off-topic comments as relevant.\n- When in doubt, favor inclusion if there's a clear path from the comment to a teachable, engaging, or high-leverage content topic for B2B service providers."
}
]
},
"simplify": false,
"jsonOutput": true
},
"credentials": {
"openAiApi": {
"id": "YlmU06HqWiBuScWV",
"name": "OpenAi account"
}
},
"typeVersion": 1.8
}
],
"pinData": {},
"connections": {
"Web Search Tool": {
"ai_tool": [
[
{
"node": "Research and Create Reel Topic",
"type": "ai_tool",
"index": 0
}
]
]
},
"On form submission": {
"main": [
[
{
"node": "Scrape Instagram Comments",
"type": "main",
"index": 0
}
]
]
},
"Process Each Comment": {
"main": [
[],
[
{
"node": "Research and Create Reel Topic",
"type": "main",
"index": 0
}
]
]
},
"Filter Relevant Comments": {
"main": [
[
{
"node": "Save Relevant Comments to Sheet",
"type": "main",
"index": 0
}
]
]
},
"Scrape Instagram Comments": {
"main": [
[
{
"node": "Analyze Comment for Content Ideas",
"type": "main",
"index": 0
}
]
]
},
"Generate Reel Hook and Outline": {
"main": [
[
{
"node": "Update Sheet with Reel Concepts",
"type": "main",
"index": 0
}
]
]
},
"Research and Create Reel Topic": {
"main": [
[
{
"node": "Generate Reel Hook and Outline",
"type": "main",
"index": 0
}
]
]
},
"Save Relevant Comments to Sheet": {
"main": [
[
{
"node": "Process Each Comment",
"type": "main",
"index": 0
}
]
]
},
"Update Sheet with Reel Concepts": {
"main": [
[
{
"node": "Process Each Comment",
"type": "main",
"index": 0
}
]
]
},
"Analyze Comment for Content Ideas": {
"main": [
[
{
"node": "Filter Relevant Comments",
"type": "main",
"index": 0
}
]
]
}
}
}