Generating document templates

Updated 1 week ago by Kiruthika

You can use a document template to automate the generation of your process-related PDFs. You must be a Process Admin or a Process Developer to create these templates.

For example, if you are an HR manager in your organization and you manage the ‘Recruitment’ process in your organization’s Kissflow account, you will be able to create a document template that can help you generate offer letters automatically when the candidate progresses through the interview process and gets the offer.

Creating a document template

  1. Navigate to the process for which you would like to create a document template.
  2. Click the More options icon and click Document templates.
  3. Click + New template
  4. Enter the name of the document template.
  5. Click Create.

Editing a document template

You can draft the content of your template in the editor that opens up after you create it. This editor supports all the formatting options like any other text editor and offers additional support to insert process fields, page breaks, images, and form tables too.

As we have built this feature using the Jinja templating engine, we recommend you explore its potential to the fullest by referring to its documentation here. You can write advanced conditions or loops, and extend the functionality of the template if you are familiar with Jinja.

Inserting process fields

You can insert a specific system or process field in two ways:

Enter two curly braces without any space in between them like this “{{“ to see the list of fields used in the current process and select the field that you want to insert in the document template.

(or)

You can also drag and drop the specific field from the left panel onto the template editor.

We support only the following field types in the document template:

  • Text
  • Text area
  • Number 
  • Currency
  • Email 
  • Sequence number
  • Date
  • DateTime
  • Child tables/Form tables
Inserting page breaks

You can add as many pages as you want in your document. Click the Page break icon from the toolbar to insert a page break.

Adding a form table

You can insert the form tables created as part of your process into your document template.

Drag and drop a form table in your process like how you would add a field onto the template editor. Please note that a line of code would be appended above and below your form table when you drag and drop it. These syntaxes are added by Kissflow and we recommend you do not remove or modify them as it will affect the functioning of the template.

Enter the name of the column header and use double curly braces to insert a process field as its value.

You cannot drag and drop a field while setting values for a specific field in a table. Make sure to use double curly braces to insert a specific process field as a value in a table.
Inserting an image

You can add or insert an image in the following three ways:

  1. From your desktop - Drag and drop the image from your local computer into the template editor
  2. From a web page - Right-click on the image and click Copy image address. Navigate to your template editor and click the Insert image icon. Right-click and paste the image address. Click Done. Hover over the image to format, resize, or delete the image as necessary.
  3. Copy & Paste - You can also simply do a "Command/Ctrl C + Command/Ctrl V" to copy and paste the images from your existing documents from Microsoft Word or Google Docs to your document template editor.
You can also copy and paste text content from any external source into your editor.

Previewing a document template

Click Preview on the top of the editor after you complete drafting the template. You can maximize the preview screen, download the document as a PDF file, or open the link in a new tab.

The document template will be saved automatically when you preview it. However, you can also click Save to save your changes as necessary.

Associating a document template

You can automate the PDF generation by establishing a connection between the process and the document template you had recently created.

  1. Click the process connector and select the Generate PDF step from the available options.
  2. Set up a connection with the required account as necessary.
  3. After choosing a process, select the relevant process instance ID.
  4. Select the document template that has to be mapped to the process.
  5. Enter the title of the document and choose whether the document must be shared as an attachment in the process form. If yes, select the specific attachment field to which the generated PDF must be attached.
    1. You can refresh fields to view all the updated fields in the form. You can also map form fields from your trigger step or fields from your previous action steps. These values will be automatically added to the fields after the action is executed.
  6. Click Next
  7. Add a Kissflow Email connector to share the generated PDF as an attachment in an email.
  8. Enter the values of all the email-related fields and make sure to select the 'key' field under Attachments > Fields > Generate PDF.
  9. Activate the integration by toggling it ON.

Managing a document template

  1. Navigate to your process and click > Document templates
  2. Choose your preferred template and click to edit, rename, duplicate, or delete the document template.


How did we do?