Skip to main content

Custom Certificates

7 minutes readLevel: AdvancedLast Updated: December 2025

Overview

This feature enables the organization using Glific to provide personalized certificates and/or badges to the contacts upon completion of a certain task or action or a desired behaviour recorded through the flows.

Using this feature organizations can upload multiple certificate or badge templates, and share these for the contacts having their personalized information such as "name", or "course participation", "course completion" details or any other such contact specific details be printed on the certificates and have the certificate shared with the contacts through the flows.

In effect, this feature also enables users to create visual gamified elements such as leaderboards, progress ring/bar, progression to milestones etc, that can be sent out through flows.

Pre-requisites

Google Cloud Studio Setup

  1. Enable Slides API Use this wizard on the selected project in the Google Developers Console. This will automatically turn on the Slides API.
Screenshot 2025-04-07 at 2 55 36 PM
  1. Enable Drive API Use this wizard on the selected project in the Google Developers Console. This will automatically turn on the Drive API.
Screenshot 2025-04-07 at 2 55 53 PM
  1. Create a new service account on the Google Cloud which has the “editor” permission to the Google Cloud Studio. Go to Google Cloud Console, and ensure that you’re in the right project. (same project which has the BigQuery and Google Cloud Storage bucket linked to your Glific account)
  • a. Go to API and Services.
  • b. Go to Credentials -> Create Credentials -> Select Service Account
Screenshot 2025-04-07 at 2 57 21 PM
  • c. Give the service account an appropriate name.
  • d. Give the the “editor” access and complete the creation.
Screenshot 2025-04-07 at 2 59 26 PM
  • e. Once the service account is created, new keys need to be generated.
  • f. Go to manage keys -> Create new key -> select json.
  • g. This downloads the json file
Screenshot 2025-04-07 at 3 00 23 PM
  • h. These JSON needs to be copied into the Google Slides provider on the Settings page
Screenshot 2025-04-07 at 3 00 39 PM

Setup on Glific

Go to Settings -> Google Slides -> Activate this setting and enter the json key that was generated in the earlier step.

Screenshot 2025-04-07 at 3 01 07 PM

Aspect Ratios

For best results:

  • Landscape certificates: Use a resolution of 3300 x 2550 px.
  • Portrait certificates: Use resolution of 816 x 1056 px
  • Badges: Use a square format, resolution of 600 x 600 px.
Screenshot 2025-04-07 at 3 07 49 PM

To change the page dimensions for a google slide

  1. Go to file -> page setup -> custom.
  2. This provides the menu to alter the dimensions of the page
  3. It is advised to research on your own behalf for the most suitable aspect ratio of the base template that suits your use case.

Sending the certificates/badges to contacts

Note: If you see the .PPTX label (like in the image below), your file is still in PowerPoint format and needs to be converted into Google Slides to work with custom certificates.

To convert it:

  1. Open the PPT in Google Slides.
  2. Once the file opens, click File on the top toolbar and Save as Google Slides.
Screenshot 2025-06-25 at 10 23 27 AM

The presentation will open in a new window and automatically save in your Google Drive as a Google Slides file. We need to use the new slide in the certificates.

1. Create/ Import template design in Google Slides

  1. For certificates created on canva or other softwares, export the designs as “ppt” and save it on your computer
  2. Convert them to Google Slides format as described above(if they are still in ppt format).
  3. The design template should have placeholders where the personalized information for the Glific contacts will be populated.
Screenshot 2025-04-07 at 3 10 29 PM
  1. Create the new slide file
  2. Go to “import slides” in “files”
  3. Select “upload” and “browse” to get the ppt file
  4. Import the file and see it as slide 2 on your ppt.
  5. This url on 2nd slide will be used to create the certificate template on Glific.
Screenshot 2025-04-07 at 3 10 53 PM
  1. Provide editor access to the google service account’s client email address.
Screenshot 2025-04-07 at 3 12 14 PM
  1. Certificate url is the link to the google slide template taken by copying the link.
  • Ensure that the slide template does not end with “...slide=id.p1”
  • Ensure that the slide template is saved on the Google Drive linked to organization email id.
  1. Create the slides inside a folder located in the shared drive. Then, share that folder with the service account and assign it the Content Manager role.

