Example for Copilot DirectLine - JSON Examples
The following JSON is returned from M365 CoPilot Direct Line 3.0, which is the default configuration of external Bots in Nimbus.
Message JSON
{
"type": "message",
"id": "5ZASDrgTOO0GtNlVtdgEE2-uk|0000021",
"timestamp": "2025-05-20T20:31:01.9981516Z",
"serviceUrl": "https://directline.botframework.com/",
"channelId": "directline",
"from": {
"id": "user1"
},
"conversation": {
"id": "5ZASDrgTOO0GtNlVtdgEE2-uk"
},
"locale": "en-EN",
"text": "hello, bot"
}
đź§ Important to note in this response is the value written into text
. When you use this value in your Bot Response Templates, make sure to anticipate and parse longer text using Regular Expressions.
Event JSON
{
"type": "event",
"id": "IG7NO2Am5RlIHU0Ufa3pEr-eu|0000005",
"timestamp": "2025-07-04T11:26:07.9037389Z",
"channelId": "directline",
"from": {
"id": "ca1f129e-77d9-1f5a-e4d4-83bdb379b763",
"name": "Agent 1",
"role": "bot"
},
"conversation": {
"id": "IG7NO2Am5RlIHU0Ufa3pEr-eu"
},
"membersAdded": [],
"membersRemoved": [],
"reactionsAdded": [],
"reactionsRemoved": [],
"locale": "en-EN",
"attachments": [],
"entities": [],
"channelData": "{\"data\":\"mydata\",\"event\":\"mycustomevent\",\"exit\":false,\"topic\":null}",
"replyToId": "IG7NO2Am5RlIHU0Ufa3pEr-eu|0000000",
"value": "Handover",
"name": "Exit",
"listenFor": [],
"textHighlights": []
}
đź§ Important to note in this response is name
“Exit” and the value
“Handover”. Note that Nimbus is only interested in the value
by parsing the field contents using Regular Expressions. The “Exit” field name is just easier to remember the mapping.