# PDFMonkey

> Generate PDFs and images from your PDFMonkey templates, and manage the documents they produce.

App · Documents · 8 actions. Web page: https://docs.lodol.com/docs/integrations/pdfmonkey

## Actions

### Create a document

Queue a document for generation without waiting for it. Use this for large batches, then check on it later; to get the file in one step, use 'Generate a document' instead.

**Inputs**

- Template (`template_id`, text, required): The PDFMonkey template to generate from. Pick one of your templates, or a template ID from an earlier step.
- Template data (`payload`, object, required): The fields and values that fill in the template's placeholders, for example the customer name or order total.
- File name (`filename`, text): Name for the generated file, for example 'invoice-1042.pdf'. Leave empty to let PDFMonkey name it.
- Extra details (`metadata`, object): Optional extra details to store alongside the document, for example an order reference.
- Start generating (`generate`, true/false): Start generating the document straight away. Turn this off to save it as a draft and generate it later with 'Update a document'. Default: `true`.

**Outputs**

- `created_at` (text): When the document was created.
- `document_id` (text): The ID of the document in PDFMonkey.
- `document_status` (text): Where the document is in the generation process: "draft", "pending", "generating", "success", or "failure".
- `download_url` (text): Link to download the finished file. Empty until the document is ready, and it expires about an hour after it is issued.
- `failure_reason` (text): Why generation failed, when the document failed to generate.
- `filename` (text): Name of the generated file.
- `meta` (object): The extra details stored with the document.
- `output_type` (text): The kind of file the template produces: "pdf" or "image".
- `preview_url` (text): Link for previewing the document in a browser.
- `public_share_link` (text): Permanent public link to the file. Only set when share links are enabled on the PDFMonkey account.
- `template_id` (text): The ID of the template the document was generated from.
- `template_name` (text): The name of that template, as shown in PDFMonkey.
- `updated_at` (text): When the document was last updated.

**Example output**

```json
{
  "created_at": "2026-03-13T12:34:56.181+02:00",
  "document_id": "a5e86d72-f5b7-43d4-a04e-8b7e08e6741c",
  "document_status": "pending",
  "download_url": "https://pdfmonkey.s3.eu-west-1.amazonaws.com/invoice-1042.pdf",
  "failure_reason": "",
  "filename": "invoice-1042.pdf",
  "meta": {
    "_filename": "invoice-1042.pdf"
  },
  "output_type": "pdf",
  "preview_url": "https://preview.pdfmonkey.io/pdf/web/viewer.html?file=...",
  "public_share_link": "",
  "template_id": "2903f5b4-623b-4e10-b2e3-dc7e2e67ea39",
  "template_name": "Invoice",
  "updated_at": "2026-03-13T12:34:59.412+02:00"
}
```

### Delete a document

Permanently delete a document from PDFMonkey, along with the file it generated.

**Inputs**

- Document ID (`document_id`, text, required): The ID of the PDFMonkey document to delete.

**Outputs**

- `deleted` (true/false): Whether the document was deleted.
- `document_id` (text): The ID of the document that was deleted.

**Example output**

```json
{
  "deleted": true,
  "document_id": "a5e86d72-f5b7-43d4-a04e-8b7e08e6741c"
}
```

### Download a document

Save a finished document's file so a later step can email, upload, or store it. The document must have generated successfully.

**Inputs**

- Document ID (`document_id`, text, required): The ID of the PDFMonkey document to download.

**Outputs**

- `content_type` (text): MIME type of the saved file
- `created_at` (text): When the document was created.
- `document_id` (text): The ID of the document in PDFMonkey.
- `document_ref` (text): Reference to the saved file, for use by a later step
- `document_status` (text): Where the document is in the generation process: "draft", "pending", "generating", "success", or "failure".
- `documents` (list): The generated file, in the shape steps that send or upload files expect
- `download_url` (text): Link to download the finished file. Empty until the document is ready, and it expires about an hour after it is issued.
- `failure_reason` (text): Why generation failed, when the document failed to generate.
- `filename` (text): Name of the generated file.
- `meta` (object): The extra details stored with the document.
- `output_type` (text): The kind of file the template produces: "pdf" or "image".
- `preview_url` (text): Link for previewing the document in a browser.
- `public_share_link` (text): Permanent public link to the file. Only set when share links are enabled on the PDFMonkey account.
- `size_bytes` (number): Size of the file in bytes
- `template_id` (text): The ID of the template the document was generated from.
- `template_name` (text): The name of that template, as shown in PDFMonkey.
- `updated_at` (text): When the document was last updated.
- `url` (text): Download URL for the saved file, served by Lodol

