Can I have a form in a channel that will post in the conversations tab any time it gets filled out?

Steel Contributor

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!

9 Replies

You can tie in a Flow to the Form and have the response inserted into the channel?

Yes, Vasil's idea should work. There is a Trigger when form is submitted, that you can then have a Team action to post a message in a channel. These used to not trigger alerts however so you might have to test it out.

The work around and might even be better here in this situation if you want this recognition to show in more than at the same time is have the flow instead trigger to a webhook. Then you can have people or you I think can now use graph to setup a channel connection to connect to the webhook you push too which when you post recognition it'll post to any team channel that is connected to that webhook.

Here is old blog to get started the webhook method. I'd try flow first, it's the easiest, but if you need notifications or more than one team to get these then use the webhook method: https://davidlozzi.com/2018/03/01/posting-to-teams-incoming-webhook-verses-teams-post-message-in-flo...

@Vasil Michev 

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?

Add a forms action after the first one of “get response details” you should be able to use the dynamic content from the form answers then
Yeah what Adam said, get response details and use I think it's the ID from the first trigger. Then you'll have the fields available to use in the post a message action.

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']}"
}
]
}
]
}
]
}

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.

@Mike Boehm 

 

This is what worked for me;

 

  1. Create a new flow that triggers when a new response is submitted
  2. The 2nd event is get response details, set the response id dynamic content to response id
  3. 3rd event is Post a message in a chat or channel
    1. You will need to format the message body to include your question/prompt followed by the dynamic content response

Hope this helps anyone trying to figure this out.

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"
}