PDF workflows in n8n.
The HTTP Request node plus one Header Auth credential gives every n8n workflow — cloud or self-hosted — the full 30-tool document API.
Prerequisites
- An ASHDOCS account — the free tier includes 100 monthly credits, no card required.
- An API key from the dashboard (Keys page). Sandbox keys (prefix ash_test_) run everything without consuming credits.
Test the key before building anything:
curl https://www.ashdocs.com/api/v1/me -H "X-API-Key: ash_live_..."
Setup, step by step
- 1
Create a reusable credential
Credentials → New → “Header Auth”. Name: exactly “X-API-Key”. Value: your key. Every ASHDOCS node in every workflow can now reuse it.
- 2
Add the HTTP Request node
Method: POST. URL: the tool endpoint. Authentication: Generic Credential Type → Header Auth → the credential from step 1.
https://www.ashdocs.com/api/v1/tools/pdf-to-markdown
- 3
Send a file in
Body Content Type: “Form-Data”. Add a parameter with type “n8n Binary File”, name exactly “files”, and Input Data Field Name set to your incoming binary property (usually “data”).
- 4
Send JSON instead
For html-to-pdf, url-to-pdf and the generation tools, set Body Content Type to JSON and write the payload. Any file tool also accepts a file_url string in a JSON body when a link is easier than bytes.
{"html": "<h1>Report</h1>", "options": {"format": "A4"}} - 5
Get the file out
The response is JSON with signed download URLs — not raw bytes. Add a second HTTP Request node with URL set to {{$json.output_files[0].url}} (or add "output": "url" to options and use {{$json.file_url}}) and Response Format: “File”. Its binary output feeds Google Drive, Write Binary File or email nodes directly.
Files in
Form-Data with a parameter of type “n8n Binary File” named “files”, reading from your workflow's binary property. Or send a JSON body with “file_url” when an upstream node already holds a downloadable link.
Files out
Responses are JSON with signed 60-minute URLs. Chain a second HTTP Request node with Response Format “File” on the URL to produce a binary property for downstream nodes. Self-hosted n8n behaves identically — flat-cost automation for high volume.
Three ready-made recipes
Webhook receives HTML → PDF → Google Drive
- Webhook node receives a POST with an html field.
- HTTP Request: POST https://www.ashdocs.com/api/v1/tools/html-to-pdf, JSON body {"html": "{{$json.body.html}}", "options": {"output": "url"}}.
- HTTP Request: GET {{$json.file_url}}, Response Format: File.
- Google Drive node: upload the binary.
Email attachment → bank statement → spreadsheet rows
- Email Trigger (IMAP) with “Download Attachments” enabled.
- HTTP Request: POST https://www.ashdocs.com/api/v1/tools/bank-statement-to-csv, Form-Data, n8n Binary File parameter “files” reading attachment_0.
- HTTP Request: GET the output CSV URL from output_files[0].url, Response Format: File.
- Spreadsheet File node parses the CSV → Google Sheets node appends the rows.
Async: start a workflow when any job completesasync / webhook
- Add a Webhook node and copy its production URL.
- Register it once with the ASHDOCS webhook API:
curl -X POST https://www.ashdocs.com/api/webhooks \ -H "X-API-Key: ash_live_..." \ -H "Content-Type: application/json" \ -d '{"url": "https://your-n8n.example.com/webhook/ashdocs", "events": ["job.completed"]}'- The signed job.completed payload (job_id, tool, outputs[].url) starts the workflow the moment a document is ready.
Popular recipes
Importable workflow JSONs. After import, attach your own Header Auth credential and reconnect accounts.
Webhook → HTML to PDF → Google Drive
~10 min setupPOST html to a webhook and the rendered PDF lands in your Drive.
Import: Workflow → Import from File, or paste the copied JSON straight onto the canvas.
Email statement → CSV rows in a Sheet
~15 min setupBank-statement PDFs arriving by email are parsed into transaction rows appended to Google Sheets.
Import: Workflow → Import from File, or paste the copied JSON straight onto the canvas.
Form upload → extracted fields → Airtable
~10 min setupA form posts a file link; schema-driven extraction turns it into a structured Airtable record.
Import: Workflow → Import from File, or paste the copied JSON straight onto the canvas.
Troubleshooting
| Symptom | Fix |
|---|---|
| PDF is corrupted downstream | You mapped the JSON envelope instead of the file. Download output_files[0].url (or file_url) with a second HTTP Request node set to Response Format: File. |
| 401 Unauthorized | The Header Auth credential name must be exactly X-API-Key. |
| Multipart errors / “Files required” | The body parameter type must be “n8n Binary File”, named exactly “files”, with the Input Data Field Name pointing at a real binary property. |
| Self-hosted n8n behind a proxy can't reach the API | Outbound HTTPS to https://www.ashdocs.com must be allowed by your egress rules — the API is HTTPS-only. |
Frequently asked questions
Is there a dedicated ASHDOCS node for n8n?
The HTTP Request node is the supported path today — it covers every endpoint with one reusable Header Auth credential, and this page documents the exact field names. Nothing to install.
Any differences between n8n Cloud and self-hosted?
None for this API. Both call the same HTTPS endpoints with the same credential; self-hosted just needs outbound HTTPS allowed. Self-hosting makes high-volume document automation flat-cost.
How do sandbox keys work in n8n?
Create a second Header Auth credential holding an ash_test_ key. Workflows run end-to-end — real files, real responses — without consuming credits. Swap credentials when you go live.
Can one workflow chain several tools?
Yes — pass each response's output URL into the next tool as file_url, no intermediate downloads needed. For fixed sequences, ASHDOCS pipelines run the whole chain server-side in one call.