#Automate what BeeL. can’t know about
BeeL. already automates invoicing for Stripe payments with its native integration. But there are scenarios where the invoice doesn’t come from a Stripe charge — it comes from a CRM, a form, an ERP, a Google Sheet, or an event in your app.
That’s where n8n + the BeeL. API fits in. n8n is a visual automation tool (like Zapier, but open source and self-hosted) that connects any service with drag-and-drop nodes. And the BeeL. API gives you programmatic access to full Spanish invoicing with VeriFactu compliance.
The result: any event in any system can generate a legal invoice automatically. Without writing code.
ℹ️Charging with Stripe?
If your case is invoicing Stripe payments, you don’t need n8n. BeeL. has a native Stripe Connect integration that generates invoices automatically for each payment. This article covers cases where the invoice doesn’t come from Stripe.
#Scenarios where n8n + BeeL. shines
| Scenario | n8n trigger | What BeeL. does |
|---|---|---|
| Deal closed in HubSpot/Pipedrive | CRM webhook | Creates and issues invoice |
| Quote accepted in Typeform | Form submission | Creates invoice from form data |
| Monthly services spreadsheet | Google Sheets + Schedule | Recurring invoicing from a Sheet |
| Order in WooCommerce/Shopify | E-commerce webhook | B2B invoice with NIF |
| Service completed in your app | HTTP webhook | Automatic invoice on completion |
#What you’ll build
An n8n workflow with this flow (example: deal closed in CRM):
CRM Trigger (deal closed)
↓
HTTP Request → POST /v1/customers (create customer if doesn't exist)
↓
HTTP Request → POST /v1/invoices (create draft)
↓
HTTP Request → POST /v1/invoices/{id}/issue (issue)
↓
HTTP Request → POST /v1/invoices/{id}/send (send email)#Prerequisites
- BeeL. account with an API key generated (create account)
- n8n installed (self-hosted or n8n.cloud)
#Step 1: Set up BeeL. credentials in n8n
In n8n, go to Settings → Credentials → Add Credential → Header Auth:
- Name:
BeeL. API - Header Name:
Authorization - Header Value:
Bearer beel_sk_live_your_api_key
This credential is reused across all HTTP Request nodes in the workflow.
#Step 2: Choose the trigger
Depending on your use case:
#Option A: Generic webhook
Add a Webhook node. This gives you a URL you can call from any system when an event occurs (service completed, order confirmed, etc.).
#Option B: CRM trigger
If you use HubSpot, Pipedrive, or Salesforce, n8n has native nodes. Configure the trigger on the “deal won” or “deal closed” event.
#Option C: Google Sheets + Schedule
For monthly invoicing based on a Sheet: a Schedule Trigger on the 1st of each month reads the Sheet rows and generates one invoice per row.
#Option D: Form (Typeform, Google Forms)
The client accepts a quote by filling out a form. The Typeform/Google Forms trigger fires invoice creation.
#Step 3: Create the customer in BeeL. (if doesn’t exist)
Before invoicing, you need the customer in BeeL. Add an HTTP Request node:
- Method:
GET - URL:
https://app.beel.es/api/v1/customers?search=CUSTOMER_NAME - Authentication: Header Auth →
BeeL. API
Then an IF node to check if the customer exists. If not:
- Method:
POST - URL:
https://app.beel.es/api/v1/customers - Body:
{
"legal_name": "Acme SL",
"nif": "B12345678",
"email": "admin@acme.es",
"address": {
"street": "Calle Mayor",
"number": "1",
"postal_code": "28001",
"city": "Madrid",
"province": "Madrid",
"country": "Spain",
"country_code": "ES"
}
}#Step 4: Create the invoice
Add an HTTP Request node:
- Method:
POST - URL:
https://app.beel.es/api/v1/invoices - Authentication: Header Auth →
BeeL. API - Body:
{
"type": "STANDARD",
"recipient": {
"customer_id": "customer-uuid"
},
"lines": [
{
"description": "Strategic consulting — April 2026",
"quantity": 10,
"unit_price": 120,
"discount_percentage": 0
}
]
}Use n8n expressions to map trigger data to invoice fields. For example, if the trigger is a CRM, map the product name, quantity, and price from the deal fields.
⚠️Automatic idempotency
The BeeL. API generates automatic idempotency keys on every POST. If the node fails and n8n retries, no duplicate invoices will be created.
#Step 5: Issue the invoice
Add another HTTP Request node:
- Method:
POST - URL:
https://app.beel.es/api/v1/invoices/INVOICE_ID/issue - Authentication: Header Auth →
BeeL. API
When issuing, BeeL. assigns the sequential invoice number, generates the VeriFactu electronic signature, and registers the document with the AEAT. All automatic.
#Step 6: Send by email
A third HTTP Request node:
- Method:
POST - URL:
https://app.beel.es/api/v1/invoices/INVOICE_ID/send - Authentication: Header Auth →
BeeL. API
If you don’t send to in the body, BeeL. uses the registered customer email.
#Step 7: Error handling
Add an IF node after each HTTP Request to check for errors:
| Code | Meaning | Action |
|---|---|---|
| 422 | Invalid data | Review the trigger payload |
| 404 | Customer doesn’t exist | Create the customer first |
| 429 | Rate limit | n8n retries automatically |
| 5xx | Server error | Retry in a few minutes |
#Complete example: Monthly invoicing from Google Sheets
One of the most practical cases: you have a Google Sheet with the services you invoice each month.
| Client | NIF | Service | Hours | Rate/hour | |
|---|---|---|---|---|---|
| Acme SL | B12345678 | Web development | 40 | 60 | admin@acme.es |
| Beta Corp | B87654321 | Consulting | 20 | 90 | info@beta.es |
Workflow:
- Schedule Trigger — 1st of each month at 9:00
- Google Sheets — Read all rows from the “Invoicing” sheet
- SplitInBatches — Process one row at a time
- HTTP Request — Search customer by NIF in BeeL
- IF — Exists? If not, create them
- HTTP Request — Create invoice with description, hours × rate
- HTTP Request — Issue
- HTTP Request — Send by email
- Google Sheets — Mark row as “Invoiced” with the invoice number
Result: on the 1st of each month, all invoices are generated, issued, and sent automatically.
#Another example: Notify Slack when an invoice is paid
n8n also works in reverse: listen to BeeL. webhooks and react.
- Webhook — Receive BeeL. event (
invoice.paid) - Slack — Send message to
#accounting: “Invoice X paid: Y€” - Google Sheets — Record the payment in a treasury Sheet
- Notion — Update the project status to “Paid”
#Frequently asked questions
#Do I need to code to use n8n with BeeL.?
No. n8n is a visual tool. You only need to configure HTTP Request nodes with the right endpoints and JSON. This article has all the payloads you need.
#What’s the difference between this and BeeL’s Stripe integration?
The Stripe integration is native and automatic: each payment generates an invoice with no configuration. n8n is for cases where the invoice doesn’t come from a Stripe payment — it comes from a CRM, a form, a Sheet, or any other system.
#What happens if the BeeL. API fails during the workflow?
n8n allows configuring retries per node. Additionally, the BeeL. API supports idempotency: if the same request arrives twice, no duplicates are created.
#Can I use Make (Integromat) instead of n8n?
Yes. Any tool that supports HTTP Request works with the BeeL. API. The process is identical: configure URL, headers, and JSON body.
#Does BeeL. have a native n8n node?
Not yet, but it’s on the roadmap. In the meantime, HTTP Request nodes work perfectly with the REST API.
Ready to automate your invoicing? Create your free account, generate your API key, and set up your first n8n workflow in minutes. If you prefer code, the TypeScript SDK (GitHub) offers the same functionality. Check the API documentation and the SDKs page for all available resources.
