Create PDF
As the name suggests, Generate PDF is a core part of Typeflow — the very reason Typeflow exists is so you can generate PDFs from Google Docs documents. On this page, we'll dive into the different endpoints you can use to generate PDFs programmatically.
The create PDF model
The create PDF model contains all the information needed to generate a PDF from a Google Docs document.
Properties
- Name
gdoc_id
- Type
- string
- Description
The ID of the Google Docs document you want to generate a PDF from.
- Name
variables
- Type
- object
- Description
An object containing the placeholder and its value that will replace the placeholder in the Google Docs document.
- Name
line_items
- Type
- object
- Description
An object that contains the different line items and its value. It allows table to adjust the number of rows in the table based on the number of line items.
- Name
filename
- Type
- string
- Description
The name of the file you want to generate.
Create PDF without Airtable
This endpoint allows you to generate a PDF from a Google Docs document.
Required attributes
- Name
gdoc_id
- Type
- string
- Description
The ID of the Google Docs document you want to generate a PDF from.
Request
curl -G https://app.typeflow.us/api/create-pdf \
-H "Authorization: Bearer {token}" \
-d gdoc_id="1A2B3C4D5E6F7G8H9I0J1K2L3M4N5O6P7Q8R9S0T1U2V3W4X5Y6Z7"
Sample data
{
"gdoc_id": "1XeOZVG61V9fC18sJnD8AevnaO7l8i__mZLzHcukREks",
"variables": {
"{{trip}}": "Jean Dupont",
"{{start_date}}": "jean@example.com",
"{{end_date}}": "16/07/2025",
"{{people}}": [
"people 1",
"people 2"
],
"{{duration}}": "15 days"
},
"line_items": {
"loop_0": {
"{{start}}": [
{
"value": "Data"
},
{
"value": "test"
}
],
"{{description}}": [
{
"value": "oki dac"
},
{
"value": "oki doki"
}
],
"{{duration}}": [
{
"value": "hum"
},
{
"value": "hum hum"
}
],
"{{aspect}}": [
{
"value": "hum"
},
{
"value": "hum hum"
}
]
}
}
}
Response
{
"success": true,
"pdfUrl": "https://rggxnnmlghpybzoqwsso.supabase.co/storage/v1/object/public/pdf/1e96de76-fb1e-404d-899b-9c2c01b352a1/1-ILHSCAemfM9AxfmCGyiQ-cJgImkaVJYDecv5N4xRog-1754560511263.pdf",
"fileName": "Generated Document - 08/07/2025.pdf",
"fileId": "e8d01bfc-da5e-47ee-b2a2-7dcfbe47422e"
}