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

Microsoft Flow: How to Concatenate Data from JSON Object

I have a REST Web Services Call that is returning data in the following format:

 

 

{
    "Id": "0497cee4-45dc-47d8-97a8-b45ad8018775",
    "Status": "OK",
    "ProviderName": "MyApp",
    "DateTimeUTC": "/Date(1508348383277)/",
    "Contacts": [
        {
            "ContactID": "1efa0ea1-de5c-4172-869c-816e27c3c825",
            "ContactStatus": "ACTIVE",
            "Name": "Company",
            "FirstName": "Joe",
            "LastName": "Bob",
            "EmailAddress": "mainguy@here.com",
            "BankAccountDetails": "",

            "ContactPersons": [
                {
                    "FirstName": "Operations",
                    "LastName": "",
                    "EmailAddress": "there@here.com",
                    "IncludeInEmails": true
                },
                {
                    "FirstName": "Another",
                    "LastName": "Contact Email",
                    "EmailAddress": "here@there.com",
                    "IncludeInEmails": true
                }
            ],
            "HasAttachments": false,
        }
    ]
}

 

Within Microsoft Flow I would like to grab the main contact email (Contacts.EmailAddress) as well as all of the secondary Contacts Emails (Contacts.ContactPersons[x].EmailAddress); and use that for the too field of down-flow email.

ContactPersons will not always be defined in every case, but Contacts.EmailAddress should be.

What is the best way to do this with a flow? Is there a way to concatenate data over a loop or something? I can't seem to find a way to do it.

 

Repost of:
https://stackoverflow.com/questions/46816913/microsoft-flow-how-to-concatenate-data-from-json-object

 

Since apparently this is the "official" place for MS Flow related questions.

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Microsoft Flow: How to Concatenate Data from JSON Object

Hi @DougL,

 

I think you have found the solution:

https://powerusers.microsoft.com/t5/Building-Flows/How-to-Extract-an-Array-from-a-JSON-Object-to-Use...

Using the Parse JSON and then an Apply to each, you should be able to get each of the Email Address from the contacts.

Post back if you have any further questions.

 

Regards,

Michael

Community Support Team _ Michael Shao
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
Community Support Team
Community Support Team

Re: Microsoft Flow: How to Concatenate Data from JSON Object

Hi @DougL,

 

I think you have found the solution:

https://powerusers.microsoft.com/t5/Building-Flows/How-to-Extract-an-Array-from-a-JSON-Object-to-Use...

Using the Parse JSON and then an Apply to each, you should be able to get each of the Email Address from the contacts.

Post back if you have any further questions.

 

Regards,

Michael

Community Support Team _ Michael Shao
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

Lk
Level: Powered On

Re: Microsoft Flow: How to Concatenate Data from JSON Object

How to get those Email Address in one variable to use further like To send emails in one go as a group 

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

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

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 146 members 4,952 guests
Please welcome our newest community members: