{
  "id": "nPoiePylbYZrH7kn",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "Summarize Daily Financial News Using n8n & AI \u2013 Auto Email Report",
  "tags": [],
  "nodes": [
    {
      "id": "de6a3f50-13db-4869-96c4-00efb1633b0d",
      "name": "Schedule Daily Trigger\t",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        0,
        240
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "triggerAtHour": 7
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "7e60e85a-8357-4fcb-a5af-37f47caa23dc",
      "name": "Fetch Financial News Webpage\t",
      "type": "n8n-nodes-base.httpRequest",
      "notes": "Url : https://www.ft.com/",
      "position": [
        220,
        240
      ],
      "parameters": {
        "url": "https://www.ft.com/",
        "options": {
          "timeout": 10000
        }
      },
      "notesInFlow": true,
      "typeVersion": 4.2
    },
    {
      "id": "1e4d85bf-311c-4f61-972b-bfac77d085e0",
      "name": "Delay to Ensure Page Load\t",
      "type": "n8n-nodes-base.wait",
      "position": [
        440,
        240
      ],
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "819d8425-cc56-4277-9b7b-c5de0794d2b0",
      "name": "Extract News Headlines & Text\t",
      "type": "n8n-nodes-base.html",
      "notes": "Extract selected headlines, editor's picks, spotlight etc.",
      "position": [
        660,
        240
      ],
      "parameters": {
        "options": {
          "cleanUpText": true
        },
        "operation": "extractHtmlContent",
        "extractionValues": {
          "values": [
            {
              "key": "Headline #1",
              "cssSelector": "#site-content > div:nth-child(1) > section > div > div > div.layout-desktop__grid.layout-desktop__grid--span4.layout-desktop__grid--column-start-1.layout-desktop__grid--row-start-1.layout-desktop__grid--with-border.layout--default > div > div > div > div.story-group-stacked__primary-story > div > div > div > div > div.primary-story__teaser"
            },
            {
              "key": "Headline #2",
              "cssSelector": "#site-content > div:nth-child(1) > section > div > div > div.layout-desktop__grid.layout-desktop__grid--span6.layout-desktop__grid--column-start-5.layout-desktop__grid--row-start-1.layout-desktop__grid--with-border.layout--default > div > div > div > div > div > div.story-group__article.story-group__article--featured > div > div.featured-story-content > div.headline.js-teaser-headline.headline--scale-5.headline--color-black > a > span"
            },
            {
              "key": "Editor's Picks",
              "cssSelector": "#site-content > div:nth-child(1) > section > div > div > div.layout-desktop__grid.layout-desktop__grid--span2.layout-desktop__grid--column-start-11.layout-desktop__grid--row-start-1.layout--default > div"
            },
            {
              "key": "Top Stories",
              "cssSelector": "#site-content > div:nth-child(3) > section > div",
              "skipSelectors": "h2"
            },
            {
              "key": "Spotlight",
              "cssSelector": "#site-content > div:nth-child(6) > section",
              "skipSelectors": "h2"
            },
            {
              "key": "Various News",
              "cssSelector": "#site-content > div:nth-child(8) > section",
              "skipSelectors": "h2"
            },
            {
              "key": "Europe News",
              "cssSelector": "#site-content > div:nth-child(13) > section",
              "skipSelectors": "h2"
            }
          ]
        }
      },
      "notesInFlow": true,
      "typeVersion": 1.2
    },
    {
      "id": "9e225c3b-1732-4d22-8a43-cab26c816865",
      "name": "Clean Extracted News Data\t",
      "type": "n8n-nodes-base.set",
      "position": [
        880,
        240
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "5412a5ee-dbbe-4fcc-98a5-6fafc37b94d1",
              "name": "All data",
              "type": "string",
              "value": "=News :\n{{ $json['Headline #1'] }}\n\n\n\nFinancial news :\n\n{{ $('Extract News Headlines & Text\t').item.json['Headline #1'] }};\n\n{{ $('Extract News Headlines & Text\t').item.json['Headline #2'] }};\n\n{{ $('Extract News Headlines & Text\t').item.json['Editor\\'s Picks'] }};\n\n{{ $('Extract News Headlines & Text\t').item.json['Top Stories'] }};\n\n{{ $('Extract News Headlines & Text\t').item.json.Spotlight }};\n\n{{ $('Extract News Headlines & Text\t').item.json['Various News'] }};\n\n{{ $('Extract News Headlines & Text\t').item.json['Europe News'] }};\n\n"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "b6a11f10-2dc4-45b9-a9fd-ba4245fa28ca",
      "name": "AI Financial News Summarizer\t",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1100,
        240
      ],
      "parameters": {
        "text": "=Summarise this news :\n\n{{ $json['All data'] }}",
        "options": {
          "systemMessage": "You are an AI financial analyst. Your role is to read, understand, and summarize key financial news from today. The goal is to provide investors with a clear and concise market overview to support better investment decisions.\n\n\nInvestor Outlook\nToday\u2019s news points to [bullish/bearish/neutral] sentiment. Watch for [economic event/earnings report] tomorrow, which could influence market direction.\n"
        },
        "promptType": "define"
      },
      "typeVersion": 1.6
    },
    {
      "id": "04f50544-39c1-456c-ba8e-3150ae902adb",
      "name": "Email Daily Financial Summary\t",
      "type": "n8n-nodes-base.emailSend",
      "position": [
        1476,
        240
      ],
      "parameters": {
        "text": "={{ $json.output }}",
        "options": {},
        "subject": "Today's News",
        "toEmail": "user@example.com",
        "fromEmail": "user@example.com",
        "emailFormat": "text"
      },
      "credentials": {
        "smtp": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "2f4dab06-5786-4ab9-8a54-0b2bc56f6c22",
      "name": "LLM Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOllama",
      "position": [
        1188,
        460
      ],
      "parameters": {
        "model": "llama3.2-16000:latest",
        "options": {}
      },
      "credentials": {
        "ollamaApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "3ac33bfa-1a93-495f-8f72-e10aba74543f",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        580,
        -180
      ],
      "parameters": {
        "color": 5,
        "width": 320,
        "height": 320,
        "content": "\ud83d\udccc **Try It Out!**\n\nThis workflow auto-fetches top financial headlines, cleans the content, and uses AI to summarize it into a short investor-friendly email.\n\n\ud83e\udde0 Ideal for: Market analysts, finance teams, or daily newsletters.\n\n**Powered by:** n8n + LLM (e.g., GPT-4 or Gemini) + Email Node.\n"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "bf9bf774-b70b-4fcf-9265-0ad47885effd",
  "connections": {
    "LLM Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Financial News Summarizer\t",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Daily Trigger\t": {
      "main": [
        [
          {
            "node": "Fetch Financial News Webpage\t",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Clean Extracted News Data\t": {
      "main": [
        [
          {
            "node": "AI Financial News Summarizer\t",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Delay to Ensure Page Load\t": {
      "main": [
        [
          {
            "node": "Extract News Headlines & Text\t",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Financial News Summarizer\t": {
      "main": [
        [
          {
            "node": "Email Daily Financial Summary\t",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Financial News Webpage\t": {
      "main": [
        [
          {
            "node": "Delay to Ensure Page Load\t",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract News Headlines & Text\t": {
      "main": [
        [
          {
            "node": "Clean Extracted News Data\t",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}