How to Use Inline DocMergy for Google Docs in HubSpot Workflows
Learn how to generate Google Docs 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 Google Docs?
Inline DocMergy for Google Docs lets you automatically create a new Google Doc or PDF file directly inside a HubSpot workflow step without needing to use a pre-designed Google Doc template 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 (like deal notes), or raw text files (.txt).
- Use Standard DocMergy: If you already have a pre-designed Google Doc template with custom layouts, logos, headers, or tables that you want to fill with HubSpot data.
Supported Content Sources
When setting up Inline DocMergy, you provide your document text using one of four supported input methods:
- Manual Plain Text: Type your text directly into the workflow action box.
- Rich Text Property: Select a text property on your record to pull in formatted content (preserves bolding, bullet points, headers, and links).
- Template File ID: Enter the numeric ID of a raw text file (.txt) stored in your file manager. (Do not use Word .docx files here).
- 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 JohnCompany: [[ 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
- In HubSpot, open your workflow and click + to add an action.
- Select Inline DocMergy for Google Docs.
- Select your Target record
- Select the Account that will process this action (your connected Google/DocMergy account).
- Set up your document destination and naming:
- Destination Google Drive folder URL/ID: Paste the full Google Drive folder link or folder ID where the created document should be saved.
- New Google Doc name: Enter the file name for your generated document (supports merge tokens like Agreement_[[object.company]]).
- Choose ONE of the four content sources to supply your template text:
- Plain Text Content: Type unformatted text directly into the action step.
- OR: Rich Text Property Content: Select a formatted text field from your record (preserves bolding, bullet points, and links).
- OR: Template File ID (HubSpot Files): Enter the ID of a plain text template file (.txt) stored in HubSpot Files. (Do not use Google Doc or Word files here).
- OR: Template File Public URL: Enter a public web link pointing to a raw text template file.
- (Optional) Map properties to store file details back on the record:
- Property to save created file ID
- Property to save created file URL
- Click Save