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, this is my answer as a Bot"
}
đ§ Important part in this response is the value written into text
â the actual answer from your bot. When you use this value in your Bot Response Templates, e.g. to map it to your âExitâ and âAnswer Rawâ fields within Nimbus, make sure to anticipate and parse longer text using Regular Expressions as you configure your âAdd Virtual Userâ Workflow Activity.
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 parts in this response are name
âExitâ Â to identify the event, and the value
âHandoverâ which is going to be evaluated by Nimbus.
âNote that Nimbus is only interested in contents of value
, parsing them using Regular Expressions as you configure your âAdd Virtual Userâ Workflow Activity. The event name âExitâ Â in this example just helps with identification of the Copilot event.