n8n is the open-source workflow automation tool you use to connect apps without writing code: you drag nodes, link them, and the flow runs on its own. FacturaHub doesn't have a native n8n node (yet), but since it exposes a full REST API, you connect it in minutes with the generic HTTP Request node: each API call is a node, and between them you pass the order, client and invoice data. What you create via n8n appears instantly in the dashboard, on WhatsApp and in your AI agent, because everything shares the same backend.
The pattern is always the same: a trigger starts the flow and a chain of HTTP Request nodes talk to the FacturaHub API.
You pick one of two ways, same as in the API:
x-api-key (recommended) — the simplest path for n8n. Create a Header Auth credential with name x-api-key and value YOUR_API_KEY (you generate it in your account settings), and reuse it across all HTTP Request nodes. It doesn't expire.POST /auth/login with your email and password, you read the token from the response and pass it as an Authorization: Bearer <token> header in the following nodes.Each step is an HTTP Request node pointing at https://facturahub.com. These are the real API methods and routes:
POST /api/clients with the client's name, NIF and country.POST /api/invoices with items[] (each line with description, quantity, unitPrice, taxRate) and retentionRate for the IRPF. Returns the invoice with its id.PATCH /api/invoices/{id}/send (use the id from the previous step) to mark it sent and trigger the email.GET /api/invoices/{id}/pdf if you want to attach the PDF to another app.POST /api/expenses/scan-receipt to pass a receipt photo and have the AI extract amount, IVA and category.A WooCommerce trigger (new order) followed by two HTTP Request nodes. cURL equivalent of what each node sends:
# Node 1 — create the invoice (auth: Header Auth x-api-key credential)
curl -X POST https://api.facturahub.com/api/invoices \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"client": { "name": "{{ $json.billing.company }}", "taxId": "{{ $json.meta.nif }}", "country": "ES" },
"items": [{ "description": "WooCommerce order #{{ $json.id }}", "quantity": 1, "unitPrice": {{ $json.total }}, "taxRate": 21 }],
"retentionRate": 0
}'
# Node 2 — send the invoice to the client (use the id returned by node 1)
curl -X PATCH https://api.facturahub.com/api/invoices/{{ $json.id }}/send \
-H "x-api-key: YOUR_API_KEY"
The {{ ... }} are n8n expressions that pull data from the previous node (the WooCommerce order or the just-created invoice). In n8n you don't write cURL: you fill the HTTP Request node with the method, URL and JSON body, and link the nodes.
There's a ready-to-import example workflow for n8n in the API examples repository: https://github.com/Santy1422/facturahub-api, file recipes/n8n-woocommerce.json. Download it, import it into your n8n (Import from File), set your x-api-key credential and connect it to your store.
Honest about what isn't ready yet (we don't announce it as available):
invoice.paid that trigger your n8n flow when a client pays (today you trigger from WooCommerce, cron or your own webhook).Until they arrive, HTTP Request nodes against the REST API cover practically any flow you can think of.
You build the flow by dragging nodes in n8n. No programming needed: the HTTP Request node makes the FacturaHub API calls for you.
Since there's no native n8n node yet, you use the generic HTTP Request node. Each API call (client, invoice, send) is a node linked to the next.
Header Auth credential with x-api-key: YOUR_API_KEY reusable across all nodes. Or a POST /auth/login node to get a JWT (Bearer) token.
A new-order trigger in WooCommerce, two HTTP Request nodes (POST /api/invoices and PATCH /api/invoices/{id}/send) and the invoice goes out to the client on its own.
POST /api/invoices with items[{description,quantity,unitPrice,taxRate}] and retentionRate. Sequential numbering and correct tax data, as the AEAT requires.
Template recipes/n8n-woocommerce.json at github.com/Santy1422/facturahub-api. Import it into n8n, set your x-api-key and connect it to your store.
What n8n creates appears instantly in the dashboard, on WhatsApp and in your AI agent. One backend for all channels.
Native n8n node, official Zapier and Make apps and outbound webhooks (invoice.paid) are on the roadmap. Not there yet; today it's done with HTTP Request.
Not yet, and we prefer to be honest. Today you connect n8n with the generic HTTP Request node pointing at FacturaHub's REST API, and it works perfectly: each call (create client, create invoice, send) is a node. The native n8n node is on the roadmap as coming soon.
Simplest: create a Header Auth credential in n8n with name x-api-key and value of your API key (you generate it in your account settings) and reuse it across all HTTP Request nodes. If you prefer a session token, a first node calls POST /auth/login and you pass the JWT as Authorization: Bearer in the rest.
Yes. n8n has triggers for WooCommerce, Shopify and many other stores: when an order comes in, n8n calls the FacturaHub API and creates the invoice. FacturaHub also has a native WooCommerce integration (orders to invoice) without n8n; for Shopify or other stores, n8n is the way to connect them today.
No. That's the point of n8n: you build the flow by dragging and linking nodes, without writing code. You fill the HTTP Request node with the method (POST, PATCH), the URL and the JSON body, and use {{ }} expressions to pass data between nodes. To start without touching anything, import the example workflow from the repo.
On FacturaHub's side, yes: the plan is free and API calls are unlimited. Only AI is metered — 25 AI actions per month and one-off token packs from €4.99 if you need more; creating invoices or clients via API doesn't consume AI. n8n itself has a free self-hosted open-source version and its own cloud plans.
In the API examples repository: github.com/Santy1422/facturahub-api, file recipes/n8n-woocommerce.json. Download it, import it into your n8n (Import from File), configure your x-api-key credential and connect it to your store. There are more examples in cURL, JavaScript, Python and PHP in the same repo.