In this blog, we will understand how we can get notifications related to a model-driven app on mobile using Power Automate (MS Flow).
Use Case: In my example, I'm causation a notification to the sales team once an opportunity is won in D365 CE(CRM).
Steps to be followed:
First, you must add a connection trigger "Microsoft Dataverse - When a row is added, modified, or deleted" on which you will trigger this.
- Search for the “When a row is added, modified, or deleted” trigger and click on that and click on Create button.
- Entering the values
- Change type: Modified
- Table name: Opportunities
- Scope: Organization
- Select columns: statuscode
- Filter rows: statuscode eq 3
- Search for the “Get a row by ID” Action and click on that.
- Entering the values
- Table name: Users
- Row ID: Owner (Value)
- Select Columns: emailaddress
- After that Search for the “Power Apps Notification v2” connector and click on that.
- Choose the “Send push notification V2” action and fill in all values.
- Entering the values
- Mobile app: Choose the Power Apps.
- Your app: Choose the app for which you are creating a notification.
In my case, I am choosing the Sales trial app. You can choose any other app based on your requirement.
- Recipient Items: Set of users to whom you wish to send notifications.
You can click "+Add New Item" to whomever you want to send the notification to. You can add as many emails as you want.
- Message: you enter your information message.
- Open app: If you choose yes then it will open the app when the notification is clicked, otherwise it will not do anything.
- Entity: Choose the entity for which the notification will open up.
- Form or view: Choose the form or view which should open up when the notification is clicked.
- Record ID: If we choose the form in the Form or View parameter, then we must enter the Record ID to identify which record should open when the notification is clicked.
After adding all the values, it will look something like this:
Run the flow, go to the opportunity, and click on the close as won button.