> ## Documentation Index
> Fetch the complete documentation index at: https://docs.secapi.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Automate SEC Alerts with n8n

> Send signed SEC filing-monitor events to n8n, turn each match into an item, and route the result to Slack or another n8n action.

Use n8n when a filing match should start a visible automation rather than a polling job. SEC API sends signed `monitor.match` events to one organization webhook endpoint; n8n turns the event's `matches` array into the downstream actions you choose.

## Before you start

* Build an n8n workflow with a production Webhook trigger.
* In the signed-in [SEC API dashboard](https://secapi.ai/app/webhooks), register that public HTTPS URL, subscribe it to `monitor.match`, and create the monitor that should feed it.
* Save the signing secret from the dashboard. Endpoint and monitor setup require a WorkOS browser session, not an API key.

## Build the workflow

1. Add a **Webhook** trigger and copy its production URL.
2. Add a **Code** node after it. Return one item per filing match:

```javascript theme={null}
const event = $json;
if (event.type !== "monitor.match") return [];

return (event.data?.matches ?? []).map((match) => ({
  json: {
    monitor: event.data?.monitor?.name,
    ticker: match.ticker,
    form: match.form,
    filedAt: match.filingDate,
    sourceUrl: match.htmlUrl,
  },
}));
```

3. Connect Slack, email, a database, or your research queue. Use `sourceUrl` as the evidence link rather than asking the next step to reconstruct the filing.

## Test and operate

Use the dashboard's test-delivery action while the n8n workflow is active. It sends a signed `webhook.test` event; production matches use `monitor.match`. To inspect what a configured monitor matches without waiting for a sweep, use your API key:

```bash theme={null}
curl -H "x-api-key: $SECAPI_API_KEY" \
  "https://api.secapi.ai/v1/monitors/MONITOR_ID/matches?limit=10"
```

Monitor dispatch runs on a 15-minute cadence. A webhook is a notification, not a substitute for investor judgment: keep the form, issuer, filing date, and source URL with every downstream alert.

## Read next

* [Monitor SEC filing events](/monitors)
* [Build a filing monitor](/tutorials/build-filing-monitor)
