Docupilot
HomeLoginSignup
  • Docupilot Help Documentation
  • Getting Started
  • Building Templates
    • Tokens (Merge Field)
    • Document Builder
    • AI-Powered Template Builder
    • Word Document (DOCX) & PowerPoint (PPTX)
    • Excel (XLSX)
    • Fillable PDF
    • Template Preferences
    • Formatting Your Data
    • Numerical Calculations
    • Advanced usage
  • Test your document template
  • Deliveries
    • Email
    • Webhook
    • Dropbox
    • Google Drive
    • One Drive
    • DropboxSign (formerly Hellosign)
    • DocuSign
    • SignNow
    • Xodo sign (formerly Eversign)
    • Signable
    • Yousign
    • Amazon S3
    • SFTP
  • Create document
    • Data Capture Form
    • API & Webhook Integration
    • Bulk Create
    • Integrate with Zapier
    • Integrate with Make
    • Integrate with Zoho Flow
    • Integrate with Integrately
  • Integrations
    • Google Forms
    • Google Sheets
    • Airtable Extension
    • Docupilot Add in for Microsoft Word
  • Collaborating with multiple users
    • Invite users
    • Manage & delete users
  • Reports
  • Settings
    • Workspace
    • API Settings
    • Manage Subscription
    • Linked Accounts
  • Folders & Templates management
    • Manage Folders
    • Manage Templates
    • Share Templates & Folders
  • Profile & Account Security
  • Frequently Asked Questions (FAQs)
  • Developers
    • API Overview
    • Templates API
    • Folders API
  • Updates
    • Scheduled Downtime Notification
Powered by GitBook
On this page
  • Getting Started
  • Uploading DOCX
  • Updating DOCX
  • Types of Merge Fields
  • Tokens (Merge Field)
  • Condition (if-else)
  • Lists (Loops)
  • Bulleted List
  • Numbered List
  • Tables
  • Inserting a dynamic image
  • Inserting Dynamic Links
  • Adding hyperlink to an image:
  • Adding hyperlink to text:
  • Inserting a dynamic QR Code
  • Inserting Google Maps
  • Grid Helper
  • Rich Text Helper
  • Repeat Slides
  • Embedding Fonts in a DOCX Template
  • Comments

Was this helpful?

  1. Building Templates

Word Document (DOCX) & PowerPoint (PPTX)

This section helps you to generate dynamic Word documents and PowerPoint.

PreviousAI-Powered Template BuilderNextExcel (XLSX)

Last updated 25 days ago

Was this helpful?

Getting Started

You can use Word Documents or PowerPoint ( .docx, .pptx is the supported format ) as your document template, you can build your document in Ms Word, Google Docs or Zoho Writer and then upload it to Docupilot as a .docx or .pptx file. If you are already using a word document for your business, replace the information that will change like client company name, client name to {{client.name}}, {{client.company}}.

Uploading DOCX

Updating DOCX

You can update your Word Document templates in any of the following ways:

Option 2: Manual Update Alternatively, you can edit your template in any document editor (like Microsoft Word, Google Docs, or Zoho Writer), save it as a .docx file, and upload it manually to Docupilot.

You cannot modify your Word Document template inside Docupilot.

Types of Merge Fields

Docupilot supports a variety of merge fields for you to use.

  • Tokens (Merge Field)

  • Conditions (if-else)

  • Loops

  • Tables

Tokens (Merge Field)

Tokens are placeholders that Docupilot replaces with your data when generating documents.

Tokens are placeholders enclosed within double curly brackets {{ }} that Docupilot replaces with your custom data when generating documents.

Basic Tokens

Each token corresponds to a specific data field. For example:

  • {{email}} → Replaced with the email address.

  • {{clientName}} → Replaced with the client’s name.

  • {{company_name}} → Replaced with the company name.

Nested Tokens (to handle grouped data)

You can structure data hierarchically using dot notation. This is useful when working with related fields within an entity. For example:

  • {{client.first_name}} → Replaced with the client’s first name.

  • {{client.last_name}} → Replaced with the client’s last name.

Condition (if-else)

