{
  "id": "S7iXi0gM8pGNQeHs",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "Finance Agent copy",
  "tags": [
    {
      "id": "dvlyjV9Qn8IpL9WC",
      "name": "Edit",
      "createdAt": "2025-09-28T15:00:37.886Z",
      "updatedAt": "2025-09-28T15:00:37.886Z"
    }
  ],
  "nodes": [
    {
      "id": "922cb0ad-be27-4f9a-aa2e-60110e10687f",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        288,
        32
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "triggerAtHour": 9
            },
            {
              "triggerAtHour": 3
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "54898dc0-620d-4fb3-907c-99bedb430354",
      "name": "Merge",
      "type": "n8n-nodes-base.merge",
      "position": [
        736,
        16
      ],
      "parameters": {
        "numberInputs": 3
      },
      "typeVersion": 3.2
    },
    {
      "id": "b66e6726-57c3-4dea-b985-702a86f74d83",
      "name": "Reuters Private Equity",
      "type": "n8n-nodes-base.rssFeedRead",
      "position": [
        512,
        32
      ],
      "parameters": {
        "url": "=https://www.nytimes.com/svc/collections/v1/publish/http://www.nytimes.com/topic/subject/private-equity/rss.xml",
        "options": {}
      },
      "typeVersion": 1.2
    },
    {
      "id": "8b3e61da-5fa5-4a83-a0a2-ddd5f2b736bf",
      "name": "M&A",
      "type": "n8n-nodes-base.rssFeedRead",
      "position": [
        512,
        -160
      ],
      "parameters": {
        "url": "=https://www.deallawyers.com/blog/feed",
        "options": {}
      },
      "typeVersion": 1.2
    },
    {
      "id": "9a82147b-d730-4f14-b811-6c31e3f64662",
      "name": "Yahoo Finance",
      "type": "n8n-nodes-base.rssFeedRead",
      "position": [
        512,
        224
      ],
      "parameters": {
        "url": "https://finance.yahoo.com/news/rssindex",
        "options": {}
      },
      "typeVersion": 1.2
    },
    {
      "id": "6eb2ee3b-2de6-4ecf-8612-ddff4d45fc03",
      "name": "Limit",
      "type": "n8n-nodes-base.limit",
      "position": [
        960,
        32
      ],
      "parameters": {
        "maxItems": 5
      },
      "typeVersion": 1
    },
    {
      "id": "4cc8216a-ddbc-4264-9865-bc348041f28e",
      "name": "Basic LLM Chain",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        1392,
        32
      ],
      "parameters": {
        "text": "=You are a professional writer who makes complex financial news easy to read and engaging.  \nRewrite each news item from the RSS feed as a short story of 5\u20136 lines.  \n{{ $json.news_summary }}\n\nUse this structure:\n\n1. <h2>Title</h2>  \n   Use the news item\u2019s own title.  \n\n2. <p>Write a short, continuous story that explains the news. Use a natural narrative style, as if you are explaining it to an interested reader.  \n   Complex terms should be briefly explained in parentheses.  \n   Do not use subheadings, bullet points, or questions. Only a flowing story of max 6 sentences.</p>  \n\n3. <p><em>Connection to the news:</em> End with 1\u20132 sentences that clearly link this story back to the original article.</p>  \n\nRules:  \n- Keep the language professional but simple.  \n- No \u201cwhat does this mean for you\u201d commentary.  \n- Do not use emojis or casual filler.  \n- Always format in HTML (<h2>, <p>).",
        "batching": {},
        "promptType": "define"
      },
      "typeVersion": 1.7
    },
    {
      "id": "d4c5120e-1a37-4fad-83bb-e3069092ff85",
      "name": "Code in JavaScript",
      "type": "n8n-nodes-base.code",
      "position": [
        1168,
        32
      ],
      "parameters": {
        "jsCode": "// Hent items fra Limit\nconst items = $input.all().map(item => item.json);\n\n// Bygg opp en strukturert tekst\nconst formatted = items.map(i => {\n  return `\ud83d\udcf0 ${i.title}\nAv: ${i.creator || i[\"dc:creator\"] || \"Ukjent\"}\nDato: ${i.pubDate}\nLenke: ${i.link}\n\nKort oppsummering:\n${i.contentSnippet || i.content || \"Ingen utdrag tilgjengelig\"}\n\n`;\n}).join(\"\\n---\\n\\n\");\n\n// Send videre som et felt\nreturn [{ json: { news_summary: formatted } }];"
      },
      "typeVersion": 2
    },
    {
      "id": "90da8177-6465-4c9e-929d-b22646b281d5",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        160,
        -96
      ],
      "parameters": {
        "width": 256,
        "height": 240,
        "content": "### \ud83d\udd52 Schedule Trigger  \nRuns at **09:00** and **15:00**.  \nChange the hours here if you want a different update time."
      },
      "typeVersion": 1
    },
    {
      "id": "ff939923-0a6f-4aa8-8fec-970e2e26b855",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1104,
        -128
      ],
      "parameters": {
        "height": 336,
        "content": "### \ud83d\udcbb Code in JavaScript  \nFormats the feed items into a **clean text block**.  \nEdit this code if you want a different layout.\n"
      },
      "typeVersion": 1
    },
    {
      "id": "7731ee52-51ba-4ed5-a797-f357ad60a26b",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1376,
        -128
      ],
      "parameters": {
        "width": 256,
        "height": 336,
        "content": "### \ud83e\udd16 Basic LLM Chain  \nAI Agent rewrites the news into **simple 5\u20136 sentence stories**.  \nYou can edit the prompt here to change the style."
      },
      "typeVersion": 1
    },
    {
      "id": "4b7c1670-a522-49fb-b0d1-3ec6d07a9b55",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1680,
        -128
      ],
      "parameters": {
        "height": 336,
        "content": "### \ud83d\udce7 Gmail Node  \nSends the summaries by email.  \nAdd your **Gmail credential** and set `{{RECIPIENT_EMAIL}}` here."
      },
      "typeVersion": 1
    },
    {
      "id": "a5ef153f-0177-4798-8254-f92caf797b73",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        1328,
        240
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini"
        },
        "options": {}
      },
      "typeVersion": 1.2
    },
    {
      "id": "48be1aee-fd69-4d16-a4a1-e74d979347c9",
      "name": "Send a message",
      "type": "n8n-nodes-base.gmail",
      "position": [
        1744,
        32
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 2.1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "cb58be02-5c4f-4c32-bd27-2b75e2229054",
  "connections": {
    "M&A": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Limit": {
      "main": [
        [
          {
            "node": "Code in JavaScript",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge": {
      "main": [
        [
          {
            "node": "Limit",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Yahoo Finance": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 2
          }
        ]
      ]
    },
    "Basic LLM Chain": {
      "main": [
        [
          {
            "node": "Send a message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "M&A",
            "type": "main",
            "index": 0
          },
          {
            "node": "Reuters Private Equity",
            "type": "main",
            "index": 0
          },
          {
            "node": "Yahoo Finance",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Basic LLM Chain",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Code in JavaScript": {
      "main": [
        [
          {
            "node": "Basic LLM Chain",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Reuters Private Equity": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ]
      ]
    }
  }
}