Introduction
TemplateDocs is a service for creating documents from templates. The templates are Microsoft Word documents (.docx files) that have been uploaded to the service.
Let's get started by creating our first template. Here we will be showing how to create a simple order confirmation document:
Hello {{Name}},
Thank you for your order from {{CompanyName}}.
Item | Price |
---|---|
{{ >> Items }} {{Name}} | ${{Price}} {{ << }} |
Total: ${{Total}}
Your order is on its way!
After uploading the template, we can use the service to fill in the template with custom data. The data can be provided through the UI form (see below) or as a JSON object:
{
"Name": "John Doe",
"CompanyName": "Acme Inc",
"CompanyWebsite": "www.acme.com",
"Items": [
{ "Name": "Widget", "Price": 10 },
{ "Name": "Gadget", "Price": 20 }
],
"Total": 30
}
Clicking the Generate button will create and download a new document with the data filled in:
Hello John Doe,
Thank you for your order from Acme Inc.
Item | Price |
---|---|
Widget | $10 |
Gadget | $20 |
Total: $30
Your order is on its way!
See It in Action
Now that you've seen the individual steps, here's a quick one-minute video that puts it all together: