cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Dan-Golden
Helper I
Helper I

Gathering Data from Replies in Teams

Hey folx!

 

Trying my best to try and get a user's response from a specific message when posted in Teams.

Here is what I expect:

 

The user will reply to this survey sample with their answersThe user will reply to this survey sample with their answers

 

I would like the user to respond to this message with their answers to this sample set of questions. Then I would need to store their answers somewhere, probably in a Sharepoint list. This is where I'm struggling.

 

flow so farflow so far

 

This is my flow so far. I'm struggling to get the exact message reply from the user and exactly how to extract the response.

 

Any help would be amazing.

 

I know we have some great minds in this community.

 

Thank you so much in advance!

1 ACCEPTED SOLUTION

Accepted Solutions
v-yiwenxie-msft
Microsoft
Microsoft

Hi @Dan-Golden 

 

If users post their replies in the same structure as that of your screenshot of the questions in Teams (especially there are 2 whitespace).

 

I tried to get the questions in the message in Teams. And fill those questions respectively into sharepoint list.

Here is the message I post in Teams:

2.25-18.PNG

 

Here is the result in sharepoint list:

2.25-19.PNG

 

Then the following flow is for your reference:

2.25-17.PNG

 

The detailed steps for ‘html to text’ and the first four ‘composes’:

2.25-20.PNG

The functions used:

replace(outputs('Html_to_text')?['body'],'Q','  ')

replace(outputs('Compose_2'),':','  ')

split(outputs('Compose_3'),'  ')

 

The detailed steps for ‘filter array’ and ‘initialize variable’:

2.25-21.PNG

The function used for ‘Item’ in ‘filter array’:

item()

 

Just put in an ‘enter’ on keyboard for the bottom right box in ‘filter array’.

 

The detailed steps for ‘Apply to each’ and ‘compose 6’:

2.25-22.PNG

The dynamic content ‘Body’ is from ‘filter array’.

The dynamic content ‘Outputs’ is from ‘Compose 5’.

 

The function used:

trim(items('Apply_to_each'))

 

The detailed step for ‘create an item’:

2.25-23.PNG

The function used for Question1/2/3 are respectively:

outputs('Compose_6')[0]

outputs('Compose_6')[1]

outputs('Compose_6')[1]

 

For more info about replace(), split(), trim():

Reference guide for functions in expressions - Azure Logic Apps | Microsoft Docs

Reference guide for functions in expressions - Azure Logic Apps | Microsoft Docs

Reference guide for functions in expressions - Azure Logic Apps | Microsoft Docs

 

The [0]/[1]/[2] are used to get the first item/second item/third item respectively.

 

If I’ve misunderstood your need, please feel free to let me know.

 

Best Regards,
Community Support Team _ Kira Xie
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

5 REPLIES 5
v-yiwenxie-msft
Microsoft
Microsoft

Hi @Dan-Golden 

 

If users post their replies in the same structure as that of your screenshot of the questions in Teams (especially there are 2 whitespace).

 

I tried to get the questions in the message in Teams. And fill those questions respectively into sharepoint list.

Here is the message I post in Teams:

2.25-18.PNG

 

Here is the result in sharepoint list:

2.25-19.PNG

 

Then the following flow is for your reference:

2.25-17.PNG

 

The detailed steps for ‘html to text’ and the first four ‘composes’:

2.25-20.PNG

The functions used:

replace(outputs('Html_to_text')?['body'],'Q','  ')

replace(outputs('Compose_2'),':','  ')

split(outputs('Compose_3'),'  ')

 

The detailed steps for ‘filter array’ and ‘initialize variable’:

2.25-21.PNG

The function used for ‘Item’ in ‘filter array’:

item()

 

Just put in an ‘enter’ on keyboard for the bottom right box in ‘filter array’.

 

The detailed steps for ‘Apply to each’ and ‘compose 6’:

2.25-22.PNG

The dynamic content ‘Body’ is from ‘filter array’.

The dynamic content ‘Outputs’ is from ‘Compose 5’.

 

The function used:

trim(items('Apply_to_each'))

 

The detailed step for ‘create an item’:

2.25-23.PNG

The function used for Question1/2/3 are respectively:

outputs('Compose_6')[0]

outputs('Compose_6')[1]

outputs('Compose_6')[1]

 

For more info about replace(), split(), trim():

Reference guide for functions in expressions - Azure Logic Apps | Microsoft Docs

Reference guide for functions in expressions - Azure Logic Apps | Microsoft Docs

Reference guide for functions in expressions - Azure Logic Apps | Microsoft Docs

 

The [0]/[1]/[2] are used to get the first item/second item/third item respectively.

 

If I’ve misunderstood your need, please feel free to let me know.

 

Best Regards,
Community Support Team _ Kira Xie
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

Dan-Golden
Helper I
Helper I

Let me give this a whirl today. This appears to be the solution! Thank you.

v-yiwenxie-msft
Microsoft
Microsoft

Hi @Dan-Golden 

 

If your problem has been solved by my method, could you please mark it as solution to help other members to find it more quickly?

 

If you still have the problem, please feel free to let me know.

 

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

testdp
Regular Visitor

Hello @v-yiwenxie-msft and @Dan-Golden ,

Did this solution truly work?  We're struggling with this same use case in our org.  From what we've seen and read, the 'Get messages' is misleading as it only gets the initial message but no reply.  We see the use of the 'Get Messages' prior to creating the sharepoint item, and we're speculating that only the initial message was returned.  

 

Can you please advise further?

 

Thanks!

bombledmonk
Regular Visitor

It's quite disappointing that we can't access replies to messages using Teams connectors.  This really is one of the most baseline expected features that could exist.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (2,357)