**Example output**

```json
{
  "content_type": "application/pdf",
  "created_at": "2026-03-13T12:34:56.181+02:00",
  "document_id": "a5e86d72-f5b7-43d4-a04e-8b7e08e6741c",
  "document_ref": "doc_4b7c1e2a9d3f45c88a1e6f0b2d5c7e91",
  "document_status": "success",
  "documents": [
    {
      "content_type": "application/pdf",
      "document_ref": "doc_4b7c1e2a9d3f45c88a1e6f0b2d5c7e91",
      "filename": "invoice-1042.pdf",
      "size_bytes": 84213,
      "url": "/actions/core/serve-document/doc_4b7c1e2a9d3f45c88a1e6f0b2d5c7e91?teamId=6512a1b2c3d4e5f600000001"
    }
  ],
  "download_url": "https://pdfmonkey.s3.eu-west-1.amazonaws.com/invoice-1042.pdf",
  "failure_reason": "",
  "filename": "invoice-1042.pdf",
  "meta": {
    "_filename": "invoice-1042.pdf"
  },
  "output_type": "pdf",
  "preview_url": "https://preview.pdfmonkey.io/pdf/web/viewer.html?file=...",
  "public_share_link": "",
  "size_bytes": 84213,
  "template_id": "2903f5b4-623b-4e10-b2e3-dc7e2e67ea39",
  "template_name": "Invoice",
  "updated_at": "2026-03-13T12:34:59.412+02:00",
  "url": "/actions/core/serve-document/doc_4b7c1e2a9d3f45c88a1e6f0b2d5c7e91?teamId=6512a1b2c3d4e5f600000001"
}
```

### Generate a document

Fill in one of your PDFMonkey templates and wait for the finished file. The document is saved so a later step can email, upload, or store it.

**Inputs**

- Template (`template_id`, text, required): The PDFMonkey template to generate from. Pick one of your templates, or a template ID from an earlier step.
- Template data (`payload`, object, required): The fields and values that fill in the template's placeholders, for example the customer name or order total.
- File name (`filename`, text): Name for the generated file, for example 'invoice-1042.pdf'. Leave empty to let PDFMonkey name it.
- Extra details (`metadata`, object): Optional extra details to store alongside the document, for example an order reference.

**Outputs**

- `content_type` (text): MIME type of the saved file
- `created_at` (text): When the document was created.
- `document_id` (text): The ID of the document in PDFMonkey.
- `document_ref` (text): Reference to the saved file, for use by a later step
- `document_status` (text): Where the document is in the generation process: "draft", "pending", "generating", "success", or "failure".
- `documents` (list): The generated file, in the shape steps that send or upload files expect
- `download_url` (text): Link to download the finished file. Empty until the document is ready, and it expires about an hour after it is issued.
- `failure_reason` (text): Why generation failed, when the document failed to generate.
- `filename` (text): Name of the generated file.
- `meta` (object): The extra details stored with the document.
- `output_type` (text): The kind of file the template produces: "pdf" or "image".
- `preview_url` (text): Link for previewing the document in a browser.
- `public_share_link` (text): Permanent public link to the file. Only set when share links are enabled on the PDFMonkey account.
- `size_bytes` (number): Size of the file in bytes
- `template_id` (text): The ID of the template the document was generated from.
- `template_name` (text): The name of that template, as shown in PDFMonkey.
- `updated_at` (text): When the document was last updated.
- `url` (text): Download URL for the saved file, served by Lodol

**Example output**

```json
{
  "content_type": "application/pdf",
  "created_at": "2026-03-13T12:34:56.181+02:00",
  "document_id": "a5e86d72-f5b7-43d4-a04e-8b7e08e6741c",
  "document_ref": "doc_4b7c1e2a9d3f45c88a1e6f0b2d5c7e91",
  "document_status": "success",
  "documents": [
    {
      "content_type": "application/pdf",
      "document_ref": "doc_4b7c1e2a9d3f45c88a1e6f0b2d5c7e91",
      "filename": "invoice-1042.pdf",
      "size_bytes": 84213,
      "url": "/actions/core/serve-document/doc_4b7c1e2a9d3f45c88a1e6f0b2d5c7e91?teamId=6512a1b2c3d4e5f600000001"
    }
  ],
  "download_url": "https://pdfmonkey.s3.eu-west-1.amazonaws.com/invoice-1042.pdf",
  "failure_reason": "",
  "filename": "invoice-1042.pdf",
  "meta": {
    "_filename": "invoice-1042.pdf"
  },
  "output_type": "pdf",
  "preview_url": "https://preview.pdfmonkey.io/pdf/web/viewer.html?file=...",
  "public_share_link": "",
  "size_bytes": 84213,
  "template_id": "2903f5b4-623b-4e10-b2e3-dc7e2e67ea39",
  "template_name": "Invoice",
  "updated_at": "2026-03-13T12:34:59.412+02:00",
  "url": "/actions/core/serve-document/doc_4b7c1e2a9d3f45c88a1e6f0b2d5c7e91?teamId=6512a1b2c3d4e5f600000001"
}
```

### Get a document

Check whether a document has finished generating, and get its download link.

**Inputs**

- Document ID (`document_id`, text, required): The ID of the PDFMonkey document to check.

**Outputs**

- `created_at` (text): When the document was created.
- `document_id` (text): The ID of the document in PDFMonkey.
- `document_status` (text): Where the document is in the generation process: "draft", "pending", "generating", "success", or "failure".
- `download_url` (text): Link to download the finished file. Empty until the document is ready, and it expires about an hour after it is issued.
- `failure_reason` (text): Why generation failed, when the document failed to generate.
- `filename` (text): Name of the generated file.
- `meta` (object): The extra details stored with the document.
- `output_type` (text): The kind of file the template produces: "pdf" or "image".
- `preview_url` (text): Link for previewing the document in a browser.
- `public_share_link` (text): Permanent public link to the file. Only set when share links are enabled on the PDFMonkey account.
- `template_id` (text): The ID of the template the document was generated from.
- `template_name` (text): The name of that template, as shown in PDFMonkey.
- `updated_at` (text): When the document was last updated.

**Example output**

```json
{
  "created_at": "2026-03-13T12:34:56.181+02:00",
  "document_id": "a5e86d72-f5b7-43d4-a04e-8b7e08e6741c",
  "document_status": "success",
  "download_url": "https://pdfmonkey.s3.eu-west-1.amazonaws.com/invoice-1042.pdf",
  "failure_reason": "",
  "filename": "invoice-1042.pdf",
  "meta": {
    "_filename": "invoice-1042.pdf"
  },
  "output_type": "pdf",
  "preview_url": "https://preview.pdfmonkey.io/pdf/web/viewer.html?file=...",
  "public_share_link": "",
  "template_id": "2903f5b4-623b-4e10-b2e3-dc7e2e67ea39",
  "template_name": "Invoice",
  "updated_at": "2026-03-13T12:34:59.412+02:00"
}
```

### List documents

List the documents on the account, newest first, optionally narrowed to one template or status. Returns 24 per page.

**Inputs**

- Template (`template_id`, text): Only list documents generated from this template. Leave empty for every template.
- Status (`status`, text): Only list documents in this state. Leave empty for every state. One of: `success` (Generated successfully), `failure` (Failed to generate), `pending` (Waiting to generate), `generating` (Generating now), `draft`.
- Search (`search`, text): Match part of a file name, or give a document ID to find that one document.
- Updated since (`updated_since`, date and time): Only list documents updated after this date and time.
- Page (`page`, number): Which page of results to return. Starts at 1. At least 1.

**Outputs**

- `count` (number): How many items this page returned.
- `current_page` (number): The page that was returned.
- `documents` (list): The documents on this page.
- `next_page` (number): The next page number, or empty on the last page.
- `prev_page` (number): The previous page number, or empty on the first page.
- `total_pages` (number): How many pages there are.

**Example output**

