Generate Purchase Order PDFs in Make.com

A purchase order is the one document in this set that goes out rather than in, and the one a supplier will quote back at you. It has to carry their article references, your order number and the name of whoever approved it. This scenario builds it from the approval record.

600 free requests / month, no credit card

Document
Purchase order
Platform
Make.com
Modules
4
Output
PDF, binary buffer

// live preview

The order your supplier receives

Change the supplier references and render it. Those are the codes the supplier picks from, so they matter more on this document than your own article names.

// the workflow

Approval in, order out

Approval granted
form, Slack action, database flag
Get supplier
lookup, references and email
CustomJS
HTML to PDF
Email to supplier
with the PO number in the subject

The scenario waits for an approval rather than for a request. That ordering is deliberate: a purchase order that goes out before approval is a commitment nobody signed off, and the approver block on the document is what makes the difference visible.

Numbering the order in the scenario

// Set variable module, runs before the PDF
"PO-" + formatDate(now, "YYYY") + "-" + lpad(get(1, "sequence"), 4, "0")

// step by step

Build it yourself

  1. 1

    Connect the CustomJS app in Make

    Add the module to a scenario and create a connection with the API key from your workspace. The getting started page walks through it once, and every later scenario reuses the connection.

  2. 2

    Trigger on the approval

    Whatever records the approval is the trigger: a form response, a Slack button, a status column going to approved. Carry the approver name and timestamp through, because both belong on the document.

  3. 3

    Look up the supplier references

    Your article numbers are not the supplier's. Add a lookup that maps each line to the supplier reference before rendering, otherwise the supplier has to guess what you ordered.

  4. 4

    Render with the HTML to PDF module

    Paste the template, map the lines, leave the page size at A4. The approver block and the terms are plain text fields, so they can differ per supplier without a second template.

  5. 5

    Email it and keep the number

    Put the PO number in the subject line and store it on the record. When the invoice comes back quoting that number, matching it is a lookup rather than a conversation.

// html template

The fields a supplier actually uses

Three blocks decide whether the order can be fulfilled without a phone call: the supplier reference per line, the required by date and the order number in the footer.

Supplier reference per line

{% for line in lines %}
<tr>
  <td>{{ line.name }}</td>
  <td class="small muted">{{ line.supplierRef }}</td>
  <td class="num">{{ line.quantity }}</td>
  <td class="num">{{ (line.quantity * line.unitPrice).toFixed(2) }}</td>
</tr>
{% endfor %}

Approver and order number

<div class="label">Approved by</div>
<p class="small">{{ approver.name }}, {{ approver.role }}, {{ approvedAt }}</p>

<div class="foot">Quote this order number on the invoice: {{ poNumber }}</div>

When the supplier invoice arrives, the same number is what a matching workflow searches for. Keeping it in the footer of every page helps when the PDF is scanned rather than parsed.

Questions about this template

Send your next order as a PDF

Create a workspace, connect the API key in Make, and paste the template into the module.