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

3 REPLIES 3
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.

Helpful resources

Announcements
MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MSFTBizAppsLaunchEvent

Experience what’s next for Power Virtual Agents

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Users online (34,631)