{
  "name": "FinnHub API and Slack template",
  "nodes": [
    {
      "id": "a244c890-bc5f-4edd-91f4-37192d7807c2",
      "name": "Daily Market News Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -3000,
        660
      ]
    },
    {
      "id": "1baa58b8-de7e-469c-a1ab-3c020e87714e",
      "name": "HTTP Request",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -2340,
        660
      ]
    },
    {
      "id": "c36458a6-50c2-4219-b459-6629147c205e",
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        -2560,
        660
      ]
    },
    {
      "id": "0da44d7e-1300-4d47-80f2-da63e647dfe8",
      "name": "Wait",
      "type": "n8n-nodes-base.wait",
      "position": [
        -1260,
        740
      ]
    },
    {
      "id": "64246872-3c95-429f-93e8-561ad6b6b940",
      "name": "Slack",
      "type": "n8n-nodes-base.slack",
      "position": [
        -1740,
        660
      ]
    },
    {
      "id": "35e91c84-e051-4b71-91ea-2800d5919751",
      "name": "Format",
      "type": "n8n-nodes-base.code",
      "position": [
        -2120,
        660
      ]
    },
    {
      "id": "4ab6c87d-536e-4d40-a6c3-e92ed3f30e13",
      "name": "No Operation, do nothing",
      "type": "n8n-nodes-base.noOp",
      "position": [
        -2360,
        260
      ]
    },
    {
      "id": "4987c8e4-83da-403c-aca2-f56e77d9f4a9",
      "name": "Prep Tickers",
      "type": "n8n-nodes-base.code",
      "position": [
        -2780,
        660
      ]
    },
    {
      "id": "8914ece4-d42b-4db9-a6dd-ef6310320e53",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -3820,
        320
      ],
      "parameters": {
        "width": 460,
        "height": 960,
        "content": "## Daily Company News Bot\n### This n8n template demonstrates how to use Free FinnHub API to retrieve the company news from a list stock tickers and post messages in Slack channel with a pre-scheduled "
      }
    },
    {
      "id": "553353ca-c848-4110-91a5-ffdd9edabc28",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2840,
        460
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": "## Prepare the list of the tickers \nFeel free to update the list of the tickers"
      }
    },
    {
      "id": "957ee9cc-3f32-4bed-aaf8-6ff3d9e8f1d3",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2380,
        420
      ],
      "parameters": {
        "width": 440,
        "height": 440,
        "content": "## Retrieve company news via FinnHub API\n\n### FinnHub FREE API\n- go to [FinnHub API site](https://finnhub.io/)\n- get a free API key\n- create a FinnHub Header Auth credential in n8n\n\n"
      }
    },
    {
      "id": "eea4abee-a783-452c-afb1-496e658f2e38",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1900,
        420
      ],
      "parameters": {
        "width": 440,
        "height": 440,
        "content": "## Post to Slack Channel via webhook\n\n### Slack Channel webhook\n- go your slack app management dashboard\n- create a new app\n- enable webhook for the newly created app\n\ndetails to follow this instructi"
      }
    },
    {
      "id": "45362a93-2523-44e4-8e3e-1b642eaa7381",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1440,
        420
      ],
      "parameters": {
        "width": 440,
        "height": 440,
        "content": "## Wait for 5 seconds\n\nYou can customize it to other waiting time you want. The main purpose here is to avoid sending too many requests to Finnhub at one time due to limited usage of FinnHub Free API\n"
      }
    },
    {
      "id": "51f5c38c-3fd9-4022-9c24-d83b4d98818d",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -3060,
        860
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": "## Cron scheduler\ncurrently it is scheduled every weekday morning at 9:15AM. You can customize it to any time you want"
      }
    }
  ],
  "connections": {
    "Wait": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Slack": {
      "main": [
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format": {
      "main": [
        [
          {
            "node": "Slack",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request": {
      "main": [
        [
          {
            "node": "Format",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prep Tickers": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [
          {
            "node": "No Operation, do nothing",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "HTTP Request",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Daily Market News Trigger": {
      "main": [
        [
          {
            "node": "Prep Tickers",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}