mutation CreateThreadFromMSTeamsMessage($input: CreateThreadFromMSTeamsMessageInput!) {
createThreadFromMSTeamsMessage(input: $input) {
thread {
id
ref
customer {
id
externalId
fullName
shortName
email {
__typename
}
avatarUrl
}
title
description
previewText
}
error {
message
type
code
fields {
field
message
type
}
}
}
}{
"input": {
"msTeamsConversationId": "id",
"msTeamsMessageId": "id"
}
}{
"data": {
"createThreadFromMSTeamsMessage": {
"thread": {
"id": "id",
"ref": "string",
"customer": {
"id": "id",
"externalId": "id",
"fullName": "string",
"shortName": "string",
"email": {
"__typename": "EmailAddress"
},
"avatarUrl": "string"
},
"title": "string",
"description": "string",
"previewText": "string"
},
"error": {
"message": "string",
"type": "VALIDATION",
"code": "string",
"fields": [
{
"field": "string",
"message": "string",
"type": "VALIDATION"
}
]
}
}
}
}createThreadFromMSTeamsMessage
Creates a thread from a message in a Microsoft Teams channel or chat that the Plain bot is a
member of. This is the trigger for the API_ONLY value of the ms_teams/ingestion_mode
workspace setting, and works in AUTOMATIC mode too. In a channel, the whole post the message
belongs to becomes the thread. In a chat, the thread also includes the messages before and
after this one, taken from the chat’s 50 most recent messages. Thread creation runs asynchronously,
so thread is only returned when the message was already on a thread. Requires the
thread:create permission.
createThreadFromMSTeamsMessage(input: CreateThreadFromMSTeamsMessageInput!): CreateThreadFromMSTeamsMessageOutput!Arguments
The open thread, when this Teams message's conversation already has one. Null when the request
was accepted and the thread is still being created. Poll threadByMSTeamsMessage until it
returns a thread whose lockedAt is null, or use the thread.thread_created webhook, to
pick it up.
mutation CreateThreadFromMSTeamsMessage($input: CreateThreadFromMSTeamsMessageInput!) {
createThreadFromMSTeamsMessage(input: $input) {
thread {
id
ref
customer {
id
externalId
fullName
shortName
email {
__typename
}
avatarUrl
}
title
description
previewText
}
error {
message
type
code
fields {
field
message
type
}
}
}
}{
"input": {
"msTeamsConversationId": "id",
"msTeamsMessageId": "id"
}
}{
"data": {
"createThreadFromMSTeamsMessage": {
"thread": {
"id": "id",
"ref": "string",
"customer": {
"id": "id",
"externalId": "id",
"fullName": "string",
"shortName": "string",
"email": {
"__typename": "EmailAddress"
},
"avatarUrl": "string"
},
"title": "string",
"description": "string",
"previewText": "string"
},
"error": {
"message": "string",
"type": "VALIDATION",
"code": "string",
"fields": [
{
"field": "string",
"message": "string",
"type": "VALIDATION"
}
]
}
}
}
}Was this page helpful?

