Hi everyone,
I need some guidance, is it possible to trigger a push notification on a specific day?
I guess that is only possible with power automate right?
Can someone help me out. The recipient should be the app users which are also part in a Sharepoint list.
Best regards
Nam
Hi @NamM_,
Do you want to send an email notification the recipients existing the a SP list?
Actually, it could be achieved if this is not a recurrence action. Just compare this specific day with Today().
Add a Button and set its OnSelect as below:
If(Text(Today(),"dd/mm/yyyy")="27/09/2022",
Office365Outlook.SendEmail(
Concat(BU.ReservedVy,Email,";"),//BU is my list namd and ReservedVy is person column
"Test",
"Hola Friday!"
)
)
Hi @v-qiaqi-msft ,
no the Push Notification has to be over the app itself. No emails. 🙂
And it is a recurring action, the users have to be notified 3 times a year.
Best regards,
Nam
This should probably be in the Power Automate forums, but since the end result is a push notification to a Power App, here is a system that works well for me:
One method is to set a recurring flow that looks to a SharePoint list for a starting date and if that date is less than Now() process the list item into a push notification. The flow below looks to a notification list to process the push message text and recipients, then looks to another user list to match the notification recipients' project, role, and discipline to construct an array of users.
To get the initial notification, I use the filter query to determine if the time is ready to send the push. My query is a bit more complex as there is also an end date and other flags that need to be checked:
notifScheduledBOOL ne false and notifCompleteBOOL eq false and notifSendDateTime lt '@{convertFromUtc(utcNow(),'Central Standard Time')}' and notifExpirationDateTime gt '@{convertFromUtc(utcNow(),'Central Standard Time')}'
The above just gets the notification to push out, as well as the recipients' project, role, and discipline. These values are in a user list, so we need to query that list to get our emails and append to an array. Unlike sending an email to multiple recipients, where you construct a semicolon separated string, the Push Notification action wants an array. To create the array, loop through your emails and append to array. If you need to make a dynamic filter query, here is an example of that. Otherwise, you may be safe to hard code or skip the filter query:
To build the array of emails, apply to each user found - append to array var. Then you are ready to send the push notification:
Thanks a lot @AaronKnox , to be frank your way seems a bit overkill for my use-case and I couldn't get through all of it haha . But one question. The "Recipient" for "Send push notifications v2" has to be what? An Email? The Flow was sucessful but i didn't receive a notification.
Yep there's a lot going on but the idea would be the same: get the email addresses, append to array, send the push. The scheduling piece from SharePoint may be helpful depending on your needs.
Send Push Notification v2.Recipients wants an array of email addresses. However, you should be able to test with just one email hard coded:
User | Count |
---|---|
258 | |
110 | |
90 | |
52 | |
44 |