cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Dynamic content not supprted for Microsoft Teams reply to mesage?

Hi all,

 

I'm trying to set up a flow that would respond to a new channel message that is posted in Microsoft Teams.


I set up the flow as follows:
Trigger -> When a new channel mesage is added

Flow Step-> Post a reply to a message

 

The Post a reply to a message requires the team name and channel, message ID, and then the reply you would like to post.  Dynamic content is enabled on the reply, but not the message ID field, preventing me from auto replying to the message that was previously posted.  

 

It works great sending an e-mail using dynamic content and a bunch of other workarounds, but this is frustrating that I can't just use dynamic content from step 1 to fill out the message ID field. 

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-bacao-msft
Community Support
Community Support

Hi @Anonymous ,

 

Please use Compose to input Message Id, then fill Compose's output in Message field.

Image reference:

24.PNG

Hope it helps.

 

Best Regards,

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

8 REPLIES 8
v-bacao-msft
Community Support
Community Support

Hi @Anonymous ,

 

Please use Compose to input Message Id, then fill Compose's output in Message field.

Image reference:

24.PNG

Hope it helps.

 

Best Regards,

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

Anonymous
Not applicable

Thanks that does certainly help and has resolved this issue.  

I have one more question for you if you can help further.

Does Flows have any sort of way of pulling message replies from a message in the teams channel?  I believe Microsoft Graph API has a way of doing this, but requires admin privileges, if there is a way within flows that would greatly help. 

Hi @Anonymous ,

 

Unfortunately, the action in Teams connector is currently unable to pull message replies from a message in the teams channel.

I am afraid there is currently no suitable way to achieve such a requirement.

If you want such a feature to be supported by MS Flow, please consider submitting your suggestions in Flow ideas forum:

https://powerusers.microsoft.com/t5/Flow-Ideas/idb-p/FlowIdeas

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

I've tried use the 'Post reply to a message' with no success. Here is what my Flow looks like, the trigger is 'When an item is created' the next connector is a condition then this:

Capture 3.PNG

The second yes option starts with another trigger 'When a new channel message is added' following the format given in this thread. I got the idea from here: https://powerusers.microsoft.com/t5/General-Flow-Discussion/Tips-Use-a-Trigger-in-middle-of-Microsof... 
In any case the flow failed at the compose connector with this error message: "Unable to process template language expressions in action 'Compose' inputs at line '1' and column '2624': 'The template language expression 'body('When_a_new_channel_message_is_added')?['id']' cannot be evaluated because property 'id' cannot be selected. Array elements can only be selected using an integer index. Please see https://aka.ms/logicexpressions for usage details.'."

I'm now stuck. 

Is it possible to use the "post a reply to a a message" connector without using the 'When a new channel message is added' trigger? My goal would be for the 'post a reply' to respond to the particular message generated by the flow, rather than any message in the channel - is this possible?  
 

Thanks in advance! 

@DataFailure Did you ever manage to find a solution to this problem? Having the same issue myself as I want to achieve almost the exact same situation - reply to a message I posted earlier in the Flow.

@JamesSnaps No I couldn't get it to work with the flow set up I had in my post. The reply would go to the next conversation/message added to the teams channel rather than the one generated by the flow. 
Looking at that flow again I am wondering if setting the connectors up in the following way might work? Granted I have not tested this, it just popped into my head. This might have the reply ready to go so it would send when the post a message connector activates? 

When a new channel message is added > Compose > Post reply to a message (V2) > Post a message (V3)

Edit:
I have now tried the above and couldn't get it to work. I'd forgotten that When a new channel message is added is a trigger rather than an action so it wont activate until a message is manually posted to teams. Here is the error I got:
Capture8.PNG
Sorry I can't be of more help. 

 

@DataFailure So I've managed to get this to work now. I had to place the compose (and the reply action) in an Apply to each following the 'when a new channel message is added' trigger. So my setup is basically the same as yours, but with that difference.

 

Screenshot 2019-08-09 at 14.10.14.png

 

The message being replied to is initially posted in parallel to these actions, with a slight delay to give the trigger time to be ready.

Screenshot 2019-08-09 at 14.13.58.png 

Hello.

Do you know if how can I mention people this way, using this reply function?

I tried <at> syntaxis, without success

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (2,152)