Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

How to add array of email addresses to Send an HTTP request action?

(0) ShareShare
ReportReport
Posted on by 271

I'm trying to build a flow that uses the Send an HTTP request action to create a draft email, and this video does a great job showing how to do it. However, the example only shows how to hard code a single email address into the JSON. I want to dynamically add an array of email addresses, and I can't figure out how to make it work. I tried initializing a variable, then appending it with a loop based on a conditional field that pulls addresses from a SharePoint list. I then sent the variable to a Compose action, and inserted the Compose output into the JSON. I also tried stripping the brackets, changing the double-quotes (around email address) to single quotes... but nothing worked.

 

I'm typically getting the error message "were unable to deserialize" or "Unable to read JSON request payload. Please ensure Content-Type header is set and payload is of valid JSON format" - depending on what tweaks I make.

 

Any ideas?

 

MarcusD1_0-1683004304006.png

MarcusD1_1-1683004346687.png

MarcusD1_2-1683004365852.png

MarcusD1_3-1683004390884.png

 

 

  • Verified answer
    MarcusD1 Profile Picture
    271 on at
    Re: How to add array of email addresses to Send an HTTP request action?

    Expiscornovus - thanks for that. Here's my updated flow, and it works great.

     

    MarcusD1_0-1683043444045.png

    MarcusD1_1-1683046543810.png

     

  • Verified answer
    Expiscornovus Profile Picture
    31,844 Most Valuable Professional on at
    Re: How to add array of email addresses to Send an HTTP request action?

    Hi @MarcusD1,

     

    It looks like the outputs format of your array would be something like 

     

    "toRecipients": [
     {
     "emailAddress": {
     "address": ["Pam@contoso.onmicrosoft.com","Michael@contoso.onmicrosoft.com"]
     }
    }
    ]
    

     

     

    I believe format for the toRecipients array field needs to be formatted like below.

     

    {
     "subject": "Testing Email",
     "body": {
     "contentType": "html",
     "content": "Test"
     },
     "toRecipients": [
     {
     "emailAddress": {
     "name": "Pam Beesly",
     "address": "Pam@contoso.onmicrosoft.com"
     }
     },
     {
     "emailAddress": {
     "name": "Michael Scott",
     "address": "Michael@contoso.onmicrosoft.com"
     }
     }
     ]
    }

     

     

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

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 566 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 516 Super User 2025 Season 1

#3
stampcoin Profile Picture

stampcoin 492