Push Notifications for Dynamics 365 Apps and Canvas Apps Power Apps

By | February 17, 2021

Gone are the days when notifications were received through emails, given that it is now a mobile first age, push notifications seem to be quickest mode to transmit information for immediate attention.

Using Power Automate, we already had the Notifications connector, that allowed for sending a mobile notification.

Then, Microsoft had brought about a Power Apps Notifications connector that would allow you to send push notifications. This required some amount of tech/manual effort in terms of determining the APPID of the Canvas APP in which you would like the notification to be displayed.

Microsoft has recently come out with v2 version of the Power Apps Notification connector. The much-improved version has not only simplified the selection of the app but also now you can get a step further and allow the record/view to be displayed when the user clicks on the notification.

Let us have a look at all the notification options available through Power Automate Flow in this article.

In the above example, we are sending a notification to the owner of the record every time a contact is created or updated.

Power Apps Notification V2 – Model Driven App

Choose the mobile app that you would like the notification to open in. You could choose either the Power Apps Mobile App or Field Service Mobile App.

You could have multiple apps and the next step is to choose the App

The users to which the notification needs to be sent. You need to provide the email address of the users or the AAD Object ID. In this case, since I can easily read the email address of the user from the system user table, I provide the primary email id.

Message includes the message that needs to be sent.

If you would like the user to be navigated to the specified app when they click on the notification choose Yes for Open app setting.

Entity/Form and Record ID – refer to the record or the view that you want the user to be automatically navigated to when they click the push notification on their mobile device. You can also choose the Form that you want displayed.

When the user clicks on the notification, they will automatically be navigated to the Customer Service Hub App and the contact form for Greg will be displayed to the user.

Power Apps Notification V2 – Canvas APP

In this example, we will have the push notification open up the canvas app with the details of the specified record for which the notification was generated.

Since Canvas Apps are also viewed through the Power Apps mobile app, we continue to choose the Power Apps mobile app.

In the App, select the Canvas App that we would like to point the notification to.

Email address of the owner of the record is provided. Alternatively, provide the AAD ID of the user.

Along with the message, this time we pass the parameter to the Canvas App. The parameter should be provided in JSON format. We pass the contact id.

The Canvas app has been designed to look for any parameters being passed to the app in App OnStart event.

Notify(“AppStart”);

Set(

SelContact,

Param(“id”)

);

If (

!IsBlank(SelContact),

Set(

DispContact,

LookUp(

Contacts,

Contact = GUID(SelContact)

)

);

Navigate(

DetailScreen1,

ScreenTransition.Fade

),

Navigate(

BrowseScreen1,

ScreenTransition.None

)

)

Based on value received in the parameter, it either navigates to the browse screen if no parameter received or directly to the details screen if the contactId was passed.

This flow will send me a similar notification.

And this time when I click on the notification on the mobile device, it will take me to this record on the Canvas App.

Notification Connector

The Notifications connector that has been around since the very beginning can be used to provide notification. This requires the Power Automate mobile app to be installed on the device to receive the notifications.

This will allow you to send simple notifications with the ability to provide a URL to navigate to. This is a generic connector that could be used to provide notifications and the ability to navigate to a URL outside of the Power Apps app.

You will receive the following notification on your mobile device:

A few points to note when working with these connectors:

  1. To receive the notification, you should have the Power Apps, Field Service App and the Flow App installed depending on the app you have chosen to send the notification through. If you have used the notification connector but have not logged-in to the Power Automate mobile app on your device, you will not receive the notification.
  2. If you find yourself not receiving the push notification even though you have the app installed and updated to the most recent one available on the app store, check if you have notifications enabled for the app in the setting area. I had mine disabled and thought this feature doesn’t work until I found out that notification for the app were disabled.

For an iPhone that would be Settings –> Notifications –> Power Apps.

Go ahead choose one of these options for sending out push notifications to your users.

4 thoughts on “Push Notifications for Dynamics 365 Apps and Canvas Apps Power Apps

  1. Bify Abraham

    Good post..quick question,are we able to push the notification to dynamics 365 mobile app?

    Reply
    1. Inogic

      Hi Bify,

      Currently, there are below two options (Field Service and Power Apps) are available, as shown in the screenshot and it does not display the notification for Dynamics 365 mobile app.

      https://www.inogic.com/blog/wp-content/uploads/2021/02/Untitled.png

      Hope this helps,
      Thanks!

      Reply
  2. Farhan

    Hello, I have scenario where I need to send the push notification to an external android apps. Is this possible either ooh or custom ?? please help..

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *