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
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

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.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Top Solution Authors
Users online (1,966)