Docs
On this page
task2 min readApplication: Microsoft Teams Integration

Create Teams group chats from records

Let agents open a Microsoft Teams group chat from a record and export a summary of the chat back to the record.

Set up group chats when agents should pull the people on a record into one Microsoft Teams chat, such as a major incident bridge. Agents then create the chat from the record, open it later and export a summary of it to a field on the record.

Before you begin

  • You need the administrator role.
  • Complete Register an Azure bot. Chats are created through the default Microsoft Teams messaging account.
  • Grant the bot’s app registration these Microsoft Graph application permissions, with admin consent: AppCatalog.Read.All, Chat.Create, Chat.Read.WhereInstalled and Teamwork.Migrate.All [UNVERIFIED].
  • Know the table, the user reference fields that hold the chat members and the field that receives the exported summary.

Steps

  1. Go to Administration → Messaging → All messaging channel integrations. Open the shipped record “Incident - Major Incident chat”, or select New for another table.

  2. Fill in the fields in the table below and save. Each table can have only one record.

  3. For Incident, go to Administration → Business Logic → Table operations and activate “Incident - Create Teams Major Incident Chat”. It ships inactive. “Incident - View Teams Major Incident Chat” and “Incident - Export Teams Major Incident Chat messages” ship active.

  4. For another table, create three table operations on it with Operation type set to Execute on client. Each calls the servicely.core.MsTeamsChat controller with a different method: createChat, getChat or exportChatToField. The script for creating a chat follows these steps.

  5. Set a Condition on each operation so it shows only where it applies. The shipped Incident operations show on saved major incidents outside the self-service view, to users with the matching roles.

RequestFactory.createRequest()
    .controller("servicely.core.MsTeamsChat")
    .method("createChat")
    .data({
        parentTable: tableName,
        parentId: current.getID()
    })
    .successFunc(function (response) {
        window.open(response.data.url);
    })
    .execute();
Field Shipped value for Incident Purpose
Name Incident - Major Incident chat Identifies the record
Table Incident The table whose records get chats
Chat name Major Incident - ${current.Number()} - ${current.ShortDescription()} The chat’s title in Teams. ${current.FIELD()} inserts a field value.
Members MajorIncidentManager, MajorIncidentFollower User reference fields whose users join the chat
Roles to Create itsm_agent Who can create the chat
Roles to View itsm_agent Who can open the chat from the record
Roles to Export itsm_agent Who can export the chat to the record
Messages Export Field WorkJournal The field that receives the summary
Summarisation Prompt The shipped summarisation prompt The AI prompt that turns the chat into a summary

Result

On a qualifying record, an agent with a create role sees the create operation. Selecting it creates the Teams chat with the members and opens it in a new tab. Each record has one chat, so the view operation then replaces the create operation. Export runs the summarisation prompt over the chat and writes the summary to the export field, as HTML for journal and HTML fields and Markdown otherwise. Administrators can use all three operations whatever their roles.

Last updated 18 October 2026commit 50111ae9bd3bChris Jones
Back to top