Typeform Integration
Automatically create and distribute diplomas and certificates from Typeform after survey completion. Any data collected in the survey will be inserted into the diploma or certificate.
Adding Variables
Open the desired survey in Typeform and select the question whose response needs to be placed in the document. Copy its ID from the address bar (the text following "block=").
Question ID in Typeform
Next, in the document, add a text field and insert a variable, which corresponds to the ID (i.e., prepend a percent sign to the ID without a space). The answer to that question will be inserted into this field. You can preformat the text so it appears as desired.
Document in DiMaker with Question ID
You can add multiple text blocks and variables. DiMaker can populate data from the following Typeform fields: Short Text, Long Text, Phone Number, Email, Website, Number, Date, Ranking, Opinion Scale, Rating, Matrix, Multiple Choice, Yes/No.
Human-Readable IDs
To make working with variables easier, publish your survey in Typeform. Then, in settings, click on "Block references" and define readable IDs (e.g., last_name or first_name).
Block references in Typeform
In this case, you can use these variables in DiMaker documents (with a % before the ID, e.g., %last_name).
Document in DiMaker with readable Question ID
Creating a Webhook
To enable Typeform to send data after a survey is completed, you need to add a webhook. While in the desired survey, click "Connect" - "Webhooks," then "Add a webhook."
Adding a webhook in Typeform
In the webhook creation window, it is important to correctly specify the Endpoint (access point).
https://dimaker.app/api/v1/typeform-create/
You’ll also need to add several variables:
-
secure*
A token (36-character string) from the "API Tokens" page.
-
doc_id*
The document ID (36-character string) that will be used to create the file. You can find the ID in the address bar when the document is open. The document must not be in the trash but can be in any folder.
-
mail_id
The email template ID (36-character string) for sending the document via email. You can find the ID in the address bar when the template is open. If this variable is not provided, the email will not be sent.
-
email_send
The time to send the email with the file. Possible values are:
onfinish - Send all emails after all files are created (default).
oncreate - Send emails immediately after the file is created. For single file creation, onfinish and oncreate are identical.
timeout - Send emails after a specified time interval. In this case, you need to provide two additional parameters:
email_timeout_value - numerical interval value (integer).
email_timeout_unit - interval unit, which can be "m" (minutes), "h" (hours), or "d" (days).
Alternatively, provide an exact timestamp in Unix time using email_timeout_timestamp. If both timeout and email_timeout_timestamp are provided, the latter takes priority. -
folder_id
The folder ID in Disk (36-character string) where files will be saved. If the folder doesn't exist, it will be created automatically with the first file.
-
page_id
The page number(s) (number or string) to use if the document has multiple pages. You can provide a single number (first page = 0) or multiple numbers separated by commas.
If you need to insert the current date, a random number, or other data, use the functions.
Constructing the Endpoint
Now you can construct the endpoint URL. It’s best to do this in a text editor and then copy it into the Endpoint field in the webhook creation window. The URL might look like this (highlighted for clarity):
Let’s break it down step-by-step:
- https://dimaker.app/api/v1/typeform-create/? - request address
- doc_id=b75b01cf-c732-49c6-80a0-77dd051a8299 - Document ID
- folder_id=5a390b28-9845-4c01-b94a-7d252b115e2e - Folder ID in Disk
- mail_id=fb5eff48-4c08-4df7-a9e6-29e17896317c - Email template ID
- secure=8453bc41-с34у-4ead-80e8-c4e76175a11b - API token
Variables are separated by an "&" sign. Do not use spaces. Carefully construct the string, replacing placeholders with your data, and make sure not to miss any characters. After you’ve inserted the URL, save the webhook settings.
And that's it! You’re ready to test. Fill out the survey to see how it works. If everything is configured correctly, you’ll find a diploma or certificate file in the designated Disk folder. If you’ve specified a mail_id, the file will also be sent via email. If the file doesn’t appear, check the webhook delivery history in Typeform. Go to "View deliveries" under the "Response" tab to see the reason for any issues.