Create In-App Notifications in D365 Through Power Automate Flow

Wouldn't it be nice if next time you logged into Dynamics you were immediately notified of all the important events that happened while you were gone? Leads assigned to you, opportunities your team closed, cases opened? This is all now possible with 'in-app notifications' for Dynamics 365.

Enable the feature within your model-driven apps and users will see notifications when they log in, navigate pages, or are on a page for more than a minute.

Enable the feature

  1. Navigate to the maker admin(https://make.powerapps.com/)open the model-driven app you would like to enable this feature in and select the edit.
  2. Select settings, Navigate to Features, and enable 'In-app notifications'.

 Navigate to Features

After refreshing your browser you should see the notification bell in your header.

Notification bell

In this example, I am going to create a notification when a new phone call record is created for the case, and I am going to show the notification to the case owner. Obviously, you can use any trigger in Power Automate flow to create a notification.

We are going to create an automated cloud flow when creating the new flow. Click ‘+New Flow’ Make sure you name your flow, for my example I called the flow ‘In-App Notification on new call’.

For the trigger, I’m going to use the ‘When a row is added, modified or deleted’. The change type is ‘added’ and the table name is ‘phone calls’. My scope is organization (I want this to run for everyone in the organization) and I am going to run this flow as the modifying user. That’s all you have to enter in the trigger step!

App notification on new call

In the next step, I am going to get a case record.

Case record

In the next step, we’re going to create the actual notification in data verse. Click on ‘+New Step’ and select ‘Add a new row’. For ‘Table name‘ select the ‘Notifications’ table.

The rest of this step is really about who the notification goes to and what we want to show in the notification.

In the ‘Title‘ field I am going to enter “New phone call has been added for your case!!!”. The title field will show in bold in the notification.

In the ‘Body‘ field I am going to enter “A new phone call has been added for your Case Case Number:” followed by the dynamic content in the case number field of the case that triggered the flow. The data in the ‘Body‘ field will show below the ‘Title‘ field in the notification.

The ‘Data‘ field in the step is a JSON structure to provide more advanced control over the notification. links, and/or custom icons. However, those make for better notifications.

In the ‘Expiry (seconds)‘ field, I will enter the number of seconds after which the notification will be deleted. I am going to set this for 20 minutes, which equals 1200 seconds.

The ‘Icon Type‘ field will allow you to choose an icon to be shown in the notification. There are a few icons you can use out of the box, and it looks like can use a custom icon as well. I haven’t figured out how to do that yet, so I am going to pick the out-of-the-box “Info” icon.

The ‘Owner(Owners)‘ field represents who will see the notification. Note that I entered /system users first and the dynamic content (Owner(value)) in parentheses.

Lastly, you can set a priority and set the toasted type to ‘Timed’. That’s all for the flow configuration! Make sure you save your flow and test it to make sure everything works as expected!

Actual notification in data verse

In Content, paste the following JSON. Replace the <entityLogicalName> with the entity name and <recordId> with the GUID of the specific record for which the link needs to be generated.

{
    "actions": [
        {
            "title": "Open Phone Call",
            "data": {
                "url": "?pagetype=entityrecord&etn=<entityligicalname>&id=<=recordId>",
                "navigationTarget": "newWindow"
            }
        }
    ]
}

I am going to add a phone call for a case now.

Add a phone call

Quick create call

After the phone call is created, a notification is received along with an action. Clicking on 'Open Phone Call' will open the popup case record.

Popup case record

After clicking the 'Open Phone call” action, the case record will be displayed in a new window.

Open phone call

Refer to the link for In-App Notification using Javascript: Implement In-App Notifications with JavaScript in Dynamics 365


Similar Articles