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 / "For Selected Message"...
Power Automate
Unanswered

"For Selected Message" in Teams to Create Planner Task

(0) ShareShare
ReportReport
Posted on by 53

I was so excited when they added the "For Selected Message" trigger!  I've got a flow that uses an adaptive card in teams and then creates a planner task, but I'm having two issues I hope you all can help me solve:

 

(1) The For Selected Message trigger has an output field with the link to the Teams message.  I would like update the task details with that link to the teams message, but I'm getting a Bad Request error when it runs with this message:

 "The request is invalid:\r\nOne or more property annotations for property 'https%3A//teams%2Emicrosoft%2Ecom/l/message/19%3A89acc2aff144463090a8bc72624ab4f2' were found in the complex value without the property to annotate. Complex values must only contain property annotations for existing properties."

Not sure how to resolve this--the link works just fine if I paste it into a browser!

 

(2) I would like to use the adaptive card to select who should be assigned the task in Planner (ideally with the ability to select multiple assignees).  Anyone know of a way to do this?  I tried to use Input.ChoiceSet with multi selection turned on and then have the person select a name, which would return the e-mail addresses for the persons selected, which I could then do an apply to each and pull the person's user ID based on e-mail and update the task to assign that ID to the task.  But, I'm noticing a couple things, the card output doesn't show the e-mail (only the person's name) and when I did an apply to each, it gave me an error that the output was a String.  I'm new to adaptive cards, and not sure how to fix this!  Here is my adaptive card card code for the selection:

 {
            "type""Input.ChoiceSet",
            "spacing""None",
            "placeholder""Select from these choices",
            "choices": [
                {
                    "title""User 1 Last, First",
                    "value""user1@company.com"
                },
                {
                    "title""User 2 Last, First",
                    "value""user2@company.com"
                },
                {
                    "title""User 3 Last, First",
                    "value""user3@company.com"
                },
            ],
            "id""assignedto",
            "isMultiSelect"true,
            "separator"true
        }
    ],

 

Categories:
I have the same question (0)
  • efialttes Profile Picture
    14,756 on at

    Hi!

    1) On your URL issue

    You mention you already added the URL to the browser, and it works fine. Did you try to add that URL manually to a Planner Task, then click on it, just for troubleshooting purposes?

     

    2) On your Choices issue:

    {
    "title": "User 1 Last, First",
    "value": "user1@company.com"
    }

     

    The content of 'Title' is displayed on your card.

    THe content of 'value' is reported internally by the action block as an output if this option is selected. It must be unique (i.e. different from the other choices value)

    So, if you need to show emails on your card, just modify 'Title' according to your expectations

     

    Hope this helps

  • Knhmayo Profile Picture
    53 on at

    (1) Yes, the link works fine if I manually add it to a planner task.

     

    (2) I realized that I need to transform the string of users assigned to an array to make my apply to each on the task assignment work.  So I changed the card to be "User 1 First Name Last Name" to remove commas and then did Compose: split(triggerBody()['entity']?['cardoutputs']?['assignedto'],',') to separate the assignments an then created an array as follows:

    Knhmayo_0-1600372374336.png

    So, then I try to get the user IDs by doing an apply to each function using the outputs from the array, but it still shows the inputs as being in a string (user1@company.com, user2@company.com) instead of looking each one up separately.  Gah! 

  • efialttes Profile Picture
    14,756 on at

    Hi again

    On the URL issue, can you share an screenshot of your current flow design to doubleckeck your 'Update file properties' inputs?

    On the choices issue, you mention that '...I need to transform the string of users assigned to an array...' Can you share an example of such string of users, just to doublecheck if there is a comma at the end or any possible issue?

    Thanx!

  • Knhmayo Profile Picture
    53 on at

    This is my Update Task Details:

    Knhmayo_0-1600433115285.png

    On the users, the string does contain commas when it produces from the adaptive card:

    Knhmayo_3-1600433534128.png

    That is why I split it at the comma and then compose something without the comma to append to an array.  You can see the append result here--no comma:

    Knhmayo_1-1600433418828.png

     

  • efialttes Profile Picture
    14,756 on at

    Hi again

    On the URL issue... can you select for 'References Type of the reference - 1' the value 'Other' and try again? It looks empty on your screenshot

    Hope this helps

  • Verified answer
    efialttes Profile Picture
    14,756 on at

    Hi again

    On the AssignedTo issue, I have run a test and works like a charm

    I am simulating Card outputs according to your screenshots by means of a string variable called assignedToInput; where I assig the following value:

     

    a@mycompany.com,b@mycompany.com

     

     

    Now, I do not conver it into array. I just manipulate it by means of the following expression:

     

    replace(variables('assignedToInput'),',',';')

     

    So, I just replace commas and insert semicolons instead

    Flow_PlannerTaskAssignees.png

     

    Hope this helps

  • Knhmayo Profile Picture
    53 on at

    I'm not sure why I thought that I had to get the User ID in order to assign the task--perhaps I just never tried an e-mail, but that worked like magic.  I'm going to create a new post re: the URL so we can mark this as a solution.  Thanks!

  • efialttes Profile Picture
    14,756 on at

    @Knhmayo 

    I also thought User ID was needed, it seems Microsoft is improving the internal logic of some action blocks every once a while.

    Thanx for your kindness!

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 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard