cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Owizardo
Level: Powered On

Push notification to predefined list

Hello,

 

Would anyone know how to send a push notification to a predefined email list? For example I have a SharePoint list with 2 columns, a user name and an email column.

 

Doing something like this just dosent work: 

ClearCollect(Push_List, SharepointPoint_List_With_emails);
PowerAppsNotification.SendPushNotification(
{
  recipients: SharepointPoint_List_With_emails.Email ,
  message:"Test",
  openApp:true
})

Would anyone know how to accomplish this?

2 ACCEPTED SOLUTIONS

Accepted Solutions
WillPage
Level 8

Re: Push notification to predefined list

Use the Concat() function to create a string of semi-colon separated email addresses, then use that as the recipient email address in a flow.

 

So, using your example you might do something like this. Create a Flow with PowerApps as the trigger, then the next step is Send an Email (let's call the Flow called SendEmail). In the Send and Email action, set the dynamic content of the To address to be "Ask in PowerApps" then add it to PowerApps and run it with:

SendEmail.Run(Concat(SharepointPoint_List_With_Emails, Email & Char(59)))

The fact the string of email addresses is semi-colon separated *should* be acceptable to the connector, although I haven't tested it. You might need a space character after the Char(59), e.g 

Concat(SharepointPoint_List_With_Emails, Email & "; ")

You can use the Char() function or a double-quote encapsulated string in the Concat() function, it doesn't matter in most cases.

View solution in original post

Community Support Team
Community Support Team

Re: Push notification to predefined list

Hi @Owizardo 

Do you want to send Push notification to the Email addresses recorded in a SharePoint list?

The correct syntax is:

        PowerAppsNotification.SendPushNotification({recipients:[“ID1”,”ID2”,…],message: "…"})

or    PowerAppsNotification.SendPushNotification({recipients:[“email1”,”email2”,…],message: "…"})

The data type used after recipients should be string array.

You could try this formula:

PowerAppsNotification.SendPushNotification(
{recipients:ForAll(SharepointPoint_List_With_emails,Email),
message:"Test",openApp:true})

The function of ForAll can convert columns to values.

Here's doc for your reference:

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-forall

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/add-notifications#send-a-notification-f...

 

 

 

 

Best regards,

Community Support Team _ Phoebe Liu

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
WillPage
Level 8

Re: Push notification to predefined list

Use the Concat() function to create a string of semi-colon separated email addresses, then use that as the recipient email address in a flow.

 

So, using your example you might do something like this. Create a Flow with PowerApps as the trigger, then the next step is Send an Email (let's call the Flow called SendEmail). In the Send and Email action, set the dynamic content of the To address to be "Ask in PowerApps" then add it to PowerApps and run it with:

SendEmail.Run(Concat(SharepointPoint_List_With_Emails, Email & Char(59)))

The fact the string of email addresses is semi-colon separated *should* be acceptable to the connector, although I haven't tested it. You might need a space character after the Char(59), e.g 

Concat(SharepointPoint_List_With_Emails, Email & "; ")

You can use the Char() function or a double-quote encapsulated string in the Concat() function, it doesn't matter in most cases.

View solution in original post

Community Support Team
Community Support Team

Re: Push notification to predefined list

Hi @Owizardo 

Do you want to send Push notification to the Email addresses recorded in a SharePoint list?

The correct syntax is:

        PowerAppsNotification.SendPushNotification({recipients:[“ID1”,”ID2”,…],message: "…"})

or    PowerAppsNotification.SendPushNotification({recipients:[“email1”,”email2”,…],message: "…"})

The data type used after recipients should be string array.

You could try this formula:

PowerAppsNotification.SendPushNotification(
{recipients:ForAll(SharepointPoint_List_With_emails,Email),
message:"Test",openApp:true})

The function of ForAll can convert columns to values.

Here's doc for your reference:

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-forall

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/add-notifications#send-a-notification-f...

 

 

 

 

Best regards,

Community Support Team _ Phoebe Liu

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 313 members 5,410 guests
Please welcome our newest community members: