Building an Automated Voucher Disbursement System with Microsoft Power Automate

This post has been republished via RSS; it originally appeared at: New blog articles in Microsoft Tech Community.

WhatsApp Image 2021-08-27 at 7.26.02 PM.jpeg


Hi! I'm Japhlet Nwamu, a Gold Microsoft Learn Student Ambassador in Nigeria. I love talking about Power Platform and Artificial Intelligence. My focus is on Power Automate and Power Virtual Agents - two amazing tools that enable you explore and integrate the power of AI in your solutions.

Welcome to This Series! :cool::cool: In this series, I'll show you some of the amazing solutions I have built with Power Automate and Power Virtual Agents and guide you through building yours. It's going to be fun! Let's Begin!

 

Back in February, we (Student Ambassadors in Nigeria) held Microsoft Mixed Reality Bootcamp 2021 - a 4weeks boot camp where participants got to learn and build Mixed Reality solutions. To support active participants throughout the boot camp, we sent out airtime vouchers. I was tasked with the responsibility of making this happen. We collaborated with chimoney.io to make this happen. With Chimoney, participants could redeem airtime via a unique link. Within a few days, we got the unique links we requested.

Now, we had to send out one unique redeem link to each participant. Sending out an email to each participant with their unique redeem link seemed like the best option, but it would be tedious, prone to error, and time-consuming, so I had to figure out an easy way to make it happen. Guess what? I decide to automate everything with Power Automate and it worked! :cool::cool:

 

Power Automate is one of the tools that make up Microsoft’s low-code no-code development platform Power Platform. Formerly known as Microsoft Flow, Power Automate makes it possible for you to automate business processes. You can read more about it here. In this post, I would show you how I built the automated airtime disbursement system. Ready?

 

  • First, head over to powerautomate.microsoft.com and sign in with your Microsoft account. If you have a Microsoft account but do not have a Microsoft 365 subscription, you can create a developer account here. This account would give you access to renewable 90-days Microsoft 365 E5 developer subscription. Once you have signed, you would be taken to the home page which should look like the image below.

japhletnwamu_0-1632319359890.png

 

 

  • Next, click on ‘+ Create’ on the left to start building the system. On the new screen, you would notice different type of flows.
    • An “Automated cloud flow” is triggered by a specific action or event. For example, when a new email is received, a new tweet is posted on Twitter, or when some data is changed on a SharePoint site.
    • An “Instant cloud flow” runs when a user presses a button. For example, when a button on Power Apps is clicked or when a physical button is flicked.
    • A “Scheduled flow” runs whenever and however you want it to run. For example, you set your flow to upload data on SharePoint by 9:00 pm or send newsletters to everyone in your organization on the first workday of each month by 11:00 am.
    • “Desktop flows” enables you automate tasks on the web or your desktop. You can make use of Power Automate Desktop to carry out this automation.
    • With “Business process flow” you ensure that everyone in your organization carries out required tasks while following the same steps. They can see which stages of a task they have completed, and which is left pending.
  • For this system, we would be creating an ‘Instant cloud flow’. So click on ‘Instant cloud flow’, and give your flow a name. I would be naming mine ‘Automated Voucher System’.
  • Under the section ‘Choose how to trigger this flow’, select ‘Manually trigger a flow'.

japhletnwamu_1-1632319359916.png

 

  • Clicking ‘Create’ creates the flow and takes you to a new page where you can add more steps to your flow.

japhletnwamu_2-1632319359931.png

 

  • All unique redeem links we got from Chimoney were added to an excel sheet containing the email addresses of the participants. That excel sheet was then uploaded on OneDrive. The excel sheet is shown below (Note: To ensure privacy, I had to protect the redeem links and email addresses of each participant). You can create an excel document that looks like this just to experiment.

japhletnwamu_3-1632319359948.png

 

  • Next, head back to Power Automate and click on ‘+ New step’. This would add a new step to the already existing flow.
  • Search for “List rows present in a table (Excel Online (OneDrive))” and select. This function tells the flow to get details from the excel sheet stored online on OneDrive. When clicked, a new step is added to the flow. The new step prompts you to add the specific file you would be working with and the specific table you would be using.

japhletnwamu_4-1632319359961.png

 

  • Next, we would need to add an action. Click on ‘+ New step’ again to add another step, search for ‘Apply to each’ and select.
  • You would be asked to select an output from the excel sheet used in the previous step. For the system we are building, we would select the column containing the email addresses of the recipients. On my excel sheet, it is named “Participants Email Address”. When selected, you should see something like this.

japhletnwamu_5-1632319359974.png

 

  • Next, click on ‘Add an action’, then search for ‘Send an email (V2) (Office365 Outlook)’ and select. This would enable us send each participant an email with their unique redeem link.

japhletnwamu_6-1632319359984.png

 

  • Next, fill the section with red asterisks.
    • For ‘To’, select ‘Add dynamic content’ and select the column containing the email addresses of the recipients, for me, it’s ‘Participants Email Address’.
    • In the ‘Subject’ section, include the title of the email. Mine was "Hello! Here's your voucher."
    • In the ‘Body’ section add the content of the email you would like each participant to receive.
  • For each participant to receive a unique link or code, apply the content of the column containing the vouchers in the mail. Click on ‘Add dynamic content’ and add the column containing the links or codes. In my excel sheet, that column is named ‘Redeem Link’.

japhletnwamu_7-1632319359999.png

 

  • Next, save your flow. If saved successfully, you should see a green message at the top with the message “Your flow is ready to go. We recommend you test it.”
  • Now it’s time to see the result of our flow! Click on ‘Test’ and run the flow manually. Before running the flow, it would verify if the account you are creating the flow with is the same as your OneDrive and Office 365 Outlook accounts.

japhletnwamu_8-1632319360019.png

 

  • Once confirmed, you would notice green checks close to each app, like the ones in the image below.

japhletnwamu_9-1632319360037.png

 

  • Now you are ready to go. Click on ‘Continue’ and then ‘Run the Flow’ to carry out all tasks in the flow. And holla! Your flow should run successfully if you followed all the steps as outlined above. Each participant would receive an email address with a unique link or code.

japhletnwamu_10-1632319360049.png

 

This flow saved me tons of hours of work and helped reduce errors if I tried to send out the links manually.

Interested in learning more? Microsoft Learn has a number of dedicated Microsoft Learning paths on Power Automate 

Automate a business process using Power Automate

Create a business process flow in Power Automate

Get started with Power Automate Desktop

Get started with Power Automate buttons

Automate processes with Robotic Process Automation and Power Automate Desktop

Work with different technologies in Power Automate Desktop

Work with Power Automate Desktop

Implement advanced logic in Power Automate Desktop

Build custom connectors for Power Automate

Build expertise with Power Automate Desktop

Integrate SharePoint and Power Automate

Extending Microsoft Power Platform user experience Model Driven apps

Integrate Power Automate flows and Dataverse


You can and should try it out next time you need to perform a task like this. 
Just incase you’re having some errors with your flow, you can reach out to me on LinkedIn or Twitter.

 

What solution would you like me to work on next with Power Automate? Let me know in the comment section and I’ll write a blog on it too.



REMEMBER: these articles are REPUBLISHED. Your best bet to get a reply is to follow the link at the top of the post to the ORIGINAL post! BUT you're more than welcome to start discussions here:

This site uses Akismet to reduce spam. Learn how your comment data is processed.