Add push notifications to your app using Power Apps and Flows
Using Power Apps – step by step
Step 1: Create a simple blank Power App and insert an action button.
Step 2: Save the Power Apps and copy the Application ID from Application Details screen.
Step 3: Add a Data Source "Power Apps Notification" connector as below.
Step 2: Save the Power Apps and copy the Application ID from Application Details screen.
Note that this is Preview connector hence its your decision whether to use it on PROD or not.
Step 5: Once the connector is added successfully, add the following code in "OnSelect" for action button. See this link for more information on the parameters.
PowerAppsNotification.SendPushNotification(
{
message: "You have new notification",
recipients:[User().Email],
openApp: true,
params: Table(
{
key: "Key1",
value: "Val1"
}
)
}
)
{
message: "You have new notification",
recipients:[User().Email],
openApp: true,
params: Table(
{
key: "Key1",
value: "Val1"
}
)
}
)
You can try multiple combination for the parameters. The recipients is the table of comma separated email ids or Object IDs for users or security groups in Azure Active Directory
Step 6: Save and Publish the Application. Run the Application and Click the action button.
Using Flow – step by step
Step 2: Add new Step "Send push notification"
Step 3: Configure the Connection for the Step as below:
Step 4: Configure the Step as below.
Step 5: Save and Test the Flow.
Step 6: You will see the below notification on device as below.
There are some limitation for this new connector.
- No push notifications yet for users who only run apps in the web browser.
- The notifications shows the Power Apps generic icon instead of showing the specific icon of the app.
No comments:
Post a Comment