cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
OSBSoto
Advocate II
Advocate II

(Again in Flow) Error : "message": "Invalid type. Expected Object but got Array." while trying to Convert an Array of Objetc to a single String with a single field from each object

Hi everyone, I know this is a topic that comes with frequency at the forums, I had read many threats with the same topic, but still haven't figure how to solve this so I'm just publishing my very exact scenario.

 

Main Objective: Concatenate an N<=31 "Numbers" into a single string separating them with commas in order to Send an Email with that single line, instead of N emails each with a different "Number".

 

First, I had a PowerApp that register on a SharePoint List.

On the SharePoint List, two different columns have Choice with Select Multiple Items available (corresponding to months and days in number format). With the PowerApp it works nicely without any flaws and stores in the SPL steamy.

Second, there is a Flow that "When an item is created" that goes like this:

OSBSoto_1-1621696267131.png

And with the Parse JSON (I'm not good at all using JSONs) got this created from the "Dias de Cobertura" auto-generated schema, but still haven't been able to put it to work.,,

{
    "type""object",
    "properties": {
        "type": {
            "type""string"
        },
        "properties": {
            "type""object",
            "properties": {
                "Id": {
                    "type""object",
                    "properties": {
                        "type": {
                            "type""string"
                        }
                    }
                },
                "Value": {
                    "type""object",
                    "properties": {
                        "type": {
                            "type""string"
                        }
                    }
                },
                "@@odata.type": {
                    "type""object",
                    "properties": {
                        "type": {
                            "type""string"
                        }
                    }
                }
            }
        }
    }
}

 

But in the end, fails. any advice to solve this?

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @OSBSoto 

 

Your schema is not quite right. Its an arrary you iterating and make sure generate the right schema. Then append to an array each values.

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials

View solution in original post

4 REPLIES 4
abm
Super User
Super User

Hi @OSBSoto 

 

Which step you having errors please?

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials

Parsing the JSON and trying to Append it to the string variable

Hi @OSBSoto 

 

Your schema is not quite right. Its an arrary you iterating and make sure generate the right schema. Then append to an array each values.

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials

Thanks you for the support; it helped a lot.

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (3,038)