Skip to main content
The Document templates screen is where you create and manage the PDF templates that the Generate Document HubSpot workflow action fills in. Each template defines the layout of a PDF and the contact properties to put in it.

Before you start

  • You need the Owner or Admin role. Members and people with the Billing role see an empty list and can’t open, create or change templates.
  • HubSpot must be connected to your organisation. See HubSpot setup.

Open Document templates

Select Settings in the left sidebar, then Document templates under Integrations. The screen has a Templates list on one side and the template editor on the other. The list shows each template’s name; when it’s empty, it reads “No document templates yet.”

Create a template

  1. Enter a Name for the template.
  2. Write the Template JSON. The editor starts with an example you can change.
  3. Select Create template.
The definition sets an optional document title and a list of blocks, rendered from top to bottom. A template needs at least one block and can have up to 80. To insert a contact property, put a token in the contact.<property> form inside double braces, such as {{contact.firstname}}. You can use tokens in the title, in heading and paragraph text, and in table cells. When the Generate Document action runs, Flowella replaces each token with the enrolled contact’s value.
If the JSON can’t be read, Flowella shows “Template JSON is invalid” and doesn’t save it.

Edit or delete a template

  1. Select the template in the Templates list. The editor shows its Name, its Template ID and its Template JSON.
  2. Change the name or the JSON, then select Save changes.
To start a new template instead, select New template. This clears the editor. To remove the template, select Delete.
Delete removes the template straight away, without asking you to confirm. Any HubSpot workflow that still uses its ID will fail with DOCUMENT_TEMPLATE_NOT_FOUND.

Use a template in HubSpot

  1. Select the template in the Templates list.
  2. Next to Template ID, select Copy ID.
  3. In your HubSpot workflow, paste the ID into the Document template ID field of the Generate Document action.
When the workflow runs, Flowella fills in the template with the enrolled contact’s properties and saves the PDF to your HubSpot files as a public file, so anyone with its link can open it. Don’t put sensitive personal data in document templates. The action returns the file URL and HubSpot file ID for later workflow steps. See Generate Document for the action’s settings.

If the document isn’t created

When the action can’t create the PDF, the workflow step fails with an error code:

Generate Document (HubSpot)

The workflow action that fills in these templates.

AI Document Reader (HubSpot)

The companion action that reads documents into contact properties.
Last modified on October 24, 2026