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 add array of em...
Power Automate
Unanswered

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

 

 

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

    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"
     }
     }
     ]
    }

     

     

  • Verified answer
    MarcusD1 Profile Picture
    271 on at

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

     

    MarcusD1_0-1683043444045.png

    MarcusD1_1-1683046543810.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 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard