Sep 06 2018 12:39 PM
Hey
How can i use microsoft flow to create good looking posts in Microsoft Teams
I have read about something called JSON and something called webhooks and creating rich cards in microsoft teams.
How can i careate these cards with predefined information.
For example.
I have a form that i now use flow to post a message in teams every time someone fills out the form (microsoft forms).
But i would like to make the message that is posted in teams look better.
With a JSON card....
What do i need to do this?
I have googled around. Finding lots of information... but it is a bit to advanced for me... can someone dumb it down?
Sep 06 2018 01:05 PM
Sep 06 2018 01:09 PM
Sep 06 2018 01:09 PM
Sep 06 2018 01:10 PM - edited Sep 06 2018 01:11 PM
Sep 06 2018 01:10 PM - edited Sep 06 2018 01:11 PM
In the meantime here is a good reference for the cards however with examples you can use and just plug that into Flow and add in the dynamic fields and your good to go: https://docs.microsoft.com/en-us/outlook/actionable-messages/message-card-reference
Sep 06 2018 01:12 PM
Thanks, this look very good.
But where do i paste in the code in flow to make it post in teams
can i just use the Teams and post message command in flow?
screenshot: http://prntscr.com/krgfe1
Sep 06 2018 01:13 PM
Sep 06 2018 01:15 PM
Sep 06 2018 01:15 PM
Sep 06 2018 01:19 PM
thanks for many good ideas.
i need to first make sure i get the posting to work before modifying it.
currently i do not get it to work
screenshot: http://prntscr.com/krgily
this just postes the JSON code to teams
So no card being created.
Sep 06 2018 01:52 PM
im so confused about this.
i need some very simple flow example that post a JSON card into teams.
All my googling and tries are not giving any result.
I get a bunch of different erros all the time.
Here is my latest try, if you have any input to give im very happy.
SCREENSHOT1: http://prntscr.com/krgtyb
SCREEN2: http://prntscr.com/krgu3y
screen3: http://prntscr.com/krgu7m
screen 4: http://prntscr.com/krgub8
Sep 06 2018 02:09 PM
Sep 06 2018 03:02 PM
I have succeeded on getting the flow to work. now i get a card posted in teams.
but the JSON code i do not understand.
This code
{
"type": "TextBlock",
"size": "large",
"text": "**test title**"
}
works just fine.
But how do i add another section that is not set to be "large"?
I have tried to look at other examples but it seem i can not add much code atall in Flow
for example, how do i add a large title and then a subtitle and then some normal text?
Sep 06 2018 03:26 PM
I'm not an expert at JSON, but just use that generator I sent you, you can plug stuff in pretty easy. See example here, I just took the Medium one, and duplicated in the section seperated by comma to make a large title as well.
Sep 06 2018 10:33 PM
Im doing exaclty as you describe.
I post this in flow
{
"type": "TextBlock",
"size": "large",
"text": "**textblock 1**"
},{
"type": "TextBlock",
"size": "medium",
"text": "**textblock 2**"
}
but i get an error and can not save the flow
if i remove one textblock, then i tall works.
It seems i can not have two?
i can not post the above code either in the playground
https://messagecardplayground.azurewebsites.net/
what am i missing to make the code work?