You can use conditional statements to show or hide contents based on your data. For example, If you are creating an invoice, you want to display CASH if the payment_mode is cash, else if the payment_mode is the card you want to show CARD.

{{#if (payment_mode == "cash")}}
CASH
{{else if (payment_mode == "card")}}
CARD
{{else}}
Please Insert preferred Mode of Payment{{/if}}

To use conditional statement for checking inverse or negation of a condition, use the not in the condition. For example, to add an instruction requesting to add secure link if payment mode is not available on record:

{{#if (not payment_mode)}}
Please Add your payment details in this secure link: <your secure payment link>
{{/if}}

You can use the conditional statements in three ways

  • if

  • if-else

  • if-else if

  • if-else if-else

  • if-else if-else if

  • if-else if-else if-else

  • and so on

Below are a few examples:

{{#if show_payment_details}}

ACH to {{acNumber}}

{{/if}}

prints the text ACH to xxxxxxxxx if show_payment_details is present and not false.

{{#if (payment_status == "paid")}}

payment cleared

{{/if}}

prints payment cleared if payment_status equals to "paid" (case-sensitive)

{{#if (payment_status != "paid")}}

unpaid

{{/if}}

prints unpaid if payment_status not equal to "paid" (case-sensitive)

{{#if (payment_status == "paid")}}

paid

{{else}}

unpaid

{{/if}}

prints paid if payment_status equals to "paid" otherwise prints unpaid

{{#if (payment_status == "paid")}}

paid

{{else if (payment_status == "initiated")}}

payment initiated

{{else}}

pending

{{/if}}

prints paid if payment_status equals to "paid"

prints payment initiated if payment_status equals to initiated

otherwise prints pending

{{#if (price > 1000)}}

good deal

{{/if}}

prints the text good deal if price is greater than 1000

{{#if (price >= 1000)}}

decent deal

{{/if}}

prints text decent deal if price is greater than or equal to 1000

{{#if (price < 1000)}}

small deal

{{/if}}

prints text small deal If price less than 1000

{{#if (price <= 1000)}}

okay-ish deal

{{/if}}

prints text okay-ish deal If price less than or equal to 1000

{{#if (payment_message contains "paid")}}

Payment is cleared {{/if}}

prints Payment is cleared if payment_message contains the text paid (for example, this invoice has been paid contains the text paid in it)

{{#if (payment_message not_contains "paid")}}

Payment is due {{/if}}

prints Payment is due if payment_message does not contain the text paid (for example, this invoice is not cleared does not contain the text paid in it)

{{#if (status == "open" or status == "on-hold")}}

Payment is pending

{{/if}}

prints Payment is pending if status is open OR on-hold

{{#if (status == "open" or status == "on-hold" or status == "under review")}}

Payment is pending

{{/if}}

prints Payment is pending if status is open OR on-hold OR under review

{{#if (status != "open" and status != "on-hold")}}

Payment is not pending

{{/if}}

prints Payment is not pending if status is not open AND not on-hold

{{#if (status == "open" and priority == "high")}}

High priority open task

{{/if}}

prints High priority open task if status is open AND if priority is high

{{#if (payment_status != "paid")}}Please Clear the Dues within 30 days

{{/if}}

prints Please Clear the Dues within 30 days if the payment_status is not equal to paid

{{#if (status in "open,pending")}}In Progress... Please stay tuned for further updates.

{{/if}}

prints In Progress... Please stay tuned for further updates. if status is sub-string of "open,pending"

Hiding Empty Sections & Lines

In the following example, when the address field has a value, it gives desired outcome. If the address is empty, it leaves an empty line in the output.

{{customer_name}},
{{#if address}}{{address}},{{/if}}
{{city}}, {{country}}
Data
Output

To hide empty lines, we should open the if condition in previous line or close it in next line. Here are examples on how the output will look like when street address is passed and when it is not:

Syntax
Data
Output

Lists (Loops)

Lists are used when you want to print a list of items in your document.

  • Simple List

  • Advanced List

  • Bulleted List

  • Numbered List

Simple List

{{#each items}}
{{this}}
{{/each}}
Output
Apple
Orange
Strawberry

Advanced List

You can use an advanced loop if you want to print list of items like line items. Think of this as a subform with multiple rows in your main form.

{{#each line_items}}
{{name}} ${{price}}
{{/each}}
Output
Iphone6 $799
Iphone7 $899
Iphone8 $999

Bulleted List

Nested Bullets:

Bulleted lists can be nested so as to have a multi layered information.

For example, below syntax demonstrates nested list up to 2 levels.

Note : The second level will be printed only when products has at least one entry.

Similarly, for a nested list up to 3 levels.

Note : In the above example second and third levels will be printed only when items and sub_categories have at least one entry.

Note : The above syntax can be extended for multiple levels based on requirement.

Numbered List

Tables

Tables are similar to Complex list, but the data will be rendered in a table. Example if you want to generate a invoice, you may want display a table with all the line items.

Hiding Empty Tables

You can use IF condition to hide empty tables, you should wrap the entire table inside a IF condition.

{{#if line_items}}
{{!...INSERT THE ABOVE TABLE IN THIS LINE...}}
{{/if}}

Filtering rows in a Table based on empty column value

Filtering rows in a Table based on a column value

Inserting a dynamic image

This will be helpful if you want to insert dynamic image in the document.

Format - {{insert_image image1 width="width" height="height"}}

Example - {{insert_image image1 width="300" height="300"}}

If you want to automatically adjust the height to keep proportions, you can use:

Example - {{insert_image image1 width="300"}}

Similarly to automatically adjust the width to keep proportions, you can use:

Example - {{insert_image image1 height="300"}}

The image URL need to be publicly accessible so we can download and insert it in the document.

Inserting Dynamic Links

You can insert dynamic hyperlinks into images and text within your templates. These links change based on the data you pass when generating a document.

Adding hyperlink to an image:

  1. Right-click the image

  2. Select Link

  3. in the Address field, enter: docupilot:my_link

Adding hyperlink to text:

  1. Highlight the text you want to link

  2. Right-click and select Link

  3. In the Address field, enter: docupilot:my_link

How It Works

  • my_link is a dynamic token.

  • During document generation, Docupilot will replace it with the actual URL you provide in your data.

  • Clicking the image or text in the generated document will open the corresponding URL.

Tip: You can use multiple dynamic links in a template by giving each one a unique token (e.g., docupilot:link1, docupilot:link2)

Inserting a dynamic QR Code

This will be helpful if you want to insert dynamic QR code from your data in the document.

Format - {{insert_qr url size="qr_size" margin="qr_margin" color="qr_color"}}‌

Example - {{insert_qr url size="100" margin="1"}}

Example - {{insert_qr url size="100"}}

Example: {{insert_qr url margin="7"}}

Example: {{insert_qr url color="0000FF"}}

The color of the QR should be given in hex coding only.

Inserting Google Maps

This will be helpful if you want to insert Google Maps from your data in the document.‌

Format - {{insert_map Location width="map_width" height="map_height" map_type="maptype" zoom="map_zoom"}}‌

The supported map types are as follows. The default map type is the roadmap.‌

  1. roadmap

  2. satellite

  3. hybrid

  4. terrain

Example - {{insert_map Location width="500" height="500" map_type="roadmap"}}

Example: {{insert_map Location map_type="roadmap" zoom= "20"}}

Example: {{insert_map Location height="300" zoom= "5"}}

Grid Helper

The Grid Helper will render the list input in a grid format, with specified column size.

Syntax: {{#grid items col_size=3}} {{@item1}}{{@item2}{{@item3}} {{/grid}}

Example:

If the number of columns ( i.e.,col_size) is 5, then {{@item4}} and {{@item5}} can be used to access entries 4th and 5th column items in each row.

Rich Text Helper

The rich text helper enables content formatting in various ways, including bold, italic, underlined text, different fonts, sizes, colors, and more, surpassing plain text capabilities.It supports both HTML and Markdown format input to richtext.

Syntax : {{richtext content}}

Example:

Repeat Slides

The Repeat Slides functionality allows you to repeat one or more slides within your presentation dynamically based on a list data. Place the repeat slide syntax anywhere within a dedicated text box on a slide.

Syntax:

{{repeat_slides items count=3}}

where items is the token referring to list data, count defines the number of slides to be repeated. For example, when count is set to 3, 3 slides including the current one are repeated for each item in items.

Examples:

Simple product catalog: Consider the case where you want to repeat a slide for each product in your catalog, and you need to add 1 product into each slide separately, use the syntax {{repeat_slides products}} and add the placeholders like {{product_name}}, {{specifications}}, etc into the same slide. The generated document will contain appropriate resulting items.

Detailed product catalog: Consider similar case as above, but you want to add the each of the product details in 3 slides. Say, first slide of each product contains basic information, next slide contains specifications and the 3rd slide related to that product contains pricing and warranty information. Use the syntax {{repeat_slides products count=3}} and add placeholders for basic information {{product_name}}, etc., in first slide, {{material_used}}, {{dimensions}}, etc., in second slide and {{price}}, or a pricing table, and {{warranty_information}}, etc in third slide. For each product passed, the generated document will have 3 slides.

Embedding Fonts in a DOCX Template

To ensure a document retains a specific font that is not supported on our end, you must embed the fonts within the document. This will make sure that the generated document maintains the same font as the original.

Here's how to embed fonts in your DOCX template:

  1. Open Your DOCX Template: Begin by opening your template using Microsoft Office.

  2. Enable Font Embedding:

    • For Mac Users: Navigate to Preferences -> Save -> "Embed fonts in the file."

    • For Windows Users: Go to Options -> Save ->"Embed fonts in the file".

  3. Save and Upload: Finally, save your document with the embedded fonts and upload the updated document to Docupilot.

Comments

You can add comments in the document template to help your future editors. The comments will be removed in the output document.

Comments Syntax : {{!Your comments here}}

Option 1: Using the Microsoft Word Add-In With the Microsoft Word Add-In, you can upload your templates directly from Microsoft Word to Docupilot. For installation and usage refer to our .

Qr with size 100 and margin 1 with value https://docupilot.app
Qr with size 100 and default margin 4 with value https://docupilot.app/
Location Value is Manchester

If you're having trouble locating these settings within Microsoft Office, refer to this for guidance.

customer_name = John Doe
city = NY
country = US
John Doe,

NY, US
customer_name = John Doe
street = WinWood St.
city = NY
country = US
John Doe,
WinWood St.,
NY, US
{{customer_name}},{{#if street}}
{{street}},{{/if}}
{{city}}, {{country}}
customer_name = John Doe
city = NY
country = US
John Doe,
NY, US
{{customer_name}},{{#if street}}
{{street}},{{/if}}
{{city}}, {{country}}
customer_name = John Doe
street = WinWood St.
city = NY
country = US
John Doe,
WinWood St.,
NY, US
{{customer_name}},
{{#if street}}{{street}},
{{/if}}{{city}}, {{country}}
customer_name = John Doe
city = NY
country = US
John Doe,
NY, US
{{customer_name}},
{{#if street}}{{street}},
{{/if}}{{city}}, {{country}}
customer_name = John Doe
street = WinWood St.
city = NY
country = US
John Doe,
WinWood St.,
NY, US
article
Word Add-In Guide
Dynamic hyperlink for images
Dynamic hyperlink for images in Word and Powerpoint
Dynamic hyperlink for text in Word and Powerpoint
Dynamic hyperlink for text in Word and Powerpoint
Qr with margin 7
Location value is Manchester, with map type as road map and a Zoom set to 20
Location value is Manchester with height as 300 px and zoom set to 5
Grid helper
Example Rich Input from Airtable demonstrating Bold text, Headings and List items.
Document Generated retaining the same input structure while matching the style with the document template.
Repeat Slides - Input
Repeat Slides - Output
Mac Users-Embedding Font in a DOCX Template
Windows Users-Embedding Font in a DOCX Template
Word (.docx) template overview
Bulleted List
Nested Bullet List 1
Nested Bullet List 2
Numbered List
Tables Syntax
If the value for name is empty in any row, it will be skipped in the output table.
If the value for name is Iphone in any row, it will be skipped in the output table.
QR with color blue & value
https://docupilot.app/