Hi ! I am Mohammad Iftekher Ebne Jalal and you can call me Iftu. Currently, I am a BetaMicrosoft Learn Student Ambassador. I have the vision to making technology easy and accessible for everyone and Microsoft Power Platform is also eyeing a similar goal.
If you are an educator or run a student club or community, you are probably familiar with the painstaking work of creating hundreds and thousands of certificates for the participants. How do you do this? By super complicated scripts or rather manually copy-pasting again and again? Well, say no to both coding and repetitive works. Microsoft Power Automate is here to turn this tedious task into a mere cakewalk. I will show you the way of creating and sending certificates without a single line of code.
Who is this for
Onedrive for Business
Now, let's get started.
Step 0: Create Form & Edit Certificate Template
Create a Microsoft form
At first, we need to create a form to trigger (i.e. initiate the task) the flow. As submission of the flow will ultimately result in creating and sending certificates, it is recommended to use the form as attendance or feedback or quiz submission type form which will be shared at the end of the event. For this tutorial, we will ask the name with the question title as “Name” and email address as “Email Address”. You can rename it in whatever way you like, after being used to this flow. Please note that the name participants enter via the form will be pasted on the certificate template and it will be sent to the email address they share.
Prepare the Certificate Download the template certificate created or provided by the organization. Open it withMS Wordandactivate the developer option. Make necessary changes. We will be keeping Name as a single entity (Not First Name and Last Name format usually found in the templates) to make things simple.
To make a placeholder, we need to select the text “Name” and go toDeveloper Tab. Select “Plain Text Content Control”
Now selectPropertiesand give it a simple title as “name” .
Save it as a.docxfile and upload it on yourOnedrive for Business.
3. Create Repository
Generate a folder on yourOnedrive for Businessand name it as “Certificates”.We will be storing our files there.
You are now ready for action!
Step 1: Preparing the Trigger
A. From the left menu, selectCreate>Automated Cloud Flow.
B. Give it a suitable title in theFlow Namesection. I kept the name “MLSA Event Certificates”.
C. Now it’s important to select a suitable trigger. So, search with “When a new response is submitted”.
Now you will be landing on the flow editor page. The landing page looks like this :
D. From theForm Iddropdown menu, select the form you created Step 0.1.
Now we are done with activating our trigger.
Step 2: Collecting Response
A. Click theNew Stepbutton and search for “Get response details”. Click on the relevant result.
B. Now you will find two slots available. In theForm Id, select the form you created in Step 0.1. ForResponse Id, selectResponse Idfrom dynamic content.
Step 3 : Putting Name in the certificate
A. SelectNew Stepand search for “Populate a Microsoft word template”. Select the preferred result.
B. Now fill up the appeared slots as :
Location > Onedrive for Business Document Library > OneDrive File > Browse “Event Certificate Template.docx"
There will be a 4th slot appearing as “name” (according to the Placeholder we added in Step 0.2) . Add dynamic content asNamefrom the “Get Response Details” bracket.
Step 4: Save the Word File
A. SelectNew Stepand search forCreate file. Select the preferred result of Onedrive for Business.
B. Now populate the fields with relevant values :
Folder Path > Certificates (Created in Step 03) File Name > Select dynamic Content Name and add text as Cert.docx File Content > Microsoft Word Document (dynamic content).
Step 5: Word to PDF Conversion
A. Click onNew Stepand search for“Convert File”and select the preferred result of Onedrive for Business.
B. Select file as Id and leave the target type aspdf
Step 6: Save the PDF file
A. As we did in Step 4, again search forCreate fileand select it.
B. Now fill the slots with the proper directory shared in the steps above and the dynamic content that matches with the questions from theConvert Filebracket.
Step 7: Collect Mail Address for sending the PDF
Exactly similar to step 2, click theNew Stepbutton and search for“Get response details”. Click on the result. You will find two slots available. In theForm Id, select the form you created in Step 0.1 and forResponse Id, selectResponse Idfrom dynamic content.
Step 8: Send an E-Mail with the Certificate
(If you don't want to automate sending certificates, you can skip this step and save the flow)
Well, this step is a bit complicated. So stay with me!
A. Click onNew Stepand selectControl.
B. Now, selectCondition.
C. In the slot forChoose a Value, select “Email Address”dynamic content, then select “is not equal to”and then write “anonymous”in the comparison box.
D. Within “If Yes” block, click on “Add an Action”
E. Search for “Send an Email”and select the V2 as shared in the screenshot.
F. The field for Email will appear. In theTosection, add dynamic content as “Email Address” under the "Get response details 2" bracket.
G. Curate the mail body and then add your email address in theFromsection.
H. And now we need to add the attachments carefully. Do the following tasks :
Attachment Name> We need to add the name of the file as dynamic content. You may need to scroll down a little and then selectNameunderCreate File 2bracket.
Now for theAttachment Content, you will need to scroll down a bit more and from theConvert Filebracket, select “File content”
Step 9: Test and Debug
Now as you are done with creating the flow, save it and manually enter some test results in the forms and see if everything is okay. If there’s any problem, check the run history and debug the issues. You can match your flow with this video clip of mine. Please note that the video clip has got some edits in the titles, otherwise you will see the entire flow as described in this blog.
Leave your task on power automate and make sure you take a good night of sleep after a hectic day of your event.
Note : This flow has been submitted as a template. If it gets published, I will be quick to update this post with the links.
If you want to learn more and create your own flows, Microsoft Learn has got you covered. Check out these resources :
I sincerely appreciate and am thankful to @Lee Stott for providing me the opportunity to advocate for this tool called Power Automate that can significantly make technology accessible to everyone. If you have any idea where you want me to contribute or help, please feel free to reach me on Twitter, we can surely come up with projects that can positively impact people's lives.