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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Input is of type strin...
Power Automate
Answered

Input is of type string, value must be an array

(0) ShareShare
ReportReport
Posted on by 17

Hi All. 

 

I am trying to replicate the flow from here: https://www.damobird365.com/microsoft-list-add-comment/

For me, it fails in the Apply to each loop with the following error: 

MFLAGER_1-1703001081590.png

 

BadRequestThe 'from' property value in the 'select' action inputs is of type 'String'. The value must be an array.

 

MFLAGER_0-1703000497124.png

 

The 'Select' is setup as follows:

 

{
"type": "Select",
"inputs": {
"from": "@body('Send_an_HTTP_request_to_SharePoint')?['d']?['results']",
"select": {
"Text": "@{concat(formatdatetime(item()?['createdDate'],'yyyy-MM-dd HH:mm'),' ',item()?['text'])}",
"Mention": "@{item()?['mentions']?['results']}"
}
},
"runAfter": {
"Send_an_HTTP_request_to_SharePoint": [
"Succeeded"
]
},
"metadata": {
"operationMetadataId": "a38b9e86-bcc1-49cd-9f71-f7d6180d3728"
}
}

 

 

 

Apply to each uses that output: body['Select']

The MentionSelect 'From' is 

Items('Apply_to_each')?['mention']
 
Select:
 item()?['name']
 
The Raw Input is:
[
{
"Text": "2023-12-05 17:21 @mention{0} and another one for good measure.",
"Mention": "[{\"email\":\"Mark.Lagerweij@geoverra.com\",\"id\":253,\"loginName\":\"i:0#.f|membership|mark.lagerweij@geoverra.com\",\"name\":\"Mark Lagerweij\"}]"
},
{
"Text": "2023-12-04 17:31 @mention{0} this is a beautiful message",
"Mention": "[{\"email\":\"Mark.Lagerweij@geoverra.com\",\"id\":253,\"loginName\":\"i:0#.f|membership|mark.lagerweij@geoverra.com\",\"name\":\"Mark Lagerweij\"}]"
}
]
 
The 'From' field in the error message reads: 
[
{
"email": "Mark.Lagerweij@geoverra.com",
"id": 253,
"loginName": "i:0#.f|membership|mark.lagerweij@geoverra.com",
"name": "Mark Lagerweij"
},
{
"email": "Mark.Lagerweij@geoverra.com",
"id": 253,
"loginName": "i:0#.f|membership|mark.lagerweij@geoverra.com",
"name": "Mark Lagerweij"
}
]
 
Now, isn't the above and array, why does it telling me it is a string?
 
Any insights are appreciated.
 
Thanks!
Categories:
I have the same question (0)
  • Verified answer
    DamoBird365 Profile Picture
    8,942 Microsoft Employee on at

    Hi @MFLAGER ,

     

    This is a bug in the new designer. If you move to the classic and remove and insert a new select, it will work. The new designer is converting json objects in a select to a string. Please do let me know if this solves your problem and I will report it internally.  I don’t work on the product but i can let the product team know if this applies to you. I’ve seen the same behaviour when building demos, ironic that it’s my blog post your using it with though 👍

     

    Damien

  • MFLAGER Profile Picture
    17 on at

    That's brilliant @DamoBird365, I've been crying myself to sleep for the last few days. This does the trick.

     

    Thanks Damien! 

  • ralzayyat Profile Picture
    4 on at

    I got the following error:

     

    ExpressionEvaluationFailed. The execution of template action 'Apply_to_each' failed: the result of the evaluation of 'foreach' expression '@triggerOutputs()?['body/triggerType']' is of type 'String'. The result must be a valid array.
    How can i solve it?
     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 589

#2
Valantis Profile Picture

Valantis 459

#3
11manish Profile Picture

11manish 382

Last 30 days Overall leaderboard