{
  "id": "N7KWviJRX2umCMhS",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "Twitter Agent",
  "tags": [],
  "nodes": [
    {
      "id": "0399c7f6-c5dd-4b4e-91db-549c7fec85bd",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -208,
        -224
      ],
      "parameters": {
        "width": 740,
        "height": 624,
        "content": "# Try It Out!\n\nLaunch X-Ray\u2014your personal crypto intelligence agent that tracks market narratives, performs deep research, and drafts viral tweets.\n\n**To get started:**\n\n1. **Connect all credentials** (OpenAI, CryptoPanic, Google Search, Sheets & Gmail).\n2. **Setup your API Keys**:\n   \u2022 **CryptoPanic**: Get your token [here](https://cryptopanic.com/developers/api/). *Pro Tip: Create a second account/key if you hit rate limits.*\n   \u2022 **Google Search**: Enable the [Custom Search API](https://console.cloud.google.com/) and create a [Programmable Search Engine](https://programmablesearchengine.google.com/) for your CX ID.\n3. **Customize your niche**: Adjust the keywords in the **Narrative Analyst** agent (e.g., RWA, DeFi, L2).\n4. **Activate the workflow**: Receive daily tweet drafts in your inbox and Google Sheets for final review.\n\n## \u2699\ufe0f How it works:\n\u2022 \ud83d\udd0d **Monitor**: Fetches real-time news from CryptoPanic.\n\u2022 \ud83e\udde0 **Analyze**: AI filters for high-impact stories based on your niche.\n\u2022 \u270d\ufe0f **Draft**: Generates structured, viral tweet drafts with deep context.\n\u2022 \ud83d\udcec **Review**: \"Human-in-the-loop\" approval via Gmail & Sheets.\n\n## Questions or Need Help?\n\nFor setup assistance, customization, or workflow support \ud83c\udf10 [Contact me here](https://www.cadaero.ovh)\n\nHappy automating! -- Cyrille d'Urbal"
      },
      "typeVersion": 1
    },
    {
      "id": "3f691ddb-d300-46c8-8ce8-323edd7138db",
      "name": "Structured Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        1840,
        512
      ],
      "parameters": {
        "autoFix": true,
        "jsonSchemaExample": "[\n  {\n    \"title\": \"Tether Set to Hit $15B Profit...\",\n    \"summary\": \"Tether vise 15 Md$ de profit et pr\u00e9pare un nouveau stablecoin. Signal que les stablecoins deviennent un business g\u00e9ant.\",\n    \"category\": \"stablecoin\",\n    \"published_at\": \"2025-10-25\",\n    \"slug\": \"Tether-Set-to-Hit-15B-Profit-Eyes-USAT-Stablecoin-Launch-in-December\",\n    \"id\": \"1234\"\n  }\n]\n"
      },
      "notesInFlow": true,
      "typeVersion": 1.3
    },
    {
      "id": "8e8e53ae-2962-4557-8926-63c41b6a9116",
      "name": "Format output",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        2128,
        112
      ],
      "parameters": {
        "options": {},
        "fieldToSplitOut": "output"
      },
      "typeVersion": 1
    },
    {
      "id": "b2abb6f4-5409-4a5c-a182-4878de23af94",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        624,
        -224
      ],
      "parameters": {
        "color": 7,
        "width": 1056,
        "height": 1168,
        "content": "## 1. Data Sourcing\n\nFetches the latest market news from CryptoPanic API\n\n### \ud83d\udca1 API Configuration\n**CryptoPanic Setup:**\n1. Log in to [CryptoPanic Developers](https://cryptopanic.com/developers/api/) to get your **API Token**.\n2. **Pro Tip**: If you hit rate limits, create a second account to generate an additional API Key as a fallback."
      },
      "typeVersion": 1
    },
    {
      "id": "b261cc2b-9ff1-426e-ab4c-31fd20730ee3",
      "name": "Save tweet",
      "type": "n8n-nodes-base.googleSheets",
      "notes": "SET UP CREDENTIALS\n\nCREATE A GOOGLE SHEET WITH FOLLOWING COLUMN\n\"date\"\n\"slug\"\n\"title\"\n\"category\"\n\"tweet\"",
      "position": [
        4192,
        624
      ],
      "parameters": {
        "columns": {
          "value": {
            "id": "={{ $json['id'] }}",
            "date": "={{ $json['published_at'] }}",
            "slug": "={{ $json['slug'] }}",
            "title": "={{ $json['title'] }}",
            "tweet": "={{ $json['output'] }}",
            "category": "={{ $json['category'] }}"
          },
          "schema": [
            {
              "id": "id",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "id",
              "defaultMatch": true,
              "canBeUsedToMatch": true
            },
            {
              "id": "date",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "date",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "slug",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "slug",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "title",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "title",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "category",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "category",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "tweet",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "tweet",
              "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/1dnvrTH7GT1M_sS_UvSPY1bwuMspoO4O4-39kUmW6dyM/edit#gid=0",
          "cachedResultName": "tweets"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1dnvrTH7GT1M_sS_UvSPY1bwuMspoO4O4-39kUmW6dyM",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1dnvrTH7GT1M_sS_UvSPY1bwuMspoO4O4-39kUmW6dyM/edit?usp=drivesdk",
          "cachedResultName": "X news"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "f09c3497-ffc5-4788-a965-e52ec7020101",
      "name": "Parser AI",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "notes": "SET UP CREDENTIALS",
      "position": [
        1840,
        688
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "notesInFlow": true,
      "typeVersion": 1.2
    },
    {
      "id": "b444b206-3d4a-49fd-ae4e-468ee6355503",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1744,
        -224
      ],
      "parameters": {
        "color": 7,
        "width": 944,
        "height": 1168,
        "content": "## 2. AI Filtering & Research\n\nIdentifies relevant news based on your keywords and performs deep research for context.\n\n### \ud83d\udca1 API Configuration\n**Google Custom Search Setup:**\n1. Enable the **Custom Search API** in the [Google Cloud Console](https://console.cloud.google.com/) to get your **API Key**.\n2. Create a search engine in the [Programmable Search Engine](https://programmablesearchengine.google.com/) to get your **Search Engine ID (CX)**."
      },
      "typeVersion": 1
    },
    {
      "id": "01dcc912-7daa-4b9f-9f71-38b934fdc67c",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2736,
        -208
      ],
      "parameters": {
        "color": 7,
        "width": 1024,
        "height": 1168,
        "content": "## 3. Content Creation\n\nExtracts full article content and generates engaging tweet drafts with a structured format.\n\n"
      },
      "typeVersion": 1
    },
    {
      "id": "456a04e7-0840-4fd9-85be-0ac66c2f98d2",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3808,
        -208
      ],
      "parameters": {
        "color": 7,
        "width": 848,
        "height": 1168,
        "content": "## 4. Archiving & Notification\n\nSaves everything to your database and sends a daily digest for your final approval."
      },
      "typeVersion": 1
    },
    {
      "id": "202b45ba-9740-477e-8242-25f573e8c089",
      "name": "Data Assembler",
      "type": "n8n-nodes-base.merge",
      "position": [
        3152,
        304
      ],
      "parameters": {
        "mode": "combine",
        "options": {},
        "combineBy": "combineByPosition",
        "numberInputs": 3
      },
      "typeVersion": 3.2
    },
    {
      "id": "79a24cd4-4ed5-4537-b273-8aa3c925c069",
      "name": "Content Scraper",
      "type": "n8n-nodes-base.httpRequest",
      "onError": "continueRegularOutput",
      "position": [
        2816,
        512
      ],
      "parameters": {
        "url": "={{ $json['items'][0]['link'] }}",
        "options": {}
      },
      "typeVersion": 4.3,
      "alwaysOutputData": false
    },
    {
      "id": "6aca1e2f-9731-49c7-8de1-4ae46af3a01b",
      "name": "Narrative Analyst",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "notes": "SET UP CREDENTIALS",
      "position": [
        1776,
        112
      ],
      "parameters": {
        "text": "=You are a crypto news analysis assistant designed for a beginner audience.\n\n\ud83c\udfaf GOAL:\nFrom a JSON array named \"results\", identify and summarize only the relevant news based on the criteria below, then return a structured JSON array usable by another system.\n\n\ud83e\udde9 SELECTION CRITERIA:\nKeep only news that discusses:\n\n* Stablecoins (USDT, USDC, CBDC, digital currencies, etc.)\n* Regulation, laws, or political decisions related to crypto\n* Real-world asset tokenization (RWA, tokenized securities, bonds, real estate, etc.)\n* Influential figures (presidents, CEOs, politicians, known investors, crypto figures like CZ, Saylor, Trump, etc.)\n* Known companies or institutions (BlackRock, FED, ECB, Ferrari, Apple, Google, Coinbase, Ripple, Tether, etc.)\n\n\u2699\ufe0f PROCESSING RULES:\n\n1. Iterate through each object in the `results` array.\n2. Keep only items that match at least one of the criteria above.\n3. For each selected news item:\n* Read: `title`, `description`, `published_at`.\n* Create a summary in **clear English**, maximum **2 sentences**.\n* Highlight:\n\u2022 Key figures ($, %, amounts, billions, numbers)\n\u2022 Known names (people, companies, institutions)\n\u2022 The impact (regulation, adoption, innovation, finance\u2026)\n* Avoid all technical jargon.\n\n\n4. Ignore news unrelated to these themes.\n5. No limit on the number of articles, but do not add anything if no news is relevant.\n\n\ud83d\udce6 OUTPUT FORMAT:\nYou MUST return a JSON array where each entry has exactly these keys:\n\n* \"title\": string\n* \"summary\": string\n* \"category\": one of these exact values: \"stablecoin\", \"regulation\", \"rwa\", \"personality\", \"institution\"\n* \"published_at\": ISO date YYYY-MM-DD (extract it from the `published_at` field)\n* \"source\": put the `slug` field here\n* \"id\": keep the original id\n\nEXPECTED FORMAT EXAMPLE (structure example, do not use as content):\n[\n  {\n    \"title\": \"Tether Set to Hit $15B Profit...\",\n    \"summary\": \"Tether vise 15 Md$ de profit et pr\u00e9pare un nouveau stablecoin. Signal que les stablecoins deviennent un business g\u00e9ant.\",\n    \"category\": \"stablecoin\",\n    \"published_at\": \"2025-10-25\",\n    \"slug\": \"Tether-Set-to-Hit-15B-Profit-Eyes-USAT-Stablecoin-Launch-in-December\",\n    \"id\": \"1234\"\n  }\n]\n\nIMPORTANT:\nYou MUST respond ONLY with a JSON array.\nNo intro.\nNo ```json.\nNo \"action\" field.\nNo \"text\" field.\nNo \"output\" field.\nOnly: [\n{ \"title\": \"...\", \"summary\": \"...\", \"category\": \"...\", \"published_at\": \"...\", \"source\": \"...\", \"id\": \"...\" },\n...\n]\n\nNOW PROCESS THIS DATA:\n{{ JSON.stringify($json[\"results\"], null, 2) }}",
        "options": {},
        "promptType": "define",
        "hasOutputParser": true
      },
      "notesInFlow": true,
      "typeVersion": 3.1
    },
    {
      "id": "46b3ab20-1cf1-4334-84a4-9910d4299c0a",
      "name": "Tweet Architect",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "notes": "CUSTOMIZE TWEET",
      "position": [
        3504,
        320
      ],
      "parameters": {
        "text": "=You are a copywriter specializing in crypto news.\nYour role is to write punchy, clear, and beginner-friendly tweets based on the provided content.\n\n\ud83c\udfaf GOAL\n\nUsing the JSON data below, you must generate a single punchy tweet accessible to a non-expert audience.\n\nThe `content` field already contains the cleaned text of the web page (article, press release, etc.): do not call any external tools.\n\n\ud83e\uddfe 1. Source Analysis\n\nAnalyze the following fields:\n\n`content` \u2192 full cleaned text of the article (no HTML)\n\n`title` \u2192 original title\n\n`summary` \u2192 short summary\n\n`category` \u2192 article theme (stablecoin, regulation, rwa, institution, personality\u2026)\n\n`published_at`, `slug`, `id`, `url`\n\nFrom these elements, identify:\n\nKey amounts ($, %, billions, etc.)\n\nKnown names (SEC, FED, Binance, Tether, Trump, BlackRock, HKMA, etc.)\n\nThe context (regulation, adoption, innovation, scam, etc.)\n\n\u270d\ufe0f 2. Tweet Writing Rules\n\nAlways start with: \ud83d\udea8 DAILY NEWS\n\nSpace out the text: use double line breaks between each block.\n\nPrioritize highlighting:\n\nA key figure (amount, %, billions, etc.)\n\nAn institution name or famous personality\n\nExplain in simple words what this means for a beginner (regulation, adoption, security, innovation\u2026).\n\nYou MUST end with the link: {{ $json[\"url\"] }}\n\nDo not exceed 280 characters (text + line breaks + link).\nA slight margin is tolerated for the link.\n\nAdd exactly 2 hashtags based on the category:\n\nstablecoin \u2192 #Stablecoin #Crypto\n\nregulation \u2192 #Regulation #Crypto\n\nrwa \u2192 #RWA #Finance\n\npersonnalite \u2192 #Web3 #Crypto\n\ninstitution \u2192 #Finance #Crypto\n\notherwise \u2192 #Crypto #Web3\n\nExpected style: clear, dynamic, factual, positive.\n\u26a0\ufe0f No jargon (e.g., \"Ponzi\", \"CBDC\", \"tokenization\") without explaining it in 3 simple words.\n\nExpected output: only the final tweet.\nNo explanation, justification, or preamble.\n\n\ud83d\udce6 3. Input Data (JSON)\n\nTitle: {{$json[\"title\"]}}\n\nSummary: {{$json[\"summary\"]}}\n\nCategory: {{$json[\"category\"]}}\n\nDate: {{$json[\"published_at\"]}}\n\nSlug: {{$json[\"slug\"]}}\n\nId: {{$json[\"id\"]}}\n\nURL: {{$json[\"url\"]}}\n\nContent: {{$json[\"content\"]}}\n\n\ud83d\udca1 4. Example Case\n\nIf `content` indicates that the Nigerian SEC reveals citizens lost $218M in Ponzi schemes, your tweet must:\n\nPut $218M right at the start,\n\nMention the SEC,\n\nBriefly explain the importance of regulation,\n\nEnd with the link,\n\nAnd include #Regulation #Crypto.\n\n\ud83e\uddfe 5. Output Format (Mandatory)\n\nProvide ONLY the final tweet, e.g.:\n\n\ud83d\udea8 DAILY NEWS\n\n\ud83c\uddf3\ud83c\uddec The Nigerian SEC warns: $218M vanished in Ponzi schemes.\n\nProof that without regulation or financial education, scams explode.\n\n[https://www.cryptopolitan.com/nigerians-have-lost-218-million-to-ponzi/](https://www.cryptopolitan.com/nigerians-have-lost-218-million-to-ponzi/)\n\n#Regulation #Crypto",
        "options": {},
        "promptType": "define"
      },
      "notesInFlow": true,
      "typeVersion": 3
    },
    {
      "id": "3cf6791b-5275-4c60-8983-36c36411c110",
      "name": "Brain Engine",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        3504,
        608
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-3.5-turbo",
          "cachedResultName": "gpt-3.5-turbo"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "3b1295d1-fa67-488e-ab67-2bd8b529c59e",
      "name": "Daily Check",
      "type": "n8n-nodes-base.scheduleTrigger",
      "notes": "Customize the trigger. Currently every 6 hours",
      "position": [
        688,
        128
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "hours",
              "hoursInterval": 6,
              "triggerAtMinute": 59
            }
          ]
        }
      },
      "notesInFlow": true,
      "typeVersion": 1.2
    },
    {
      "id": "39b61974-b5cb-4216-b23a-15a161d1dcf7",
      "name": "Fetch Market News",
      "type": "n8n-nodes-base.httpRequest",
      "notes": "Configure Auth",
      "onError": "continueRegularOutput",
      "position": [
        1040,
        128
      ],
      "parameters": {
        "url": "https://cryptopanic.com/api/developer/v2/posts/",
        "options": {},
        "authentication": "genericCredentialType",
        "genericAuthType": "httpQueryAuth"
      },
      "credentials": {
        "httpQueryAuth": {
          "name": "<your credential>"
        }
      },
      "notesInFlow": true,
      "typeVersion": 4.2
    },
    {
      "id": "2aec7d7e-bf8b-4c88-8c18-f1ef4f783441",
      "name": "Fetch Market News Backup",
      "type": "n8n-nodes-base.httpRequest",
      "notes": "Configure Auth",
      "onError": "continueRegularOutput",
      "position": [
        1504,
        272
      ],
      "parameters": {
        "url": "https://cryptopanic.com/api/developer/v2/posts/",
        "options": {},
        "authentication": "genericCredentialType",
        "genericAuthType": "httpQueryAuth"
      },
      "credentials": {
        "httpQueryAuth": {
          "name": "<your credential>"
        }
      },
      "notesInFlow": true,
      "typeVersion": 4.2
    },
    {
      "id": "76788bf3-693d-4fc0-b2f7-734af7a5c795",
      "name": "Check API Status",
      "type": "n8n-nodes-base.if",
      "position": [
        1280,
        128
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "1f0b803f-423c-4ee9-93b6-257c1dd986b8",
              "operator": {
                "type": "object",
                "operation": "empty",
                "singleValue": true
              },
              "leftValue": "={{ $json.error }}",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "9698af54-5b2e-418d-8487-ffe1987551bd",
      "name": "Curation Intelligence",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "notes": "SET UP CREDIENTIALS",
      "position": [
        1776,
        352
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "notesInFlow": true,
      "typeVersion": 1.2
    },
    {
      "id": "1b6a1e9b-f3b8-44c6-ad23-9f896001dc77",
      "name": "Process Selected News",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        2336,
        112
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "2b21ae70-ffcd-4ca7-a348-2b2d1d480c16",
      "name": "Content Purifier",
      "type": "n8n-nodes-base.code",
      "position": [
        2992,
        512
      ],
      "parameters": {
        "jsCode": "\n\nconst html = $input.first().json.data ?? \"\";\n// Supprime les balises HTML, garde 10 000 premiers caract\u00e8res max\n\n const text = html.replace(/<script[\\s\\S]*?<\\/script>/gi, '')\n   .replace(/<link[\\s\\S]*?<\\/link>/gi, '')\n   .replace(/<meta[\\s\\S]*?<\\/meta>/gi, '')\n   .replace(/<button[\\s\\S]*?<\\/button>/gi, '')\n   .replace(/<li[\\s\\S]*?<\\/li>/gi, '')\n    .replace(/<style[\\s\\S]*?<\\/style>/gi, '')\n   .replace(/<footer[\\s\\S]*?<\\/footer>/gi, '') \n    .replace(/<svg[\\s\\S]*?<\\/svg>/gi, '').trim();\n\n// Supprime les balises autofermantes comme <link />, <meta />, <img />, etc.\nconst cleantext = text.replace(/<\\s*(footer|button|link|meta|img|br|hr|input|source|track|wbr|embed|param|area|col|base|keygen|command|frame|iframe|object|picture|portal|slot|data|bgsound|isindex)[^>]*\\/?>/gi, '').trim();\n\nconst MAX = 12000;\nconst snippet = cleantext.slice(0, MAX)\n\nreturn [{ json: { content: snippet } }];"
      },
      "typeVersion": 2
    },
    {
      "id": "e6cc79e1-104f-4c01-b562-ac0d7d18438d",
      "name": "Daily Recap Aggregator",
      "type": "n8n-nodes-base.merge",
      "position": [
        3984,
        160
      ],
      "parameters": {
        "mode": "combine",
        "options": {},
        "combineBy": "combineAll"
      },
      "typeVersion": 3.2
    },
    {
      "id": "7afe3973-928f-40c2-b068-1974ae645378",
      "name": "Data Purifier",
      "type": "n8n-nodes-base.code",
      "position": [
        3328,
        320
      ],
      "parameters": {
        "jsCode": "const item = $input.first().json;\n\nconst first = item.items && item.items[0] ? item.items[0].link : null;\n\n// On supprime les champs inutiles (queries, kind, etc.)\n// Construit un nouvel objet en excluant \"queries\" et \"kind\"\nconst { queries, kind, searchInformation, context, items, ...cleaned } = item;\n\nreturn {\n  json: {\n    ...cleaned,\n    url: first,\n  },\n};\n"
      },
      "typeVersion": 2
    },
    {
      "id": "832f6351-fd86-4cd6-be68-f63d4e60e98e",
      "name": "Send Review Notification",
      "type": "n8n-nodes-base.gmail",
      "position": [
        4160,
        -32
      ],
      "parameters": {
        "sendTo": "user@example.com",
        "message": "=Categorie: {{ $json['category'] }}\nDate: {{ $json['date'] }}\nTitre: {{ $json['title'] }}\n\n{{ $json['tweet'] }}\n\n",
        "options": {
          "appendAttribution": false
        },
        "subject": "={{$json['category']}} : {{ $json['title'] }}",
        "emailType": "text"
      },
      "credentials": {
        "gmailOAuth2": {
          "name": "<your credential>"
        }
      },
      "notesInFlow": false,
      "typeVersion": 2.1
    },
    {
      "id": "16d6768d-7159-4dfd-ba11-6a94c433e1cb",
      "name": "Google Deep Context Research",
      "type": "n8n-nodes-base.httpRequest",
      "notes": "SET UP CREDENTIALS",
      "position": [
        2512,
        432
      ],
      "parameters": {
        "url": "https://www.googleapis.com/customsearch/v1",
        "options": {},
        "sendQuery": true,
        "authentication": "genericCredentialType",
        "genericAuthType": "httpQueryAuth",
        "queryParameters": {
          "parameters": [
            {
              "name": "=cx",
              "value": "=015006539695750909647:jf5zbnim0fy"
            },
            {
              "name": "q",
              "value": "={{ $json['slug'] }}"
            },
            {
              "name": "num",
              "value": "1"
            }
          ]
        }
      },
      "credentials": {
        "httpQueryAuth": {
          "name": "<your credential>"
        }
      },
      "notesInFlow": true,
      "typeVersion": 4.3
    }
  ],
  "active": true,
  "settings": {
    "callerPolicy": "workflowsFromSameOwner",
    "errorWorkflow": "N7KWviJRX2umCMhS",
    "availableInMCP": false,
    "executionOrder": "v1",
    "timeSavedPerExecution": 10
  },
  "versionId": "c1de9d26-8b22-4857-bcde-a95a6adbd0a3",
  "connections": {
    "Parser AI": {
      "ai_languageModel": [
        [
          {
            "node": "Structured Output Parser",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Save tweet": {
      "main": [
        [
          {
            "node": "Process Selected News",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Daily Check": {
      "main": [
        [
          {
            "node": "Fetch Market News",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Brain Engine": {
      "ai_languageModel": [
        [
          {
            "node": "Tweet Architect",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Data Purifier": {
      "main": [
        [
          {
            "node": "Tweet Architect",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format output": {
      "main": [
        [
          {
            "node": "Process Selected News",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Data Assembler": {
      "main": [
        [
          {
            "node": "Data Purifier",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Content Scraper": {
      "main": [
        [
          {
            "node": "Content Purifier",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Tweet Architect": {
      "main": [
        [
          {
            "node": "Daily Recap Aggregator",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Check API Status": {
      "main": [
        [
          {
            "node": "Narrative Analyst",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Fetch Market News Backup",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Content Purifier": {
      "main": [
        [
          {
            "node": "Data Assembler",
            "type": "main",
            "index": 2
          }
        ]
      ]
    },
    "Fetch Market News": {
      "main": [
        [
          {
            "node": "Check API Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Narrative Analyst": {
      "main": [
        [
          {
            "node": "Format output",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Curation Intelligence": {
      "ai_languageModel": [
        [
          {
            "node": "Narrative Analyst",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Process Selected News": {
      "main": [
        [
          {
            "node": "Send Review Notification",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Daily Recap Aggregator",
            "type": "main",
            "index": 0
          },
          {
            "node": "Google Deep Context Research",
            "type": "main",
            "index": 0
          },
          {
            "node": "Data Assembler",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Daily Recap Aggregator": {
      "main": [
        [
          {
            "node": "Save tweet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Market News Backup": {
      "main": [
        [
          {
            "node": "Narrative Analyst",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Narrative Analyst",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Google Deep Context Research": {
      "main": [
        [
          {
            "node": "Data Assembler",
            "type": "main",
            "index": 1
          },
          {
            "node": "Content Scraper",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}