Let’s say most of your users are using custom Canvas Power Apps to follow their business tasks and rely on Canvas Apps for their actions inside Dynamics 365.
There could be scenarios where you want to notify them conditionally of important items that need their attention.
Let’s say you have a few users whom you want to tell them that an Opportunity was Won. It could be a team or a single User.
Here’s what my scenario is – A PowerApp Notification is sent to designated User(s) using Flow. When an Opportunity is Won
A Power App Notification is received
And when user clicks he Notification, Canvas Power will open and show that record.
But of course, your implementation/applications for this can be limitless!! This is just my example!
Here’s what the Flow looks like –
- I’m triggering the Flow on Update of the Opportunity. You can use Trigger Conditions to make sure your Flow is triggered only on the update of the Opportunity Win
- [Optional, according to my scenario] I want to send this to the Owner of the Opportutnity for now. Of course, it makes sense to send it to others. But let’s keep it simple for now. 🙂
So, I’m capturing Email address here to be used further down
- [Optional, according to my scenario] Further, I’m only checking if the Status was Won. Status Reason = 3 meaning Opportunity was Won
- Next, once your condition is satisfied, you can search for this Connector and Action in your Steps in the Flow.
- For now, you only have this one Action which you’ll need.
- This is how it looks –
Recipient Item – 1 holds the Email address of the User to whom the notification will be sent to. More can be added by using the + Add new item button.
Message holds what should be displayed when the notification is received to the end user.
Open App – Yes/No. Boolean to set if the Power App is supposed to be Opened upon selecting the Notification or not.
Parameters – You can pass parameters to the Canvas App and use it inside Canvas App. Example: To open the record directly if the App is designed in that way.
- First thing you need to do is to create a specific connection for this so that you can use it to open the specific App in Power App.
- You can give your Connection a name and then the ID of the App must be entered. Once done, click create.
- In case you’re wondering where you’ll get the App ID. You can find the Canvas App ID in the Details section of your Canvas Power App, you’ll only need that to be copied
- And you can enter the below options –
In my example, I’m sending an alert to the email I captured in #2 above.. In your case, you can set this dynamically and add more as well by clicking on “+ Add new item“
In Message, I’ll enter what the notification should read.
Open App is set to Yes. Means if I click the notification, it’ll open the Canvas Power App whose ID I used above to create the Connection.
Parameters, this is optional. If you want to open the specific record, you can pass the GUID like this and in the next section, we’ll see how we can open the record using that.
Canvas Power App
In the previous step, remember we sent the Guid as parameter to the Canvas Power App, here’s what you can do to read the record and use it to open the specific record.
Here’s how you can read Parameters passed to the Canvas Power App.
I’m using it to Lookup the Opportunity that I passed from the Notification to the Canvas Power App.
In my application, I’m using Lookup to fetch the record and set it to the Item property of the Edit Form control
Some references to use if you’re looking to Capture Parameters and Lookup/Filter data based on your GUID is that’s your implementation.
- Pass Parameters to Canvas Power App – https://sachinbansal.blog/2018/06/17/powerapps-canvas-app-how-to-pass-parameter-in-app-url-display-data-based-on-parameter-passed/
- Lookup/Filter Records – http://linnzawwin.blogspot.com/2019/12/power-apps-using-common-data-services.html
Let’s say an Opportunity was Won in Dynamics 365.
And the user will receive a notification like this.
Clicking on which, they’ll be taken to the Canvas Power App record which I set in my Canvas Power App.
Hope this was helpful!
Here are some more Canvas Power App posts you might want to look at –
- Launch URL on a Data Table Text column selection in a Canvas PowerApp | SharePoint Lists
- Aggregate functions in a Canvas Power App | Using on SharePoint Lists
- Count of total CDS records returned in a Canvas Power App connection [Quick Tip]
- Dependent OptionSets in a Canvas Power App for 1:N related CDS entities | Power Platform
- Restore older version of a Canvas Power App | Power Platform
- Logged In User details in a Canvas Power App
- Implement character length validation in a Canvas Power App | Power Platform
- Implementing Exit app, Logout and Confirm Exit features in a Canvas Power App
- Number Formatting in a Flow | Power Automate
- Generate Dynamics 365 record link in a Flow using CDS connector | Power Automate
- Accept HTTP Requests in a Flow and send Response back | Power Automate
- Pause a Flow using Delay and Delay Until | Power Automate
2 thoughts on “Send a Power App Push Notification using Flow to open a record in Canvas App | Power Automate”
Reblogged this on Nishant Rana's Weblog.
[…] D365 Demystified […]