{
  "name": "AI News Auto-Publisher",
  "nodes": [
    {
      "parameters": {
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "typeVersion": 1.4,
      "position": [
        112,
        176
      ],
      "id": "ff673bb2-4800-4881-9e2b-625f83c3fa00",
      "name": "Manual Chat Trigger (testing)"
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "=A news item just hit the market. Use it as the basis for your post:\n\nTitle: {{ $json.title }}\nDetails: {{ $json.content }}",
        "options": {
          "systemMessage": "You are a real crypto market operator with skin in the game, based in Argentina, writing for a LatAm audience on a social feed. You are NOT an institutional analyst or a journalist. You are an operator who takes a data-backed stance.\n\nYour ONLY task is to receive a topic, news item, or idea and write an article under these strict rules:\n\n### 1. VOICE AND TONE\n- Measured first person: \"I have been watching\", \"I have traded this for years\", \"for me\". Zero grandiosity.\n- Take a position from the first sentence. \"This is bullish because X\" rather than \"it could go up or down\".\n- NO EMOJIS. No clickbait. No \"URGENT\" or \"WHAT NOBODY TELLS YOU\".\n- Always concrete data: levels ($65k), percentages, dates, volumes ($400M).\n- No \"this is not financial advice\" disclaimer. It is understood.\n- Neutral Spanish with a LatAm flavor.\n- No rigid subheadings. The article flows as an operator opinion.\n\n### 2. REQUIRED STRUCTURE\n1. A 1-2 sentence opening that takes a position (narrative tension, personal timeline, an immediate hard data point).\n2. What happened and what the superficial headlines miss.\n3. Operator analysis: technical levels, on-chain, flows. Historical comparison.\n4. A 24-72h thesis with concrete levels.\n5. A closing \"Key data\" section: one paragraph with exact figures and implicit sources.\n\n### 3. CRITICAL RULES - PLATFORM COMMUNITY GUIDELINES (penalized if violated)\n- NEVER mention competitor exchanges. Reframe toward the TICKER instead.\n- NEVER use signal / alpha / insider language.\n- NEVER make absolute predictions. Use: \"The setup is invalidated at X\".\n\n### 4. CASHTAG RULES (CRITICAL)\n- ABSOLUTE MAXIMUM of 3 cashtags per post.\n- Write $BTC / $ETH / $SOL with the dollar sign integrated naturally into the BODY of the text.\n- Pair them with a micro operational action.\n- Prioritize high-volume tickers. Avoid stablecoins and memecoins.\n\n### OUTPUT FORMAT (SUPREME RULE)\nYour response MUST be a single, valid JSON object and nothing else. No text before or after the braces, no Markdown outside the values.\nCRITICAL SYNTAX RULE: quotes and the closing brace are ONLY for the JSON structure. NEVER write them as part of the article text. Each post must end with a normal period, no extra programming symbols.\nRequired structure:\n{\n  \"linkedin\": \"A version of the post adapted for a professional network, keeping the tone but without restrictive cashtags.\",\n  \"social\": \"The main operator post applying ALL the rules and restrictions above.\"\n}"
        }
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 3.1,
      "position": [
        336,
        -368
      ],
      "id": "f28ca33d-5d96-4606-a854-7a26b7df6d34",
      "name": "AI Editor (CoinDesk pipeline)"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://www.binance.com/bapi/composite/v1/public/pgc/openApi/content/add",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "X-Square-OpenAPI-Key",
              "value": "={{ $env.SOCIAL_PUBLISH_API_KEY }}"
            }
          ]
        },
        "sendBody": true,
        "bodyParameters": {
          "parameters": [
            {
              "name": "bodyTextOnly",
              "value": "={{ JSON.parse($json.output).social }}"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.4,
      "position": [
        688,
        -64
      ],
      "id": "87224edd-3c86-493c-bf61-8a3c5b9a9de6",
      "name": "Publish to Social Feed"
    },
    {
      "parameters": {
        "modelName": "models/gemini-3.1-flash-lite",
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "typeVersion": 1.1,
      "position": [
        416,
        -144
      ],
      "id": "923dbafb-7eb9-40bc-a7d4-60f68721487e",
      "name": "Google Gemini Chat Model",
      "credentials": {
        "googlePalmApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "minutes",
              "minutesInterval": 30
            }
          ]
        }
      },
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1.3,
      "position": [
        -336,
        -256
      ],
      "id": "d92ece9e-203f-4eab-8001-28ab5ae6e089",
      "name": "Every 30 min (source A)",
      "onError": "continueRegularOutput"
    },
    {
      "parameters": {
        "url": "https://www.coindesk.com/arc/outboundfeeds/rss/",
        "options": {}
      },
      "type": "n8n-nodes-base.rssFeedRead",
      "typeVersion": 1.2,
      "position": [
        -112,
        -256
      ],
      "id": "dd1ff1e9-1937-4046-b6ac-9545e1fbae8d",
      "name": "RSS: CoinDesk"
    },
    {
      "parameters": {},
      "type": "n8n-nodes-base.limit",
      "typeVersion": 1,
      "position": [
        112,
        -256
      ],
      "id": "0d67f537-38da-477c-8ebf-061c66a97a44",
      "name": "Limit to 1"
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "=A news item just hit the market. Use it as the basis for your post:\n\nTitle: {{ $json.title }}\nDetails: {{ $json.content }}",
        "options": {
          "systemMessage": "You are a real crypto market operator with skin in the game, based in Argentina, writing for a LatAm audience on a social feed. You are NOT an institutional analyst or a journalist. You are an operator who takes a data-backed stance.\n\nYour ONLY task is to receive a topic, news item, or idea and write an article under these strict rules:\n\n### 1. VOICE AND TONE\n- Measured first person. Zero grandiosity.\n- Take a position from the first sentence.\n- NO EMOJIS. No clickbait.\n- Always concrete data: levels, percentages, dates, volumes.\n- Neutral Spanish with a LatAm flavor.\n\n### 2. REQUIRED STRUCTURE\n1. A 1-2 sentence opening that takes a position.\n2. What happened and what superficial headlines miss.\n3. Operator analysis: technical levels, on-chain, flows.\n4. A 24-72h thesis with concrete levels.\n5. A closing \"Key data\" section.\n\n### 3. CRITICAL RULES - PLATFORM COMMUNITY GUIDELINES\n- NEVER mention competitor exchanges. Reframe toward the TICKER.\n- NEVER use signal / alpha / insider language.\n- NEVER make absolute predictions. Use: \"The setup is invalidated at X\".\n\n### 4. CASHTAG RULES\n- ABSOLUTE MAXIMUM of 3 cashtags per post, integrated naturally in the body.\n- Prioritize high-volume tickers. Avoid stablecoins and memecoins.\n\n### OUTPUT FORMAT (SUPREME RULE)\nYour response MUST be a single, valid JSON object and nothing else.\nRequired structure:\n{\n  \"linkedin\": \"A version adapted for a professional network without restrictive cashtags.\",\n  \"social\": \"The main operator post applying ALL the rules above.\"\n}"
        }
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 3.1,
      "position": [
        336,
        80
      ],
      "id": "2ed64845-547d-46b4-aa6a-57f3ccbb37b0",
      "name": "AI Editor (Google News pipeline)"
    },
    {
      "parameters": {
        "url": "https://news.google.com/rss/search?q=criptomonedas+OR+bitcoin+OR+ethereum+when:24h&hl=es-419&gl=AR&ceid=AR:es-419",
        "options": {}
      },
      "type": "n8n-nodes-base.rssFeedRead",
      "typeVersion": 1.2,
      "position": [
        -112,
        -16
      ],
      "id": "7fc63f5e-d0fd-4d67-850f-6a7ca5d04b72",
      "name": "RSS: Google News (crypto, es-419)"
    },
    {
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "minutes",
              "minutesInterval": 30
            }
          ]
        }
      },
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1.3,
      "position": [
        -336,
        -16
      ],
      "id": "9afe6236-ce98-4db8-82d5-cb845767155c",
      "name": "Every 30 min (source B)",
      "onError": "continueRegularOutput"
    },
    {
      "parameters": {},
      "type": "n8n-nodes-base.limit",
      "typeVersion": 1,
      "position": [
        112,
        -16
      ],
      "id": "675cef94-e563-486e-ae2d-b85876ff2ec1",
      "name": "Limit to 1 "
    }
  ],
  "connections": {
    "Manual Chat Trigger (testing)": {
      "main": [
        [
          {
            "node": "AI Editor (Google News pipeline)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Editor (CoinDesk pipeline)": {
      "main": [
        [
          {
            "node": "Publish to Social Feed",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Editor (CoinDesk pipeline)",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "AI Editor (Google News pipeline)",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Every 30 min (source A)": {
      "main": [
        [
          {
            "node": "RSS: CoinDesk",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "RSS: CoinDesk": {
      "main": [
        [
          {
            "node": "Limit to 1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Limit to 1": {
      "main": [
        [
          {
            "node": "AI Editor (CoinDesk pipeline)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Editor (Google News pipeline)": {
      "main": [
        [
          {
            "node": "Publish to Social Feed",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "RSS: Google News (crypto, es-419)": {
      "main": [
        [
          {
            "node": "Limit to 1 ",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Every 30 min (source B)": {
      "main": [
        [
          {
            "node": "RSS: Google News (crypto, es-419)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Limit to 1 ": {
      "main": [
        [
          {
            "node": "AI Editor (Google News pipeline)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1",
    "binaryMode": "separate",
    "availableInMCP": false
  },
  "versionId": "00000000-0000-0000-0000-000000000000",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "nodeGroups": [],
  "id": "REPLACE_WITH_YOUR_WORKFLOW_ID",
  "tags": []
}