ASHDOCS for n8n
Create, send and track numbered invoices from any n8n workflow, on n8n Cloud or on your own server.
An n8n invoice workflow with ASHDOCS sends a customer and its line items to POST /api/v1/invoices and gets back a numbered invoice with a PDF and a hosted invoice page. Every step is an HTTPS call with your API key, so the workflow is the same on n8n Cloud and on self-hosted n8n.
There are two ways to build it. The ASHDOCS community node adds an ASHDOCS node, with Invoice, Customer and Document operations, and an ASHDOCS Trigger node for invoice events. Without it, n8n's HTTP Request node calls the same endpoint with an X-API-Key header. The request below is what either one sends for a two-line invoice that is emailed straight away.
curl -X POST https://www.ashdocs.com/api/v1/invoices \
-H "X-API-Key: ash_test_..." \
-H "Content-Type: application/json" \
-d '{
"customer": { "name": "Northwind Studio", "email": "accounts@northwind.example" },
"line_items": [
{ "description": "Website redesign", "quantity": "1", "unit_price": "1200.00", "tax_rate": "10" },
{ "description": "Hosting, monthly", "quantity": "12", "unit_price": "15.00", "tax_rate": "10" }
],
"currency": "USD",
"reference": "recA1b2C3d4E5f6G7",
"issue": true,
"send": { "channels": [{ "type": "email" }] }
}'const body = {
"customer": { "name": "Northwind Studio", "email": "accounts@northwind.example" },
"line_items": [
{ "description": "Website redesign", "quantity": "1", "unit_price": "1200.00", "tax_rate": "10" },
{ "description": "Hosting, monthly", "quantity": "12", "unit_price": "15.00", "tax_rate": "10" }
],
"currency": "USD",
"reference": "recA1b2C3d4E5f6G7",
"issue": true,
"send": { "channels": [{ "type": "email" }] }
};
const res = await fetch("https://www.ashdocs.com/api/v1/invoices", {
method: "POST",
headers: { "X-API-Key": "ash_test_...", "Content-Type": "application/json" },
body: JSON.stringify(body),
});
const invoice = await res.json();
console.log(invoice.number, invoice.hosted_url);import requests
body = {
"customer": {"name": "Northwind Studio", "email": "accounts@northwind.example"},
"line_items": [
{"description": "Website redesign", "quantity": "1", "unit_price": "1200.00", "tax_rate": "10"},
{"description": "Hosting, monthly", "quantity": "12", "unit_price": "15.00", "tax_rate": "10"},
],
"currency": "USD",
"reference": "recA1b2C3d4E5f6G7",
"issue": True,
"send": {"channels": [{"type": "email"}]},
}
r = requests.post(
"https://www.ashdocs.com/api/v1/invoices",
headers={"X-API-Key": "ash_test_..."},
json=body,
)
invoice = r.json()
print(invoice["number"], invoice["hosted_url"]){
"id": "inv_8df41725d6d0490d834c",
"kind": "invoice",
"status": "issued",
"number": "INV-0002",
"customer": { "name": "Northwind Studio", "email": "accounts@northwind.example", "id": "cus_da4dddf61db945fc9e5c" },
"line_items": [
{ "description": "Website redesign", "quantity": "1", "unit_price": "1200.00", "tax_rate": "10", "amount_formatted": "$1,200.00" },
{ "description": "Hosting, monthly", "quantity": "12", "unit_price": "15.00", "tax_rate": "10", "amount_formatted": "$180.00" }
],
"currency": "USD",
"issue_date": "2026-10-05",
"due_date": "2026-11-04",
"testing": true,
"totals": { "subtotal_formatted": "$1,380.00", "tax_formatted": "$138.00", "total_formatted": "$1,518.00", "balance_formatted": "$1,518.00" },
"credits_cost": 0,
"pdf_url": "https://api.ashdocs.com/api/v1/invoices/inv_8df41725d6d0490d834c/pdf",
"hosted_url": "https://api.ashdocs.com/i/b-CdSudfXKbeIFNXDPWQFLY9nT-ICHr2KFVyzR8Chu4"
}Response from a test key, trimmed. The ASHDOCS node outputs this JSON as it is, so later nodes use the same names.
Line items from JSON
Line Items Input has two modes: Define Below for fixed lines, and Using JSON for an array mapped from an earlier node, such as rows aggregated from a sheet.
A trigger for invoice events
ASHDOCS Trigger starts a workflow when an invoice is sent, viewed, paid or overdue, on paid plans. Verify Signature, on by default, ignores requests not signed by ASHDOCS.
A workflow file to start from
The file at /workflows/ashdocs-invoice.n8n.json holds a Webhook node, an HTTP Request node that calls POST /api/v1/invoices, and a node that replies with the number and link.
Build an n8n invoice workflow in four steps
These steps use the ASHDOCS node. With the HTTP Request node, steps 2 and 3 become one node with a JSON body like the sample above.
- 1. Add a trigger: a Google Sheets or Airtable node, a Schedule Trigger, or a Webhook node that receives the invoice details from a form or another app.
- 2. Add the ASHDOCS node, choose Invoice and Create, and create an ASHDOCS API credential with your API key. A test key is the right choice while you build, because it never uses credits.
- 3. Fill Customer Name and Customer Email, choose a Line Items Input mode, and map Description, Quantity, Unit Price and Tax Rate (%). Keep Issue Invoice on, and turn on Email to Customer to send the invoice in the same call.
- 4. Execute the workflow. The node returns the invoice JSON, so later nodes can read number, status, totals, hosted_url and pdf_url, for example to write the number back to the sheet.
Multiple line items on one invoice in n8n
n8n runs a node once for each item it receives, and the ASHDOCS node creates one invoice per item. Five sheet rows going into Invoice → Create therefore make five one-line invoices. To put them on one invoice, combine the rows first, for example with n8n's Aggregate node or a Code node, so that one item carries an array of lines.
Then set Line Items Input to Using JSON and map that array into Line Items (JSON). Each element needs description and unit_price; quantity (default 1), tax_rate (a percentage) and unit are optional. With the HTTP Request node, put the same array in the line_items field of the body. ASHDOCS calculates the tax on each line and the invoice totals.
Nodes, operations and fields
These are the names in the ASHDOCS community node. Its output is the API's own JSON, so output fields keep their API names, such as pay_link_url.
| Kind | Node and operation | Fields | API |
|---|---|---|---|
| Trigger | ASHDOCS Trigger | Trigger On: Invoice Sent, Invoice Viewed, Invoice Paid, Invoice Overdue; Options: Verify Signature | invoice.sent, invoice.viewed, invoice.paid, invoice.overdue (webhooks, paid plans) |
| Action | Invoice → Create | Customer (Enter Customer Details or Use a Saved Customer ID), Customer Name, Customer Email, Customer Phone (Optional, Needed for SMS Reminders), Customer Details | customer |
| Action | Invoice → Create: lines | Line Items Input (Define Below or Using JSON); Line Items: Description, Quantity, Unit Price, Tax Rate (%), Unit; Line Items (JSON) | line_items[] |
| Action | Invoice → Create: Additional Fields | Currency, Document Type, Due Date, Due Terms, Email CC, Email Message, Email Subject, Idempotency Key, Issue Date, Notes, PO Number, Reference, Template Name or ID, Terms | currency, kind, due_date, due_terms, send.channels[0], Idempotency-Key header, issue_date, notes, po_number, reference, template, terms |
| Action | Invoice → Send | Invoice ID; Options: To, CC, Subject, Message | POST /api/v1/invoices/{id}/send |
| Action | Invoice → Get, Invoice → Get Many | Get By (Invoice ID or Invoice Number); Filters: Status, Customer Email, Search, Issued After/Before, Due After/Before | GET /api/v1/invoices |
| Action | Customer → Create, Customer → Find by Email | Name, Email, Phone, Tax ID, address fields; Email | /api/v1/customers |
| Action | Document → Generate PDF, Document → Redact | Source, HTML / URL, Page Size; File URL, Redact | /api/v1/tools/* |
Status of the ASHDOCS n8n node
The ASHDOCS node for n8n is available now if you ask us for it. Its public listing is still in progress, and until you install the node the HTTP Request node does the same job with your API key.
The community node package has been built and tested in n8n 2.42; ask us from the contact page to get it. Until you have it, the HTTP Request node works today: method POST, URL https://www.ashdocs.com/api/v1/invoices, an X-API-Key header and a JSON body. The workflow file above is set up that way; replace ash_test_REPLACE_WITH_YOUR_KEY with your key after you import it.
Issuing an invoice uses 1 credit, and test invoices use none. The free plan includes 100 credits per month.
Frequently asked questions
How do I create an invoice in n8n?
Use the ASHDOCS node's Invoice → Create operation, or the HTTP Request node calling POST /api/v1/invoices with your API key in the X-API-Key header and the invoice as JSON. Both return the numbered invoice with its PDF link and hosted page.
Why did five sheet rows create five invoices?
Because n8n runs the node once per item, and each run creates one invoice. Aggregate the rows into one item with an array of lines, then use Line Items Input set to Using JSON.
Can the workflow email the invoice?
Yes. Turn on Email to Customer, or include send with an email channel in the HTTP body, and ASHDOCS emails the invoice to the customer email in the same call.
Does it work on self-hosted n8n?
Yes. The node and the HTTP Request route both make HTTPS calls to the ASHDOCS API, so a self-hosted instance only needs outbound HTTPS to www.ashdocs.com. The ASHDOCS Trigger also needs ASHDOCS to reach your n8n webhook URL.
Plans
- 100 credits per month
- 1 seat
- No webhooks
- 1,500 credits per month
- 1 seat
- Webhooks
- 10,000 credits per month
- 3 seats
- Webhooks
- 30,000 credits per month
- 5 seats
- Webhooks
- 100,000 credits per month
- 10 seats
- Webhooks
Test keys are free, never expire and never use credits; plan rate limits apply. Webhooks are on paid plans. Issuing an invoice uses 1 credit. No per-seat fees. See full pricing.