```json
{
  "count": 1,
  "current_page": 1,
  "documents": [
    {
      "created_at": "2026-03-13T12:34:56.181+02:00",
      "document_id": "a5e86d72-f5b7-43d4-a04e-8b7e08e6741c",
      "document_status": "success",
      "download_url": "https://pdfmonkey.s3.eu-west-1.amazonaws.com/invoice-1042.pdf",
      "failure_reason": "",
      "filename": "invoice-1042.pdf",
      "meta": {
        "_filename": "invoice-1042.pdf"
      },
      "output_type": "pdf",
      "preview_url": "https://preview.pdfmonkey.io/pdf/web/viewer.html?file=...",
      "public_share_link": "",
      "template_id": "2903f5b4-623b-4e10-b2e3-dc7e2e67ea39",
      "template_name": "Invoice",
      "updated_at": "2026-03-13T12:34:59.412+02:00"
    }
  ],
  "next_page": null,
  "prev_page": null,
  "total_pages": 1
}
```

### List templates

List the templates on the account, with the ID needed to generate a document from each one.

**Inputs**

- Page (`page`, number): Which page of results to return. Starts at 1. At least 1.

**Outputs**

- `count` (number): How many items this page returned.
- `current_page` (number): The page that was returned.
- `next_page` (number): The next page number, or empty on the last page.
- `prev_page` (number): The previous page number, or empty on the first page.
- `templates` (list): The templates on this page.
- `total_pages` (number): How many pages there are.

**Example output**

```json
{
  "count": 1,
  "current_page": 1,
  "next_page": null,
  "prev_page": null,
  "templates": [
    {
      "created_at": "2026-01-08T09:12:04.512+02:00",
      "folder": "Billing",
      "is_draft": false,
      "name": "Invoice",
      "template_id": "2903f5b4-623b-4e10-b2e3-dc7e2e67ea39",
      "updated_at": "2026-02-27T16:40:11.902+02:00"
    }
  ],
  "total_pages": 1
}
```

### Update a document

Change a document's data and generate it again: for example to correct a total on an invoice, or to generate a draft that was created earlier.

**Inputs**

- Document ID (`document_id`, text, required): The ID of the PDFMonkey document to update.
- Template data (`payload`, object): New values for the template's placeholders. This replaces the document's existing data.
- File name (`filename`, text): A new name for the generated file.
- Extra details (`metadata`, object): New extra details to store with the document. This replaces the existing details.
- Template (`template_id`, text): Generate the document from a different template. Leave empty to keep the one it already uses.
- Generate again (`regenerate`, true/false): Generate the file again with the new data. Turn this off to change the stored data without producing a new file. Default: `true`.

**Outputs**

- `created_at` (text): When the document was created.
- `document_id` (text): The ID of the document in PDFMonkey.
- `document_status` (text): Where the document is in the generation process: "draft", "pending", "generating", "success", or "failure".
- `download_url` (text): Link to download the finished file. Empty until the document is ready, and it expires about an hour after it is issued.
- `failure_reason` (text): Why generation failed, when the document failed to generate.
- `filename` (text): Name of the generated file.
- `meta` (object): The extra details stored with the document.
- `output_type` (text): The kind of file the template produces: "pdf" or "image".
- `preview_url` (text): Link for previewing the document in a browser.
- `public_share_link` (text): Permanent public link to the file. Only set when share links are enabled on the PDFMonkey account.
- `template_id` (text): The ID of the template the document was generated from.
- `template_name` (text): The name of that template, as shown in PDFMonkey.
- `updated_at` (text): When the document was last updated.

**Example output**

```json
{
  "created_at": "2026-03-13T12:34:56.181+02:00",
  "document_id": "a5e86d72-f5b7-43d4-a04e-8b7e08e6741c",
  "document_status": "pending",
  "download_url": "https://pdfmonkey.s3.eu-west-1.amazonaws.com/invoice-1042.pdf",
  "failure_reason": "",
  "filename": "invoice-1042.pdf",
  "meta": {
    "_filename": "invoice-1042.pdf"
  },
  "output_type": "pdf",
  "preview_url": "https://preview.pdfmonkey.io/pdf/web/viewer.html?file=...",
  "public_share_link": "",
  "template_id": "2903f5b4-623b-4e10-b2e3-dc7e2e67ea39",
  "template_name": "Invoice",
  "updated_at": "2026-03-13T12:34:59.412+02:00"
}
```
