Connecting n8n to Pennylane: automating invoices, expenses, and bank reconciliation via the API
Published 10 August 2026 · 5 min read
A small business that uses Pennylane for its accounting often keeps doing everything else by hand in parallel: dragging every incoming invoice into the interface, re-typing expense reports, ticking off bank transactions one by one at month end. Pennylane centralizes the accounting data, but nothing feeds it automatically from the company's other tools — the inbox, the expense-report form, the quote generator. That's exactly the gap n8n can fill: Pennylane's external API v2 is public, documented, and built for this kind of integration. This guide covers authentication, the three most valuable use cases, and the pitfalls to avoid.
Two APIs, two use cases
Pennylane exposes two distinct APIs depending on your situation:
- Company API (Enterprise): for a business managing its own accounting on its own Pennylane account. This is the case this guide targets.
- Firm API (Cabinet): for an accounting firm managing several client files from a single Pennylane account. If you host n8n for multiple clients — see our guide on hosting n8n for a multi-client agency — this is the API to target, with per-client authentication.
Both versions live under https://app.pennylane.com/api/external/v1 and .../v2, but only v2 keeps evolving: v1 is deprecated and shouldn't be the base for any new workflow. A sandbox environment lets you test your calls before switching to the company's real data.
Authentication: a simple token or OAuth2
For a single company, the fastest path is the API token generated from the Pennylane account settings: it's a static Bearer token, to be placed in an n8n credential of type Generic Credential Type → Header Auth, with the header Authorization: Bearer <your_token>. Every subsequent HTTP Request call reuses this credential with no further setup.
OAuth2 comes into play when the integration needs to cover several distinct client files, each authorizing access separately — the typical case of a firm or agency building an automation it resells to several Pennylane clients. n8n natively handles this flow through the OAuth2 API credential, pointing to the authorization endpoints documented on pennylane.readme.io.
There's also a community node (n8n-nodes-pennylane, available on a self-hosted instance via Community Nodes) that wraps the main calls in a visual interface rather than raw HTTP Request calls — handy to get started, at the cost of depending on a third-party maintainer, the same trade-off as the community PDF nodes mentioned in our invoice-generation guide.
Use case 1 — Automatically pushing a customer invoice generated by n8n
If you already generate your quotes and invoices with n8n — see our guide on generating invoice PDFs with Gotenberg — the natural next step is to record that same invoice in the accounting system without re-typing it. A POST /customer_invoices call with the customer, line items, VAT rate, and payment terms creates the invoice directly in Pennylane, within the same flow that produced the PDF sent to the customer. The Edit Fields (Set) node that already built the PDF template's payload becomes the base for this second JSON payload, using the same source data — no new data entry, a single source of truth.
Use case 2 — Expense reports and supplier invoices with no re-typing
Supplier invoices and expense reports follow a different path: the POST /supplier_invoices/import endpoint expects a file (the PDF or the photo of the receipt) along with its metadata, rather than already-structured accounting fields — Pennylane then handles reading the document itself. The pipeline connects naturally with two articles already published on this blog: extracting data from PDF invoices with AI to validate and classify the document before sending it, and automating expense reports with AI for the manager-approval flow upstream. Once the expense is approved in the workflow, the binary is sent to /supplier_invoices/import, and Pennylane closes the accounting loop — your n8n workflow only needs to log the returned ID to keep the link between the source document and its accounting entry.
Use case 3 — Tracking bank reconciliation and alerting on gaps
The GET /transactions endpoint returns the bank movements imported into Pennylane. A daily Schedule Trigger that queries this endpoint, compares it against the invoices and expense reports logged by your other workflows, and isolates transactions with no match reproduces exactly the pattern detailed in our Compare Datasets node guide: two datasets, a matching field (amount, date, reference), and an "unmatched" output that triggers a Slack alert instead of sitting untouched until month-end closing. Reconciliation itself (the formal link between a bank transaction and an accounting entry) is, as of now, still an evolving feature on the API side — so the more reliable move is to flag gaps to a human rather than trying to automate the matching end to end.
This is exactly the kind of gain documented in the accounting-automation literature: a study by Cooper, Holderness, Sorensen, and Wood published in Accounting Horizons in 2019 ("Robotic Process Automation in Public Accounting", see on Google Scholar), based on interviews with RPA leads at Big Four firms, shows that reconciliation and repetitive data-entry tasks are among the first to be successfully automated — precisely because they follow explicit rules and leave little room for judgment, unlike analysis or advisory tasks, which remain hard to automate.
Rate limits and idempotency: the two classic pitfalls
The API enforces a per-second rate limit, like most SaaS APIs of this kind. For a bulk import (catching up on a month of archives, for instance), pace your calls with a Loop Over Items and a delay instead of firing off the whole queue at once — our article on AI API rate limits in n8n covers the setting in detail, and it transfers directly to an accounting API. Second pitfall: a webhook or Schedule Trigger that fires again (network retry, duplicate execution) can re-import the same invoice twice. Before every POST, check with a GET request whether an invoice with the same external reference already exists — the same idempotency reflex detailed in our dedicated guide to n8n webhooks.
Going further
This API connection closes the loop between the document workflows you've already built — invoice extraction, expense reports, quote generation — and the accounting tool that receives them. If your needs also include a full audit trail of every entry pushed to Pennylane (who sent what, when, with what result), the Compliance & Audit Pack (€149) provides the Supabase logging building block, ready to run alongside these API calls. And if supplier invoices arrive by email before any processing, the Inbox AI Pack (€79) handles the initial inbox sorting. All three packs, bundled together in the Complete FlowKit Bundle (€269 instead of €347 bought separately), cover the entire document journey, from receipt to accounting entry.
FAQ
Frequently asked questions
Do I need a paid Pennylane account to use the API?
Yes, the external API is limited to active Pennylane accounts (the Company API for a single business, the Firm API for an accounting firm managing several client files). A sandbox environment is available to test your calls without touching real data before going to production.
API token or OAuth2: which should I use with n8n?
For a single company automating its own accounting, the API token generated from Pennylane's settings is enough and takes a few minutes to configure in an n8n credential of type Header Auth. OAuth2 becomes useful when you're building an integration meant to cover several different client files, each authorizing access separately — the case of an agency managing multiple Pennylane accounts.
Can you create a supplier invoice via the API the same way you create a customer invoice?
Not quite the same way. Customer invoices are created through a straightforward POST to /customer_invoices. Supplier invoices go through an import endpoint (/supplier_invoices/import) that attaches the PDF file and its metadata: Pennylane processes the document rather than receiving ready-made accounting fields.
Does Pennylane's v1 API still work?
It's technically still reachable but has been deprecated since late 2025 in favor of v2: any new n8n workflow should be built on the external API v2, the only version that keeps receiving new endpoints (e-invoice imports, API-driven reconciliation, and so on).
Bundle FlowKit Complet
€269