Skip to content
English
  • There are no suggestions because the search field is empty.

How to Use Inline DocMergy for DOCX in HubSpot Workflows

Learn how to generate Word (.docx) or PDF files directly from text fields, rich text properties, or raw text files using Inline DocMergy in HubSpot workflows.

What is Inline DocMergy for DOCX?

Inline DocMergy for DOCX lets you automatically create a Word document or PDF file directly inside a HubSpot workflow step without needing to upload a pre-designed Word template file first. 

Which Action Should You Use?

  • Use Inline DocMergy: If you want to build a document on the fly using text typed into the workflow, record fields, or raw text files (.txt).
  • Use Standard DocMergy: If you already have a pre-designed .docx Word file with custom layouts, logos, headers, or footers.

Supported Content Sources

When setting up Inline DocMergy, you provide your document text using one of four supported input methods:

  1. Manual Plain Text: Type your text directly into the workflow action box.
  2. Rich Text Property: Select a text property on your record to pull in formatted content (preserves bolding, bullet points, headers, and links).
  3. Template File ID (HubSpot Files): Enter the numeric ID of a text template file (.txt) stored in your HubSpot File Manager.
  4. Template File Public URL: Enter a direct web link pointing to a publicly hosted text template file.

 

How to Insert Record Data (Tokens)

To automatically pull CRM data into your document text, wrap internal property names in double square brackets [[ ]]:

  • Hello [[ object.firstname ]] -> Hello John
  • Company: [[ object.company ]] -> Company: Integration Glue

Why double square brackets [[ ]] instead of double curly braces ?

HubSpot workflow text fields automatically remove or break traditional tags. Using double square brackets [[ ]] prevents HubSpot from stripping your tags, and Inline DocMergy automatically converts them into working template tags behind the scenes.


Step-by-Step Setup

  1. In HubSpot, open your workflow and click + to add an action.
  2. Select Inline DocMergy for DOCX.
  3. Select your Target Record.
  4. Choose ONE of the four content sources to supply your template text:
    • Plain Text Content: Type unformatted text directly into the action step.
    • OR: Template File ID (HubSpot Files): Enter the ID of a plain text template file (.txt) stored in HubSpot Files. (Do not use .docx Word files here).  
    • OR: Template File Public URL: Enter a public web link pointing to a text template file.
    • OR: Rich Text Property Content: Select a formatted text field from your record (preserves bolding, bullet points, and links).
  5. Configure your output file details:
    • Output Folder: Destination path or folder ID in HubSpot Files (e.g., /contracts or a folder ID).
    • Output File Name: File name using tokens (e.g., contract-[[object.dealname]] or contract-[deal_id]).
    • File Visibility: Select Public or Private permissions in HubSpot Files.
  6. (Optional) Map properties to store file details back on the record:
    • Property where generated file ID will be saved
    • Property where generated file URL will be saved
  7. Select your File Output Format  (docx or pdf).
  8. Click Save.