LogoLogo
About
  • Home
  • Guides
  • BDK
  • REST API
  • Release Notes
  • templates
    • Fill in a Template File
  • Documents
    • Document Processing: Workflow Patterns and Best Practices
    • Get a File as a Scanned Document
    • Get Fields from a Document
    • Get Tables from a Document
    • Extract Data from a Document
  • PDFs
    • Convert to PDF
  • Extract information from a PDF
  • Getting a PDF Field or Label
  • Setting Information in a PDF
  • JSON
    • Getting Data from JSON
  • Converting JSON to String
  • Modifying JSON
  • Working with Excel Files
  • Excel
  • Working with Excel Files
Powered by GitBook
On this page
  • Overview
  • Use Cases
  • Input Concepts
  • Output Concepts
  • Automation Example

Was this helpful?

Export as PDF
  1. templates

Fill in a Template File

Fills in a template with provided placeholder values.

Overview

This procedure fills in a template with provided values. Currently, only .txt and .docx file types are supported for use as template files. This procedure is helpful in automation workflows where documents need to be dynamically generated, such as invoices, contracts, letters, certificates, or reports.

Use Cases

Use Case
Description
Placeholder Examples

Customer Invoices

Automatically create invoices from billing data

{date}, {customer_name}, {total_amount}

Employment Contracts

Generate contracts for new hires based on HR forms

{employee_name}, {start_date}, {role}

Appointment Reminders

Send personalized reminders to patients or clients

{patient_name}, {appointment_time}

Event Certificates

Create custom certificates for attendees

{participant_name}, {event_name}

Purchase Confirmations

Generate confirmation emails or documents for online purchases

{order_id}, {product_name}, {price}

Service Agreements

Populate service agreements with client and project info

{client_name}, {service_description}

Input Concepts

Concept
Description
Type
Default
Required

template

The .txt or .docx file to be filled in.

File

N/A

Yes

placeholder values

The text that will fill in the placeholders in the template. These must be enclosed in quotes. For example: the name is "Jane Doe"

Text / String

N/A

Yes

template marker

The characters used to mark the placeholders in the template. Must be exactly two characters.

Text

"{}"

No

Output Concepts

Concept
Description

file

The file with the specified placeholders replaced by the provided values.

Automation Example

Consider the following .txt file, containing placeholders enclosed in < > symbols:

Invoice

Date: <date>
Customer Name: <customer_name>
Item: <item_description>
Total Amount: <total_amount>

Thank you for your business!
the template
fill in the template
  the template marker is "<>"
  the date is "4/23/2025"
  the customer_name is "Jane Doe"
  the item_description is "Web Design Services"
  the total_amount is "$2000"
Invoice

Date: 4/23/2025
Customer Name: Jane Doe
Item: Web Design Services
Total Amount: $2000

Thank you for your business!

Note: Line 1 will raise a question, prompting you to provide or upload the template file itself.

Last updated 16 days ago

Was this helpful?

138B
invoice_template.txt
A sample invoice .txt file containing placeholders.