Jun 27 2019 08:35 AM
We have a recognition program at work where people currently fill out a paper form and turn it in and then generally post about it in Teams so everyone knows. We want to get rid of the paper form portion and do it all electronically.
I know I can add an Office365 "Form" as a tab in a channel that we can use to replace the paper form, but is there a way to have it automatically post so people can see that recognition was given?
If that doesn't make sense, let me know.
Thanks!
Jun 27 2019 09:41 AM
You can tie in a Flow to the Form and have the response inserted into the channel?
Jun 27 2019 11:29 AM
Jun 27 2019 12:25 PM
I've not used FLow before but I think I'm on the right track. I created the flow with:
Trigger: When a new response is submitted
For the Action, I tried Post a message (V3) (Preview) as well as Post a message as the Flow bot to a channel (preview). However, what I'd like to do is post the message and include one of the fields from the form where they write up what they want to say about the person. I'm not seeing any way to do that so far. Is that possible?
Jun 27 2019 01:03 PM
Jun 27 2019 01:19 PM
Jun 27 2019 07:31 PM
OK, I was able to get the Post to Channel thing working, but all the posts have my name on them since it's my Flow so that's not going to work.
I found some other pages about using a Card to make the post and that sounds like it would work great. I started looking at the Webhook idea but apparently the HTTP action is a Premium feature so I can't use that. But then I noticed that there's an action under Teams called: Post your own adaptive card as the Flow bot to a channel. That sounds like exactly what I need.
So, I set everything up but now I get an error when the flow runs that simply says:
Action 'Post_your_own_adaptive_card_as_the_Flow_bot_to_a_channel' failed
The specified Teams flowbot adaptive card request is missing or invalid.
Any idea what that means?
Here's my Card info in case that helps.
Thanks.
{
"$schema": "https://adaptivecards.io/schemas/adaptive-card.json",
"type": "AdaptiveCard",
"version": "1.0",
"body": [
{
"type": "ColumnSet",
"columns": [
{
"width": "stretch",
"items": [
{
"type": "TextBlock",
"text": "ACED IT"
}
]
}
]
},
{
"type": "ColumnSet",
"spacing": "large",
"separator": true,
"columns": [
{
"width": "stretch",
"items": [
{
"type": "TextBlock",
"text": "**@{body('Get_response_details')?['r4bc2e11a0eaf4839b4a4fbe0d0420a41']} got an Aced It!**"
},
{
"type": "TextBlock",
"spacing": "small",
"isSubtle": true,
"wrap": true,
"text": "@{body('Get_response_details')?['r37a7fa26eb234a488418e20fbfe1bdba']}"
},
{
"type": "TextBlock",
"spacing": "none",
"isSubtle": true,
"wrap": true,
"text": "From: @{body('Get_response_details')?['responder']}"
}
]
}
]
}
]
}
Feb 02 2022 02:10 AM
Hey, @Mike Boehm. Did you ever figure this out? I'm trying to do the exact same thing. I just don't find the basic flows to be particularly user-friendly – why should you have to click to see the responses? It's much better to just display them directly in the conversation.
Sep 16 2022 08:30 AM
This is what worked for me;
Hope this helps anyone trying to figure this out.
Sep 19 2022 02:55 AM
Thanks, @MichaelLeeper. I was able to figure it out by basing myself on a free template I found and its 3 steps are exactly as you describe. The trick is to make sure you input the correct form Id in the first 2 events, and once you get that right, the 3rd event will give you a pop-up so you can choose the dynamic fields from your form.
As a reference to others trying to do this, on the 3rd event called "Post adaptive card in chat or channel", I chose to Post as "Flow bot" and Post in "Channel". I then picked the Team and Chanel I wanted to post to, and then the code/formatting in the Adaptive Card field follows:
{
"type":"AdaptiveCard",
"body": [
{
"type": "TextBlock",
"text": "place your cursor between the quotes here to get the popup",
"size": "Medium",
"spacing": "None",
"wrap": true
}
],
"version": "1.2",
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json"
}