Forum Discussion

Kelemvor333's avatar
Kelemvor333
Steel Contributor
Jun 27, 2019

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

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!

  • MichaelLeeper's avatar
    MichaelLeeper
    Copper Contributor

    Kelemvor333 

     

    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.

    • Sarah_Jade_A's avatar
      Sarah_Jade_A
      Copper Contributor

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

       

  • 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-flow/
  • You can tie in a Flow to the Form and have the response inserted into the channel?

    • Kelemvor333's avatar
      Kelemvor333
      Steel Contributor

      VasilMichev 

      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?

      • adam deltinger's avatar
        adam deltinger
        MVP
        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

Resources