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 / Switch function array ...
Power Automate
Answered

Switch function array expecting string / integer error

(0) ShareShare
ReportReport
Posted on by 134

I'm attempting to use a switch function based on a keyword from a teams group chat trigger.

 

The idea being that the keyword searched for is 'Refresh' and then there will be multiple cases based on the keyword so Refresh - StockYolding will do an action, Refresh - Fleet etc.

 

Problem with the flow is that I have the on switch based on the value from the trigger 'The list of messages that triggered the flow' but when I try and run the flow I get the following error:

 

"The execution of template action 'Switch' failed: The result of the evaluation of 'scope' action expression '@triggerOutputs()?['body/value']' is not valid. It is of type 'Array' but is expected to be a value of type 'String, Integer'."

 

Any help appreciated

 

Mawdman85_1-1705310855589.png

 

Categories:
I have the same question (0)
  • v-yetonggu-msft Profile Picture
    Microsoft Employee on at

    Hi @Mawdman85 ,

    I did a test for your reference.

    In my scenario:

    vyetonggumsft_0-1705311729545.png

    vyetonggumsft_1-1705311753692.png

    Best Regards,

    Sunshine Gu

  • Mawdman85 Profile Picture
    134 on at

    Thanks for the swift reply @v-yetonggu-msft  but i'm getting an error now of type object when expecting string / integer

     

    Mawdman85_1-1705312405567.png

     

     

     

     

    Mawdman85_0-1705312356511.png

     

  • Verified answer
    v-yetonggu-msft Profile Picture
    Microsoft Employee on at

    Hi @Mawdman85 ,

    vyetonggumsft_0-1705312647648.png

    Best Regards,

    Sunshine Gu

  • Mawdman85 Profile Picture
    134 on at

    Amazing, thanks!

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 608

#2
Valantis Profile Picture

Valantis 416

#3
11manish Profile Picture

11manish 348

Last 30 days Overall leaderboard