No-code database

Generate PDFs from Airtable

Turn Airtable records into PDFs. An automation script calls PDFgen and writes the link back to a field.

When a record is created or matches a condition, an Airtable automation can call PDFgen and write the resulting PDF link straight back to a field — no exports, no manual steps.

The script below POSTs a record’s fields to PDFgen and saves the returned url. Prefer no-code? Connect Airtable through Zapier or Make instead.

What is Airtable?

Airtable is a no-code database with built-in automations. Its “Run a script” action can call external APIs with fetch(), so it can generate a PDF from a record and store the link.

How to generate PDFs with Airtable

Connect through Automation › Run a script — no native app needed. Each step calls the PDFgen API and returns a hosted PDF link.

  1. 1

    Create an automation

    Trigger on “When a record is created” or “When a record matches conditions”.

  2. 2

    Add a “Run a script” action

    Pass the record’s fields in as input variables.

  3. 3

    Call PDFgen and save the link

    Use the script below to POST to the API with export_type "url", then write the returned url back to a field (via output or an “Update record” step).

Request setup
Method
POST
URL
https://pdfgen.com/api/v1/generate
Header
Authorization: Bearer pdfg_live_xxx

JSON body

{
"template_id": "tmpl_xxx",
"data": { "name": "Acme Corp", "total": "$2,400.00" },
"export_type": "url"
}

The response is { "url": "https://…" } — a hosted link to the PDF. Use html instead of template_id to send raw markup.

Example script

// Airtable automation "Run a script" action
const { name, total } = input.config();
const res = await fetch("https://pdfgen.com/api/v1/generate", {
method: "POST",
headers: {
Authorization: "Bearer pdfg_live_xxx",
"Content-Type": "application/json",
},
body: JSON.stringify({
template_id: "tmpl_xxx", // or html: "<h1>{{name}}</h1>"
data: { name, total },
export_type: "url",
}),
});
const { url } = await res.json();
output.set("pdfUrl", url); // map this to an Update record step

What you can build

  • Generate an invoice PDF per Airtable order record
  • Create certificates from a roster table
  • Produce shipping labels from a fulfilment base
  • Render contracts from a CRM record and store the link

Frequently asked questions

How do I generate a PDF from an Airtable record?
Add an automation with a “Run a script” action that POSTs the record’s fields to /api/v1/generate, then write the returned url back to a field.
Can I do it without scripting?
Yes — connect Airtable to PDFgen through Zapier or Make and use their HTTP/webhook step instead of a script.
Where does the PDF go?
Send export_type "url" and PDFgen returns a hosted link; save it to an Airtable field (URL or attachment) for easy access.

Other integrations

Automate your PDFs

Grab an API key, wire up a Airtable step, and generate documents on autopilot — no servers, no headless browsers.