Microsoft Teams : Integrating with Service Now – Part 4 – Teams action – For a selected message – Taking user input using Adaptive Card and creating new incident in ServiceNow

Adaptive card in Power Automate for user input
Adaptive card in Power Automate for user input

Hi All,

LIFE IS BEAUTIFUL 🙂 I hope we all are safe 🙂 STAY SAFE, STAY HEALTHY, STAY HOME 🙂

Background : In our current series we are discussing integration of Microsoft Teams, Power Automate and ServiceNow. Today this is last article of the series and we will discuss new Microsoft Team Trigger – “For a selected message” which allows us to take input from the user using Adaptive Card who post the message in Teams and want to create new ticket / incident in ServieceNow

If you didn’t got a chance to go through previous articles please have a look once

Use Case / Background: We are automating the process of creation of ServiceNow incident from Teams channel.

Today in this article we will discuss how to get the input for user who want to create the new incident in ServiceNow which are required for incident properties for example – priority / Group to assigned / description / worknotes and so on using Microsoft Teams Adaptive card.

Details / Steps :

  • In Power Automate there is a Teams trigger – “For a selected message” as shown in below Fig
Microsoft Teams - Service Now integration - Trigger - For a selected message
Fig 1 : Microsoft Teams – Service Now integration – Microsoft Teams Trigger in Power Automate – For a selected message
  • This triggers allows us to start Power Automate for selected message in Microsoft Teams
  • Once we added this trigger, we have Adaptive Card available for getting the user inputs as
Microsoft Teams - Service Now integration - Trigger - For a selected message - Adaptive Card available for user input
Fig 2 : Microsoft Teams – Service Now integration – Trigger – For a selected message – Adaptive Card available for user input
  • Click on “Edit Adaptive Card” button as in above Fig, we will get an “Adaptive Card” editor as shown in below Fig
Microsoft Teams - Service Now integration - Trigger - For a selected message - Adaptive Card available for user input
Fig 3 : Microsoft Teams – Service Now integration – Trigger – For a selected message – Adaptive Card available for user input
  • We could edit the controls available on Adaptive Card with the fields which we need and those can be then accessed to Power Automate.
Microsoft Teams - Service Now integration - Trigger - For a selected message - Editing Adaptive Card available for user input
Fig 4 : Microsoft Teams – Service Now integration – Trigger – For a selected message – Editing Adaptive Card available for user input
  • For every field on Adaptive Card there is by default unique id is associated. We could change this id as well. This id we can use in “Create Record” action in Power Automate as
Microsoft Teams - Service Now integration - For a selected message - Editing Adaptive Card - Unique ID associated with each control on Adaptive Card - used while assigning value to properties of  "Create Record" action of Service Now
Fig 5 : Microsoft Teams – Service Now integration – For a selected message – Editing Adaptive Card – Unique ID associated with each control on Adaptive Card – used while assigning value to properties of “Create Record” action of Service Now
  • Here in this article I wont go for Adaptive Card controls and details. I’ll try to come up with separate article for the same 🙂
  • How to use Adaptive Card fields – Lets edit “Create Record” action of Service Now in Power Automate so that those will be reflected in incidents as shown in below Fig
Microsoft Teams - Service Now integration - For a selected message - Adding field from Adaptive Card to the Caller field of Service Now incident
Fig 6 : Microsoft Teams – Service Now integration – For a selected message – Adding field from Adaptive Card to the Caller field of Service Now incident
  • Once we have Power Automate ready, we are ready to test

Testing :

  • For testing this Power Automate we need to go to our teams, post the message and trigger the Power Automate as shown in below Fig
Microsoft Teams - Service Now integration - For a selected message - Posting message to channel and triggering the Power Automate
Fig 7 : Microsoft Teams – Service Now integration – For a selected message – Posting message to channel and triggering the Power Automate – “Create Service Now record”
  • Once we triggered Power Automate, we will get adaptive card for input as shown in below Fig
Fig 8 : Microsoft Teams – Service Now integration – For a selected message – Input through Adaptive Card
  • On “Submit” button “Power Automate” will be triggered.
  • As shown in below Fig – Power Automate executed successfully and we could see incident number
Microsoft Teams - Service Now integration - Power Automate executed successfully and incident is created in ServiceNow successfully
Fig 9 : Microsoft Teams – Service Now integration – For a selected message -Power Automate executed successfully and incident is created in ServiceNow successfully
  • Login to ServiceNow and we could see the incident as
Microsoft Teams - Service Now integration - For a selected message - ServiceNow incident created successfully
Fig 10 : Microsoft Teams – Service Now integration – For a selected message – ServiceNow incident created successfully

I’ll stop here and complete this series. If you face any challenge / issue while integrate ServiceNow and Microsoft Teams or Power Automate please feel to put comment or discuss 🙂

Limitations:

  • Adaptive card to a private channel currently is not supported.

Thanks for reading 🙂 Feel free to discuss / comments / questions 🙂 SHARING IS CARING 🙂

Share In Teams:

Enjoy the beautiful life 🙂 Have a FUN 🙂 HAVE A SAFE LIFE 🙂 TAKE CARE 🙂

Prasham Sabadra

LIFE IS VERY BEAUTIFUL :) ENJOY THE WHOLE JOURNEY :) Founder of Knowledge Junction and live-beautiful-life.com, Author, Learner, Passionate Techie, avid reader. Certified Professional Workshop Facilitator / Public Speaker. Scrum Foundation Professional certificated. Motivational, Behavioral , Technical speaker. Speaks in various events including SharePoint Saturdays, Boot camps, Collages / Schools, local chapter. Can reach me for Microsoft 365, Azure, DevOps, SharePoint, Teams, Power Platform, JavaScript.

You may also like...

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: