Update: Channeltivity now has built-in PDF Certificate generation capabilities and this workaround is no longer necessary. 


For more information, check out How Do Training & Certification PDF Certificates Work?


Original Article:


Channeltivity's Zapier connector  makes it easy to automate workflows between your PRM and other applications. In this article, we'll walk you through the steps of how you can automatically issue PDF certificates to Users who complete training Certifications within Channeltivity. 


In order to automate PDF certificates with Zapier, you'll need:


Overview

For this automation, we're going to first create a Google Docs template that we'll use to generate the certificates for all new Certification Completions in Channeltivity. We'll then build a Zap that automatically populates it with the data from Channeltivity and sends it as a PDF to the student using Gmail. You can easily use another email method, but this one is quick and easy.



Step 1: Create the certificate template in Google Docs


Since we'll be using Google Docs to create the certificates, we'll need to first set up a template for Zapier to use. The template needs to contain placeholders for all the fields that Zapier will populate based on the Certification Completion in Channeltivity. Here's how:

  1. Create a new Google Doc and name it something like "Channeltivity Certificate Template."
  2. Add an official-looking background and your company logo to give it a professional appearance. 
  3. Add text and placeholders. In the below image, placeholders are regular text surrounded by double curly-braces, like {{myVariable}}. It doesn't matter what you name the placeholders, just make sure you know what data they should ultimately be populated with.


Here's an example of what your template could look like:


Step 2: Create a new Zap and set up the Trigger


Once you have your Google Doc Template, it's time to jump into Zapier:

  1. In Channeltivity, manually create a Certification Completion for a test/dummy User in Channeltivity by going to Training & Certification > Certification Completions > New > New User Certification Completion
  2. Log into Zapier to create a new Zap
  3. Set the Trigger as the Channeltivity "Certification Completion Status Change" event > Continue
  4.  Select your Channeltivity account from the Account dropdown menu > Continue
  5. Test the Trigger using the User Certification that you created in Step 1




Step 3: Only continue for completed Certifications


The Channeltivity "Certification Completion Status Change" trigger will fire whenever a User or Organization Certification Completion status changes (when it's in progress, completed, expired, or voided). Therefore, to ensure the Zap only executes when a User completes a Certification, we need to filter out all other events except for completions. Doing so will ensure that we only send a PDF when a User actually completes a Certification.  Here's how:

  1. Add a new Filter action to the Zap
  2. Set up the conditions so that the Zap only continues if both of these conditions are true:

    1. The field "Post Changes Status Name" from the previous step exactly matches "Completed" -- only continue if a Certification is actually completed and not for other events

    2. The field "Post Changes User Id" from the previous step is greater than 0 -- ensures Certifications that are awarded on the Partner Organization level are excluded. (We're only handling User Certifications in this Zap.)
    3. Click the Continue button to move to the next step




Step 4: Format the Certification completion dates


The next two Zapier actions we're adding will format the dates provided by Channeltivity to make them more readable for the certificate. Here's the first one:

  1. Add a new Format action to the Zap, setting the event to "Date / Time"
  2. Select "Format" as the transformation and then select "Post Changes Completion Date" as the input.
  3. Specify the "To Format" you'd like the completion date to appear in and select YYYY-MM-DDTHH:mm:ssZ as the "From Format" 
  4. Tip: rename this Action to something like "Format Certification Date" to make it easier on yourself later.



Step 5: Format the Certification valid-until date

For this step, repeat the previous step, but using the "Post Changes Completion Valid Until" field as input. Again, you'll want to rename this action to something more recognizable like "Format Valid Until Date" or the like.



Step 6: Create the certificate Google Doc from the Template


This is the fun part. We're going to create a new Google Doc using our template and populate it with the User and Certification information. Here we go:

  1. Add a Google Docs action to your Zap and select the "Create Document from Template" event.
  2. Set the "Template Document" to the Google Doc template you created earlier in this article and then create some kind of formula for the "New Document Name". A good naming convention could be a combination of the User's name, the Certification name and the date.
  3. Specify in which folder you want to store the new Document.
  4. Under "Sharing Preference", make sure to select "Anyone with link can view". This is important, because it allows Zapier to access the PDF and send it via email!
  5. All the placeholders that you created in your Google Doc template in Step 1 will appear as fields within the Zapier action and need to be populated with variables from the Channeltivity Certification Completion trigger and the formatters that we just set up in Steps 4 and 5.

Once you're done, your action should look something like this:


Make sure to finish setting up the action and test it before continuing to the final step.



Step 7: Send the certificate via email 


This is the last step in your Zap and will send the PDF certificate to the User. We're using Gmail in this example because it's easy, but Zapier offers several other ways to send mail that you could use as well. This is what setting up sending the certificate with Gmail looks like:

  1. Add a final action to your Zap. The app should be "Gmail" and the event "Send Email"
  2. Select the User's email address from the initial Trigger as the recipient
  3. You may want to bcc yourself so you can keep an eye on your Zap
  4. Complete the other required fields
  5. For the email Body field, we're leaving it as text, although you can make it fancy with HTML if you want. 
  6. The most important part is attaching the Google Doc as a PDF. For this, we add the "Export Links Application Pdf" variable from Step 6 into the Attachments field


That's it! Save your Zap and publish it, then test it out by manually creating Certification Completions in Channeltivity and making tweaks as needed.