Automate Brazil CVM Filings with n8n

Teams searching for n8n CVM filings automation usually want a scheduled workflow: watch tickers, list new documents, download PDFs into Drive/S3, optionally enqueue text extraction. apicvm is a plain REST API — use n8n HTTP Request nodes. There is no official apicvm n8n node.

The problem

Manual CVM portal downloads do not scale for a watchlist. Scrapers break when the portal UI changes. You need:

Cron / webhook → resolve → list → filter → download → notify

Auth in n8n

Store secrets in n8n credentials or environment variables:

Name Example
APICVM_URL https://apicvm.dev
APICVM_KEY apicvm_...

On each HTTP Request node:

  • Header Authorization = Bearer {{$env.APICVM_KEY}}
  • Or header X-API-Key = {{$env.APICVM_KEY}}

See API authentication.

Workflow A — weekly FRE list for one ticker

  1. Cron — every Monday.
  2. HTTP RequestGET {{$env.APICVM_URL}}/v1/companies/resolve?query=LREN3&by=ticker
  3. HTTP RequestGET {{$env.APICVM_URL}}/v1/documents?ticker=LREN3&type=FRE&year=2025&perPage=50
  4. Split Outdata array.
  5. IF — keep items where name contains a section you care about (e.g. contingencies).
  6. HTTP RequestGET {{$env.APICVM_URL}}/v1/documents/{{$json.id}}/file (response: file).
  7. Write binary — Google Drive / S3 / local.

curl reference for the same calls:

export APICVM_KEY='apicvm_...'
export APICVM_URL='https://apicvm.dev'

curl -H "Authorization: Bearer $APICVM_KEY" \
  "$APICVM_URL/v1/documents?ticker=LREN3&type=FRE&year=2025&perPage=20"

Workflow B — multi-ticker watchlist

Use a static list or Google Sheet of tickers (PETR4, VALE3, EMBR3). Loop:

For each ticker → GET /v1/documents?ticker=...&type=ITR&year=2025
→ compare ids to a datastore → download only new ids → Slack/email

apicvm does not push “new filing” webhooks today — you poll on a schedule and dedupe by document.id.

Extraction callbacks in n8n

POST /v1/document-text-extractions needs a public HTTPS callback_url (production). Pattern:

  1. n8n Webhook node (production URL).
  2. HTTP Request POST:
{
  "callback_url": "https://your-n8n.example/webhook/apicvm-page",
  "document": { "id": "<uuid>" }
}
  1. Webhook receives one POST per page (status, page.markdown, is_last_page).
  2. Append markdown to a database or Drive doc.

Pro plan + extraction credits required. Student keys get 403. Details: async callbacks.

Rate limits

Respect X-RateLimit-* headers and back off on 429. Student plans also have a daily request cap — see errors and rate limits and pricing.

Current limitations

  • No native n8n community node from apicvm — HTTP only.
  • No server-push for new filings — poll + dedupe.
  • Extraction is async; do not expect a synchronous “get full text” response.
  • Corpus lag vs the live CVM portal.

Next steps

Ready to integrate?

Get an API key and start querying Brazilian CVM filings programmatically.