Invoices from Zapier
Turn a new sheet row, Airtable record or form response into a numbered invoice with a PDF and a hosted page, from one step in a Zap.
A Zapier invoice step in ASHDOCS takes the customer and the line items from any trigger and sends them to POST /api/v1/invoices. ASHDOCS numbers the invoice, calculates tax on each line, renders the PDF and creates a hosted invoice page your customer can open. With Email to Customer set to Yes, it also emails the invoice in the same step.
There are two ways to run it. The ASHDOCS Zapier app gives you a Create Invoice action, searches and four invoice triggers with labeled fields. Without the app, a Webhooks by Zapier Custom Request step sends the same JSON with your API key in the X-API-Key header. Both routes create the same invoice, and the request below is exactly what the app sends for a two-line invoice.
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
}'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
};
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,
}
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_315cb2bcc1b045b28242",
"kind": "invoice",
"status": "issued",
"number": "INV-0001",
"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",
"reference": "recA1b2C3d4E5f6G7",
"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_315cb2bcc1b045b28242/pdf",
"hosted_url": "https://api.ashdocs.com/i/1a5TvIhq7lkk7z4cpnoLy4gKdilfjvD5C_qJ0r4V3VY"
}Response from a test key, trimmed. Two line items make one invoice; a test invoice uses 0 credits.
Line items from rows
Line Items is a Zapier line-item group, so each mapped entry fills Line item description, Quantity, Unit Price, Tax Rate (%) and Unit. Empty lines are skipped and Quantity defaults to 1.
No duplicates on retries
Map a row or record ID into Idempotency Key. If the Zap runs again with the same key, ASHDOCS returns the first invoice instead of creating a second one.
Triggers for what happens next
Invoice Sent, Invoice Viewed, Invoice Paid and Invoice Overdue start a Zap when the event happens. They use webhooks, which are on paid plans.
How a Zapier invoice step works, in four steps
The flow is the same whether the trigger is Google Sheets, Airtable, a form tool or any other app Zapier connects to.
- 1. Pick the trigger: for example a new spreadsheet row, a new Airtable record or a new form response.
- 2. Add the ASHDOCS Create Invoice action and connect it with an API key from the API Keys page of your dashboard. Start with a test key, which costs nothing while you build the Zap.
- 3. Map Customer Name and Customer Email, then fill Line Items with Line item description, Quantity and Unit Price (Tax Rate (%) and Unit are optional). Leave Issue Invoice on Yes to number the invoice now, or set it to No to save a draft.
- 4. Test the step and turn the Zap on. The step returns Invoice Number, Status, Total, Payment Page URL and PDF URL for later steps, such as writing the number back to the row.
Multiple line items on one invoice from Zapier
Create Invoice sends every entry in its Line Items group as a line on the same invoice. When the trigger or an earlier step returns line items, such as several rows looked up from a sheet or the lines of an order, map those fields into Line item description, Quantity and Unit Price, and Zapier passes them to ASHDOCS as a list. ASHDOCS creates one invoice with one line per entry, applies each line's own tax rate and adds up the totals.
A trigger that fires once per row, like a new spreadsheet row, makes a one-line invoice each time. If your lines live in separate rows and you want them grouped, give the rows of one invoice the same group value and use the spreadsheet import described on the Google Sheets page. Lines with neither a description nor a unit price are dropped; a line with only one of the two stops the step with a message that names the line.
Triggers, actions and their fields
These are the field labels in the ASHDOCS Zapier app and the API fields they fill. Every invoice step also outputs Invoice ID, Invoice Number, Status, Total, Balance Due, Payment Page URL and PDF URL.
| Kind | In Zapier | Fields | API |
|---|---|---|---|
| Trigger | Invoice Sent, Invoice Viewed, Invoice Paid, Invoice Overdue | Event, Event ID, Occurred At, then the invoice's fields | invoice.sent, invoice.viewed, invoice.paid, invoice.overdue (webhooks, paid plans) |
| Action | Create Invoice | Saved Customer or Customer Name, Customer Email, Customer phone (optional, needed for SMS reminders), Customer Tax ID, Customer Address Line 1 to Customer Country | customer |
| Action | Create Invoice: Line Items | Line item description, Quantity, Unit Price, Tax Rate (%), Unit | line_items[] |
| Action | Create Invoice: details | Currency, Due Terms, Issue Date, Due Date, Reference, PO Number, Notes, Terms, Template, Document Type, Issue Invoice | currency, due_terms, issue_date, due_date, reference, po_number, notes, terms, template, kind, issue |
| Action | Create Invoice: delivery | Email to Customer, Email CC, Email Subject, Email Message, Idempotency Key | send.channels[0], Idempotency-Key header |
| Action | Send Invoice | Invoice, To, CC, Subject, Message | POST /api/v1/invoices/{id}/send |
| Search | Find Invoice | Invoice Number or Invoice | GET /api/v1/invoices |
| Search | Find Customer | GET /api/v1/customers?q= | |
| Action | Create Customer, Generate PDF, Redact Document | Name, Email, Phone, Tax ID, address; Source, HTML / URL, Page Size; PDF, Redact | /api/v1/customers, /api/v1/tools/* |
Status of the ASHDOCS Zapier app
The ASHDOCS Zapier app is available by invite while Zapier reviews the public listing: ask us and we send an invite that adds it to your Zapier account. It isn't in Zapier's public app directory yet, so you will not find it by searching there.
Ask us from the contact page for an invite to the app. The Webhooks by Zapier route works today without one: add a Custom Request step with method POST, the URL https://www.ashdocs.com/api/v1/invoices, the headers X-API-Key and Content-Type: application/json, and a JSON body like the one above as Data. Zapier lists Webhooks by Zapier as a premium app, so that route needs a paid Zapier plan.
Issuing an invoice uses 1 credit; drafts and test invoices use none. The free plan includes 100 credits per month. The tasks your Zap runs are billed by Zapier, not by ASHDOCS.
Frequently asked questions
Does ASHDOCS work with Zapier?
Yes. You can create, send and find invoices from any Zap, with the ASHDOCS Zapier app (available now on request) or with a Webhooks by Zapier step that calls the API. The app also has Invoice Sent, Viewed, Paid and Overdue triggers, which use webhooks and need a paid ASHDOCS plan.
Can one Zap put several rows on one invoice?
Yes, when the rows reach the action as line items. Map them into the Line Items group and each entry becomes a line on the same invoice. A trigger that delivers one row at a time makes a one-line invoice per row.
Will a Zap that retries create a duplicate invoice?
Not if you fill Idempotency Key. Use a value that is unique per invoice, such as the spreadsheet row ID or the Airtable record ID, and a retry with the same key returns the first invoice instead of creating another.
Can the Zap email the invoice to my customer?
Yes. Set Email to Customer to Yes and ASHDOCS emails the issued invoice to Customer Email; Email CC, Email Subject and Email Message change the defaults. The email links to the hosted invoice page, which shows a Pay button when Stripe or Razorpay is connected.
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.