web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / How to send email to m...
Power Automate
Answered

How to send email to multiple users with Http request to Sharepoint?

(0) ShareShare
ReportReport
Posted on by 1,042

Hi,

What i would like is that if a new item is created in a sharepoint list an email must be sent to certain people.

I have put the email addresses in a variable of the type Array.  And i have put the variable into the Apply to Each.

But i do not know what to do next so i can declare it in the body of the email.

 

PeKi72_0-1647880291320.png

 

I do not want to use other Send Email connectors and i am not authorized to get the sharepoint members. i

just want to get the strings out of the array. 

Gr. P

 

 

Categories:
I have the same question (0)
  • Expiscornovus Profile Picture
    33,195 Most Valuable Professional on at

    Hi @PeKi72,

     

    Can you try a body like below:

    {
    "properties":
    {"__metadata": {"type":"SP.Utilities.EmailProperties"},
    "From":"",
    "To": {"results":["jane@contoso.onmicrosoft.com","john@contoso.onmicrosoft.com"]},
    "CC": {"results":["tim@contoso.onmicrosoft.com"]},
    "Body":"Test Body",
    "Subject":"Hello World"
    }
    }

     

    And can you also use these Headers:

    {
     "Accept": "application/json;odata=verbose",
     "Content-Type": "application/json;odata=verbose"
    }

     

  • Verified answer
    Expiscornovus Profile Picture
    33,195 Most Valuable Professional on at

    Hi @PeKi72,

     

    Sorry, I missed the part about the Array variable requirement 😅

     

    Below is an example which includes that array variable as well.

     

     

    {
    "properties":
    {"__metadata": {"type":"SP.Utilities.EmailProperties"},
    "From":"",
    "To": {"results": @{variables('ToAddresses')}},
    "CC": {"results": @{variables('CCAddresses')}},
    "Body":"Test Body",
    "Subject":"Hello World"
    }
    }

     

     

    sendemailwitharrays.png

  • CU16021406-1 Profile Picture
    1,042 on at

    PeKi72_1-1647881646919.png

     

    Does not work 

  • Expiscornovus Profile Picture
    33,195 Most Valuable Professional on at

    Hi @PeKi72,

     

    Can you change the headers and make sure that both Accept & Content-Type use odata=verbose?

     

    Can you also include the metadata in the body and try again?

  • CU16021406-1 Profile Picture
    1,042 on at

    I can not choose the variable ToAddresses to put it in the body

  • CU16021406-1 Profile Picture
    1,042 on at

    The variable 'ToAddresses' of type 'Array' cannot be initialized or updated with value of type 'String'. The variable 'ToAddresses' only supports values of types 'Array'.

     

  • CU16021406-1 Profile Picture
    1,042 on at

    PeKi72_0-1647883253993.png

     

  • Expiscornovus Profile Picture
    33,195 Most Valuable Professional on at

    Hi @PeKi72,

     

    If you cannot select the variable from the dynamic content/value list you could alternatively try to use an expression with a variables function instead?

     

    Below is a short gif to demonstrate how you could achieve this.

     

    Addasexpression.gif

  • CU16021406-1 Profile Picture
    1,042 on at

    PeKi72_0-1647884383920.pngPeKi72_1-1647884399979.png

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 503 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 321 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard