Create a Teams team from RITM

tpeleg
Tera Expert

Hello experts,

 

Did someone fulfill the requirement (or similar) to take data from SN and create automation in Microsoft Teams - in my case - create Teams team.

I've tried to use the Teams spoke, and found that it has the ability to  create team but only from an existing 365 team - I need to create the team from scratch. 

 

tpeleg_1-1680519388016.png

 

If someone can refer my to relevant source who can direct me with this, it will be highly appricated.

 

Thanks,

 

Tomer 

 

14 REPLIES 14

Chetan Mahajan
Kilo Sage

Hello @tpeleg ,

                            

To create a Microsoft Teams team from data in ServiceNow, you can use Microsoft Power Automate (formerly known as Microsoft Flow) to create an automation that integrates with both platforms. I am not sure its work or not but you can try I get it somewhere. But you can give it try if its works for you 

  1. Connect your ServiceNow and Microsoft Teams accounts to Power Automate.

  2. Create a Power Automate flow and choose ServiceNow as the trigger. Set up the trigger to run when a new record is created or updated in ServiceNow.

  3. Use the "Get record" action to retrieve the data you need from the ServiceNow record.

  4. Use the "HTTP" action to send a request to the Microsoft Teams Graph API to create a new team. You will need to use the "Send an HTTP request to SharePoint" action and set the "Method" to "POST". You will also need to set the "URI" to "https://graph.microsoft.com/beta/teams" and provide the necessary authentication.

  5. In the body of the HTTP request, you can specify the details of the new team, such as the team name, description, and members. Here is an example of what the body could look like:

 

{
  "template@odata.bind": "https://graph.microsoft.com/beta/teamsTemplates('standard')",
  "displayName": "My New Team",
  "description": "This is a new team created from ServiceNow",
  "members": [
    {
      "@odata.type": "#microsoft.graph.aadUserConversationMember",
      "roles": [
        "owner"
      ],
      "user@odata.bind": "https://graph.microsoft.com/beta/users('<user email>')"
    }
  ]
}

 

  1. Finally, you can use the "Post a message" action in Microsoft Teams to notify the relevant users that the team has been created.

Note that this is a general outline of the steps involved, and you may need to modify them to suit your specific requirements. Additionally, you will need to have the necessary permissions and authentication set up in both ServiceNow and Microsoft Teams to ensure that the automation runs successfully.

 

Kindly mark correct and helpful if applicable

 

 

tpeleg
Tera Expert

Thank you @Chetan Mahajan ! but unfortunately:

 

Create a Power Automate flow and choose ServiceNow as the trigger. Set up the trigger to run when a new record is created or updated in ServiceNow.

 

I've checked internally in my company with 365 experts, Power Automate does not have the ability to listen to SN table.  I will double check it with them just to make sure, but it's a blocker.
Thanks again!

tpeleg
Tera Expert

@Chetan Mahajan  - We will try with schedule calls from Power Automate to SN, with getRecord. I'll update if it works. Thanks

@tpeleg  - Sure, Hope it will work 😊