Skip to content
Galink Help Center home
Galink Help Center home

Template

  • In Settings > Questionnaire, you can upload a template with variables to generate a Word document from a parameterized template.

  • Available input variables include vendor profile data, questionnaire responses, selected options, and evidence.

  • The template supports conditional logic and for-loops.

This is advanced settings

To help you, check this example

For instance, you can generate your SAP, Security Exhibit with the vendor answers.

Syntax

Tags

Each tag starts with {{ and ends with }}.

If the name of the tag (the part between {{ and }}) is recognized by the generation algorithm, it will be replaced by the matching piece of information. Otherwise, it is simply removed.

{{vendor.name}} will be replaced by the name of the vendor for this questionnaire

Loops

It’s possible to loop through a list of elements.

For this, there should be a starting tag {{#entity}}, the fields you want to display, and then an ending tag {{/entity}}.

{{#sections}}{{title}}{{/sections}} will be replaced by the list of sections’ titles.

It’s possible to nest loops:

{{#sections}}{{#questions}}{{title}}{{/questions}}{{/sections}} will be replaced by the list of questions’ titles.

{{#sections}}{{#questions}}{{#answers}}{{label}}{{#answers}}{{/questions}}{{/sections}} will be replaced by the list of all answers’ labels.

When inside a loop, you directly access the fields for the entity that is looped on:

{ "questions": [{ "title": "Do you have a RSSI?" }] }

❌ {{#questions}}{{questions.title}}{{/questions}}

✅ {{#questions}}{{title}}{{/questions}}

Available data

Vendor data

vendor.name

name of the vendor for this questionnaire

vendor.contacts

list of all contacts, separated by “; “

vendor.security_officer

name of the security officer

Misc

today

today’s date, localized by using the user’s language

Questionnaire data

{ sections: [{ title: "Title of the section", questions: [{ id: "Id of the question", title: "Title of the question", status: "Status of the question (approved, rejected,...)", answers: [{ label: "Label of the answer (i.e. not the vendor's response)", proof: "Either some text if the proof is a text one, otherwise the name of the file if it is a file proof", }] }] }] }

You have two ways to access questions:

  • through a loop: {{#sections}}{{#questions}}{{title}}{{/questions}}{{/sections}}

  • by their id:

    • {{question.question_id.title}}

    • {{#question.question_id.answers}}{{label}}{{#question.question_id.answers}}

FAQ

Page numbers are always the same

You need to make sure that the page numbers are in the header of the document.

I get one table per question instead of one row per question

You need to make sure you loop inside a row:

{{#questions}}{{title}}

{{#answers}}{{label}}{{proof}}{{/answers}}{{/questions}}

This will show the questions’ titles in the left column and the matching answers (label and proof) in the right column.