{
  "name": "Post new SEC 8-K filings for a stock watchlist to Slack with Apify",
  "nodes": [
    {
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "cronExpression",
              "expression": "30 22 * * 1-5"
            }
          ]
        }
      },
      "id": "3b5ee4e8-139c-57e1-abca-3abbb423d6c8",
      "name": "Weekdays at 22:30",
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1.2,
      "position": [
        0,
        0
      ]
    },
    {
      "parameters": {
        "resource": "Actors",
        "operation": "Run actor and get dataset",
        "actorId": {
          "__rl": true,
          "value": "x0IJH5QQzRUjoNkye",
          "mode": "id"
        },
        "customBody": "{\n  \"companies\": [\n    \"AAPL\",\n    \"MSFT\",\n    \"NVDA\",\n    \"TSLA\",\n    \"AMZN\"\n  ],\n  \"modes\": [\n    \"filings\"\n  ],\n  \"formTypes\": [\n    \"8-K\"\n  ],\n  \"sinceDate\": \"7 days\",\n  \"maxFilingsPerCompany\": 20,\n  \"onlyNew\": true,\n  \"maxResults\": 200\n}",
        "maxTotalChargeUsd": 1
      },
      "id": "2d69f1f7-fa7d-5aeb-89ce-96df551e2d45",
      "name": "Get new 8-K filings",
      "type": "@apify/n8n-nodes-apify.apify",
      "typeVersion": 2,
      "position": [
        240,
        0
      ],
      "credentials": {
        "apifyApi": {
          "id": "REPLACE_WITH_YOUR_APIFY_CREDENTIAL",
          "name": "Apify account"
        }
      }
    },
    {
      "parameters": {
        "jsCode": "// One Slack message per run listing new 8-K filings. Nothing new means no message.\nconst filings = $input.all()\n  .map((i) => i.json)\n  .filter((f) => f.recordType === 'filing' && String(f.form ?? '').startsWith('8-K'));\nif (filings.length === 0) return [];\n\nconst lines = filings\n  .sort((a, b) => String(b.filingDate).localeCompare(String(a.filingDate)))\n  .slice(0, 40)\n  .map((f) => {\n    const what = (f.itemDescriptions ?? []).length ? f.itemDescriptions.join('; ') : (f.description ?? f.form);\n    return `• *${f.ticker ?? f.companyName}* ${f.form} filed ${f.filingDate}: ${what}\\n   <${f.documentUrl ?? f.filingUrl}|Read the filing>`;\n  });\nconst more = filings.length > 40 ? `\\n…and ${filings.length - 40} more.` : '';\nreturn [{ json: { text: `*${filings.length} new 8-K filing${filings.length === 1 ? '' : 's'} on your watchlist*\\n\\n${lines.join('\\n')}${more}` } }];"
      },
      "id": "664ec49a-4ac1-5919-80fa-89a3b0b8a344",
      "name": "Build the Slack message",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        480,
        0
      ]
    },
    {
      "parameters": {
        "select": "channel",
        "channelId": {
          "__rl": true,
          "value": "#filings",
          "mode": "name"
        },
        "text": "={{ $json.text }}",
        "otherOptions": {
          "includeLinkToWorkflow": false
        }
      },
      "id": "10dbf2a7-336c-580e-8beb-20e947d46b8e",
      "name": "Post to Slack",
      "type": "n8n-nodes-base.slack",
      "typeVersion": 2.2,
      "position": [
        720,
        0
      ],
      "credentials": {
        "slackApi": {
          "id": "REPLACE_WITH_YOUR_SLACK_CREDENTIAL",
          "name": "Slack account"
        }
      },
      "webhookId": "b27ce424-5fde-573c-860a-f5bb99389771"
    },
    {
      "parameters": {
        "content": "## Get new filings\nYour watchlist lives in the Input JSON.",
        "height": 260,
        "width": 440,
        "color": 7
      },
      "id": "c8b1db64-b683-5de8-9cf2-880bed5fb4e8",
      "name": "Section 1",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -50,
        -130
      ]
    },
    {
      "parameters": {
        "content": "## Post to Slack\nNothing new means no message.",
        "height": 260,
        "width": 440,
        "color": 7
      },
      "id": "51248834-db1a-51a1-9ed8-ffbaec02354c",
      "name": "Section 2",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        430,
        -130
      ]
    },
    {
      "parameters": {
        "content": "## Post new SEC 8-K filings for a stock watchlist to Slack\n\nFor investors, analysts, and IR or comms teams who want to know the same day when a company on their list files an 8-K: earnings, leadership changes, deals and other material events.\n\n### How it works\n1. On weekday evenings the schedule runs the **sec-edgar** Actor on Apify.\n2. It reads SEC EDGAR for each company on your watchlist, keeps 8-K filings (amendments included) from the last 7 days, and with `onlyNew` returns only filings it has not sent before.\n3. A Code node writes one Slack message: ticker, form, filing date, the reported 8-K items in plain words, and a link to the filing.\n\n### Setup\n1. Add your own Apify API token as an *Apify API* credential.\n2. Pick your Slack credential and channel.\n3. Put your tickers in `companies` in the Input JSON. CIK numbers and company names work too.\n\n### Requirements\nApify account (free plan: up to 100 records per run) and Slack. The Actor charges $2 per 1,000 records; the node caps each run at $1. A 20-company watchlist usually costs a few cents a month.\n\n**Community node:** uses the verified Apify node (`@apify/n8n-nodes-apify`). On n8n Cloud it installs from the canvas; on self-hosted n8n install it under Settings > Community nodes.\n\n### Customization tips\nAdd `10-K`, `10-Q` or `S-1` to `formTypes`, or run hourly during market hours. The schedule uses your n8n time zone.\n\nMade by locaihost, a small studio that builds its tools with AI agents.",
        "height": 796,
        "width": 560
      },
      "id": "73966f64-760c-54b4-b990-425d22c2e9de",
      "name": "Overview",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -670,
        -130
      ]
    }
  ],
  "connections": {
    "Weekdays at 22:30": {
      "main": [
        [
          {
            "node": "Get new 8-K filings",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get new 8-K filings": {
      "main": [
        [
          {
            "node": "Build the Slack message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Build the Slack message": {
      "main": [
        [
          {
            "node": "Post to Slack",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "meta": {
    "templateCredsSetupCompleted": false
  },
  "tags": []
}
