Make.com Integration
Use Make.com (formerly Integromat) to call the thelawin.dev API from a visual scenario. The HTTP module handles the request.
Prerequisites
- Make.com account (Free: 1,000 ops/month)
- thelawin.dev API key (for testing:
env_sandbox_demo)
Create a Scenario
1. Trigger Module
Pick a trigger for your scenario:
| Module | Use Case |
|---|---|
| Webhook (Custom webhook) | Receive data from your app |
| Google Sheets (Watch Rows) | New row = new invoice |
| Airtable (Watch Records) | New record = new invoice |
| Schedule | Recurring invoices (weekly, monthly) |
2. Configure the HTTP Module
Add HTTP → Make a request:
| Field | Value |
|---|---|
| URL | https://api.thelawin.dev/v1/generate |
| Method | POST |
| Body type | Raw |
| Content type | JSON (application/json) |
| Request content | (see JSON below) |
Headers:
| Key | Value |
|---|---|
X-API-Key | env_sandbox_demo |
Request content (JSON):
json
{
"format": "zugferd",
"template": "minimal",
"locale": "de",
"invoice": {
"number": "RE-2026-001",
"date": "2026-01-15",
"currency": "EUR",
"seller": {
"name": "Deine Firma GmbH",
"street": "Musterstrasse 1",
"city": "Berlin",
"postal_code": "10115",
"country": "DE",
"vat_id": "DE123456789"
},
"buyer": {
"name": "Kunde AG",
"city": "Muenchen",
"country": "DE"
},
"items": [
{
"description": "Beratungsleistung",
"quantity": 8,
"unit": "HUR",
"unit_price": 150.00,
"vat_rate": 19
}
]
}
}Enable Parse response so Make splits the JSON response into fields automatically.
3. Process the PDF
The response contains pdf_base64 and filename.
Convert Base64 to a file:
Add Tools → Set variable:
- Variable:
pdf_binary - Value:
{{base64decode(HTTP.body.pdf_base64)}}
Then use Google Drive → Upload a File or Email → Send an Email with the PDF attached.
4. Error Handling
Attach an Error Handler to the HTTP module:
422: Validation error | route to logging402: Quota exceeded | route to notification5xx: Server error | retry after 60 seconds
Scenario: Airtable → ZUGFeRD → Google Drive
- Airtable | Watch Records (table "Invoices", filter: Status = "New")
- HTTP | POST to
api.thelawin.dev/v1/generatewith Airtable data - Google Drive | Upload File (Base64 → PDF)
- Airtable | Update Record (Status = "Created", add PDF link)
Common Errors
| Error | Cause | Solution |
|---|---|---|
401 Unauthorized | API key missing or wrong | Check X-API-Key header |
422 Validation | Required fields missing | Inspect errors[].path in the response |
| "Parse error" | Invalid JSON syntax | Validate your JSON externally |
| Empty PDF file | Base64 not decoded correctly | Use the base64decode() function |
Next Steps
- Invoice Formats | All 9 formats
- Zapier Guide | Alternative no-code platform
- n8n Guide | Self-hosted alternative