# Log daily new Spanish companies to Google Sheets or CSV with BORME API

> Quick overview This workflow runs Tuesday to Saturday at 07:30 (Europe/Madrid), fetches the previous day’s Spanish company incorporation events from the BORME API, and writes one row per event to Google Sheets (with optional CSV export on self-hosted n8n). How it works 1. Runs on a cron schedule Tuesday to Saturday at 07:30 (Madrid time). 2. Calls the BORME API to retrieve yesterday’s INCORPORATION events, paging through up to 20 pages of 200 events each. 3. Splits the API response into individual events. 4. Extracts and flattens key incorporation fields (such as company name, province, address, capital, CNAE, and source PDF URL) into a single row per event. 5. Appends or updates rows in Google Sheets, matching on eventid to avoid duplicates. 6. Optionally converts the rows to a CSV file and saves it to disk when running on self-hosted n8n. Setup 1. Create a Header Auth credential with the header name X-API-Key and your BORME API key as the value, and select it in the BORME API request

- **Domain**: `n8n-workflow-22695.n8n.io`
- **Provider**: n8n.io (https://n8n.io)
- **Kind**: workflow
- **Live-responds (last probe)**: None
- **Signed card**: False
- **Streaming**: False
- **Quality score**: 40%

## URLs
- Agent card: https://n8n.io/workflows/22695
- Page (HTML): https://agenstry.com/agents/n8n-workflow-22695.n8n.io
- Documentation: https://n8n.io/workflows/22695
