Send a Mobile notification with Power Automate

Introduction

With the Powell Power Automate connector for the mobile application you can now push the notification in your mobile application on your automation. 

Let's see how you can do that following these steps.

Step by step

3 steps to be able to send notifications in a business process with Power Automate. Manage your rule and validation trigger to make a notification on the mobile app :

Step 1 : Create the Azure Application

Register the app

Go to Azure : https://portal.azure.com/

Click on « + New registration » to create a new application

Image1.png

Fill the needed information :

Image3.png

Click on Register to create the app.

Expose the API

Go to the expose an API and add a scope.

Image4.png

Click on « Save and continue » button.

After saving a new popin opens, fill in the following information :

  • Scope name : User.Read
  • Who can connect : « Admin and user »
  • Admin consent display name : User.Read
  • Admin consent description : User.Read

Image5.png

Define API Permission

Go to manage API permissions, and clicks on « + Add a permission »

Image6.png

In « APIs my organisation uses » search for your application name and click on it.

Image7.png

On the new panel :

  • Select « Delegated permissions »
  • Check the permission « User.Read »
  • Click on « Add permissions »

Image8.png

Grant admin consent permissions by clicking on the following link :

Image9.png

Consent the app by clicking on Yes on the alert message that appeared on the top:

Image10.png

 

Get the needed information

  • Application (client ID) : On the Overview page, save the Application (client) Id

Image11.png

  • Client secret : On the Certificates and secrets page, click "New client secret"
    • Define a name and an expiration period

Image13.png

    • Click on Add to create the client secret
    • On the client secret list, save the Value of the client secret

Image14.png

Step 2 : Import the Powell connector mobile in Power Automate

Go to Power automate : https://emea.flow.microsoft.com/

Click on « Custom connectors » in the Data node on the left

Then on the top right, click on « +New custom connector » and « Import an OpenAPI file »

Image15.png

From the popin that appears, name the connector then import the following OpenAPI file (in attachment)

mceclip0.png

On the General tab :

  • Select an icon
  • Define a background color
  • Go on Security tab

mceclip1.png

On the security tab :

  • Set the Client id with your Application (client) ID saved before
  • Set the Client secret with the Value of the client secret saved before (be careful you should use the value and not the Secret ID or your Client secret)
  • Set the resource URL with the following value : api://clientID
    • Replace the clientID by your Application (client) ID saved before
  • Let all the other information with their default values

mceclip2.png

And click on « Create connector »

mceclip3.png

Close the connector

mceclip4.png

It should now appears on your custom connectors list

mceclip6.png

Step 3 : Generate the Powell manager bearer

At the application level, an entry is used to generate the authentication tokens needed by the connector.

This means that only data generated in the current mobile app can be used by the connector.

To generate a new token click on the button "Create a new bearer" and choose a title and an expiration period (one year, two year, never).

mceclip10.png

The Bearer generated is the one to keep to use it in the property of the connector (see Step 4).

Step 4 : Use the connector

Create a new flow or use an existing one.

In Action on Flow, you will find the actions of the connector in the custom part of the action

mceclip7.png

On the available action, select « Push Notification for Mobile App »

mceclip8.png

Fill at least mandatories information:

mceclip11.png

Here is the description of all the parameters

Bearer : Connector bearer. Get it from your Powell Manager Mobile App

Title : Title of the notification.

Description : Description of the notification.

Url : Notification page URL. The one where the user will be redirected by clicking on the notification

ImageBase64 : image of the notification

Tags : Filter on tags. Only user who subscribe to the selected tag will received the notification.

Users : Users who will receive the notification.

All : Choose or not all users to received the notification (frontline). If you select yes, all registered users will received the notification and the parameters to target by Tags or by users (the both above) are not used.

Language : Filter on Language.

TagsAndRule : If true send notification with the 'AND' rule.

IsFrontline : Sent notification to frontline.

UniqueId : Id of the frontline page. The one where frontilne users will be redirected by clicking on the notification

Was this article helpful?
0 out of 0 found this helpful