Invoice PDFs to data in n8n

In n8n, an Extract From File node turns the invoice into base64 text, an HTTP Request node sends it to ConvertPDF.pro, and the vendor, invoice number, dates, total and line items come back as JSON for the rest of your workflow.

What you need: a ConvertPDF.pro API key. API access comes with any paid page pack (one-time, no subscription). The free 5-page trial works in the web app only, so you can see the result on a real invoice before you buy. Files can be up to about 3 MB.

How this works: n8n sends the PDF to our web address and we send back the data. This is a setup using n8n's own web-request step, not an app listed in n8n's directory. The steps follow n8n's documentation, and the screens change from time to time, so run one test invoice before you rely on it.

Set it up in n8n

  1. Get the invoice file

    Use any node that outputs a PDF as binary data, such as Gmail, Google Drive, Read Binary File or a Webhook that receives a file.

  2. Extract From File: Move File to Base64 String

    Add an Extract From File node, set the operation to “Move File to Base64 String”, and leave “Input Binary Field” as data. Set “Destination Output Field” to data.

  3. HTTP Request

    Method POST, URL below. Turn on Send Headers with Authorization set to Bearer and then your API key (from the Automation page; keep it in an n8n credential, not typed into the node). Turn on Send Body, choose Body Content Type JSON and Specify Body “Using JSON”, then switch the JSON field to Expression mode so the file value is filled in.

    URL:     https://convertpdf.pro/api/v1-extract
    Header:  Authorization: Bearer YOUR_API_KEY
    Body:    {
               "template": "invoice",
               "pdfBase64": "{{ $json.data }}"
             }
  4. Use the result

    The response is available as normal JSON on the next node. The fields are listed below. Add a Split Out node with “Field to Split Out” set to data.line_items to get one item per line.

What comes back

One JSON object. These are the values you will use most:

Vendordata.vendor
Invoice numberdata.invoice_number
Invoice datedata.invoice_date
Totaldata.total
Line items (one row each)data.line_items
Needs a person to check?needs_review (true or false), with review_fields

Each PDF page uses one page from your pack. A document where nothing at all is found is not charged (up to 5 a day per account). The full response, error codes and signed webhooks are on the Automation page.

Using another tool?