2. Save the certificate template in Glific

  1. On the Glific platform, go to Flows -> Certificates -> Create to add a new certificate template

    Screenshot 2025-04-07 at 3 14 12 PM
  2. Add a title, description (optional), and the certificate url (see step 6 in above section

  3. The design template is now saved.

  4. The placeholders need to be added as 1 or 2. In single curly braces with the numbers.

  5. Ensure that the placeholders have a large enough text field to accommodate the information for contact being sent

  6. The certificate is saved, and the copy id button can be used to refer back to the template while using the webhook in Glific flow. (refer steps ahead)

3. Use the certificate template in the flow

  1. Add a Call a webhook node.
  • By default, FUNCTION would be selected. Leave this as it is.
Screenshot 2025-12-03 at 1 35 07 PM
  • In the FUNCTION field, select the pre-defined function create_certificate from the dropdown.
Screenshot 2025-12-03 at 1 35 41 PM
  • Give it an appropriate result name.
Screenshot 2025-12-03 at 1 36 15 PM
  1. Add the parameters in the FUNCTION Body.
  • Go to Function Body on top right corner. You would see the following.
Screenshot 2025-12-03 at 1 37 12 PM
  • Ensure that the following parameters are passed to the webhook
{
"certificate_id": 5,
"contact": "@contact",
"replace_texts": {
"{1}": "@contact.name"
}
}
Screenshot 2025-04-07 at 3 16 58 PM
  1. Here the certificate_id has to be taken from the certificate list page by using the copy id button for the certificate generated.
  2. ”contact”: “@contact” has to be kept as it is. This enables the webhook to have access to all the contact variables being referenced in the webhook.
  3. ”replace_texts” parameter should contain the placeholders that should be replaced in the design template. The format for replace text has to be following
“replace_texts”: {
“{1}” : “@contact.fields.preferred_name” ,
“{2}” : “@results…” }
  1. Ensure that the placeholders on the template are the same as the placeholder replacement texts being referred in the webhook function body are matching.
  2. The certificate url being generated can be used in the next Send a message node by going to the attachments and calling the Expression
  3. Based on the webhook result name defined, the Google Cloud media url is can be called by @results.webhookresult.certificate_url

Error Handling

Screenshot 2025-04-07 at 3 20 39 PM

1. Use the following validation before the create_certificate webhook call to ensure that the certificates are not generated for contacts for whom the placeholder parameters value is not present

  • a. Use the below expression to check if the variables being sent in the webhook indeed have a value for the given contact and do not end up printing a certificate like error 1 shared above.
<%=  ["@contact.name", "@contact.abcd"] |> Enum.any?(&String.starts_with?(&1, "@")) %>

File → Page Setup (15)

  • b. For more than 2 variables, add further commas in the first list and add the variable names in double quotes.
  • c. For just one variable, use split by custom expression and plainly enter the name of the variable and check for the condition “has only the phrase” and the variable name as shown in the screenshot.
  • d. The above expression returns the value true if any of the variables start with “@..” which indicates that the variable is empty.
  • c. This method can be used to avoid sending certificates for contacts where the variable is not present.

2. To catch certificates non-generation due to api level problems.

Screenshot 2025-04-07 at 3 23 14 PM
  • a. Insert the following split by expression right after the webhook. Use @results.webhookresultname.success contains true when the certificate url is generated.
  • b. Use this condition to share a relevant message to inform the contact of certificate generation

3. “Error 1: URL ending with slide=id.p”

This error happens because the id after slide indicates the location of the slide in the google drive and if the location is not present, then the code is not able to perform the steps like create a copy and replace the placeholder text with the variables from the webhook.

Steps to resolve

  • a. Copy the root slide as slide 2 and slide 3
  • b. Delete the slide 1 and 2
  • c. Refresh the page
  • d. See the slide url is now changed.
  • e. Use this new url

4. “Error 2: Permission Issues”

Steps to resolve

  • a. Ensure that the design template is created in the google drive account linked to the org’s email id.
  • b. Try by storing the template in a different location on the drive or on a different shared drive

Best practices

Since this feature uses Google Drive and Google Slides APIs internally, be aware of their rate limits. Running this flow for a very large number of contacts (e.g., thousands) in one go may:

  • Lead to certificate generation failures, or

  • Slow down the overall execution of the flow due to throttling by the APIs.

To avoid these issues:

  • Place the create_certificate webhook after a Wait for Response node in the flow. This ensures certificates are generated only when the user actively responds, naturally throttling the process.

  • If you want to generate in bulk and send in realtime without waiting for user activity, then run the flow in smaller batches (under 100 contacts) with some time-interval between each batch rather than for the entire contact list at once.