# n8n automations
[n8n](https://n8n.io) is the automation platform running on the same server as the API. It holds
Rewake's workflows: e-mails, Shopify collection sorting, invoices, quotes, delivery notes, CRM
reminders. The API and n8n call each other, so they are documented together.
Instance: `n8n.srv1336295.hstgr.cloud` (log in to see a workflow from its id).
```mermaid
flowchart TD
Airtable[Airtable automations
and buttons] -->|webhooks| N8N[n8n]
App[RewakeApp] -->|payroll, U3000 campaign,
QR labels| N8N
Shop[Shopify site] -->|quote requests,
back-in-stock| N8N
API[Rewake API] -->|buy-back and U3000 e-mails| N8N
N8N -->|invoice analysis| API
N8N --> AT[(Airtable)]
N8N --> SH[(Shopify)]
N8N --> Other[Gmail / SMTP, Qonto, OneDrive,
Cloud Run, Gotenberg, Gemini]
```
## Workflows
| Group | Workflows |
|---|---|
| [Shopify](shopify.md) | accessory links, product status, quote requests, back-in-stock sign-ups, old listings, collection sorting |
| [Catalogue](catalogue.md) | model research, lot photos, QR labels |
| [Invoices](invoices.md) | payment status, invoice sync, carrier invoices |
| [Deals](deals.md) | delivery notes, quotes, won auctions |
| [CRM](crm.md) | activities, project reminders, company form |
| [Buy-back](buy-back.md) | buy-back form e-mails, UltiMate 3000 e-mails |
| [Thermo Fisher](thermo-fisher.md) | UltiMate 3000 campaign |
| [Accounting](accounting.md) | payroll e-mails |
| [System](system.md) | error handlers |
| [Unused and archived](unused.md) | inactive workflows, candidates for deletion |
## Links with the API
| Direction | Workflow | Where in the code |
|---|---|---|
| API → n8n | [Mail début formulaire de reprise](buy-back.md#mail-debut-formulaire-de-reprise-client) | `api/routes/internal/formulaire/reprise/reprise.py` |
| API → n8n | [Formulaire de reprise - Email de fin](buy-back.md#formulaire-de-reprise-email-de-fin) | same file |
| API → n8n | [Reprise U3000 — Lien espace client](buy-back.md#reprise-u3000-lien-espace-client) | `config.U3000_N8N_CLIENT_LINK_URL` |
| API → n8n | [Reprise U3000 — Demande d'offre](buy-back.md#reprise-u3000-demande-d-offre) | `config.U3000_N8N_OFFER_URL` (worker) |
| n8n → API | [Tunnel Enchères → Opération reprise](deals.md#tunnel-encheres-operation-reprise) | `POST /internal/invoice/analysis` |
Renaming or changing one of these API routes means changing the workflow too.
## Errors
Most workflows name [Error workflow](system.md#error-workflow) as their error handler: when they
fail, it e-mails the tech team with the workflow, the error, the last node and a link to the
execution. *Facture Transport Gmail* uses [Error workflow 2](system.md#error-workflow-2).
n8n keeps **14 days** of executions. Anything older is only known if it was written down here.
## Recording a failure
Each workflow has a **Failures** table. When something breaks, add a row:
| When | What happened | Cause | Fix | Came back? |
|---|---|---|---|---|
| date | the symptom, as seen by its users | why it happened | what was changed | dates it happened again, or "no" |
Platform incidents that hit every workflow are listed once below, and referenced from each
affected workflow.
### Platform incidents
| When | What happened | Cause | Fix | Came back? |
|---|---|---|---|---|
| 2026-10-18 00:48 → 10-19 09:32 | No webhook reached n8n (nor the API, the apps…) for 32 h; scheduled workflows kept running | after a hypervisor reboot, a leftover nginx took port 80 and Traefik did not start | nginx removed, Traefik recreated, PM2 boot service enabled | no (as of 2026-11-30) |
```{toctree}
:hidden:
shopify
catalogue
invoices
deals
crm
buy-back
thermo-fisher
accounting
system
unused
```