You can use the Prebuilt Action Templates from your Microsoft Graph integration to auto-create dialog tasks and test them using the Talk to Bot option.
Steps to create a dialog task using Microsoft Graph action templates:
- Go to Build > Conversation Skills > Dialog Tasks.
- Click Create a Dialog Task.
- On the Dialog Task pop-up, under the Integration, select the Microsoft Graph option to view the action templates.
- If you have not configured any integration for your virtual assistant, you will see the Explore Integrations option. Once you click this option, you will be redirected to the Actions page to configure an integration for your VA. For more information, see Actions Overview.
Microsoft Graph Actions
The following Microsoft Graph actions are supported:
Supported Tasks | Description | Method |
List all events | Retrieves all events from the Microsoft Graph system. | GET |
List all to-do lists | Retrieves all to-do list items from the Microsoft Graph system. | GET |
Create a to-do list | Create a to-do list in the Microsoft Graph system. | POST |
Create an event | Creates an event in the Microsoft Graph system. | POST |
Send an Email | Sends an email to the user from the Microsoft Graph system. | POST |
List All Events
Steps to view all events in the Microsoft Graph integration:
- Refer to the Installing the Microsoft Graph templates section to install this template.
- The List All Events dialog task is added with the following components:
- listallEvents – A user intent to view all events.
- listAllEventsService – A bot action service to view all events in an external integration. Click the Plus icon to expand to view the listAllEventsService bot action component properties.
- In the Component Properties window, To add one or more responses, scroll down and click +Add Response.
Sample Response
{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users('purushottamKumar1215%40outlook.com')/events",
"value": [
{
"@odata.etag": "W/\"72QERTxLykaU1e+TybdcNQAAG8nV2w==\"",
"id": "AQMkADAwATNiZmYAZC01N2E2LTYyZDYtMDACLTAwCgBGAAADiea_kiTHkkGyRB2nztFSRQcA72QERTxLykaU1e_TybdcNQAAAgENAAAA72QERTxLykaU1e_TybdcNQAAABvMY3kAAAA=",
"createdDateTime": "2022-12-09T07:08:07.7644246Z",
"lastModifiedDateTime": "2022-12-09T07:08:08.0300829Z",
"changeKey": "72QERTxLykaU1e+TybdcNQAAG8nV2w==",
"categories": [],
"transactionId": null,
"originalStartTimeZone": "India Standard Time",
"originalEndTimeZone": "India Standard Time",
"iCalUId": "040000008200E00074C5B7101A82E008000000003CEC5EFD9C0BD9010000000000000000100000005885E42DB5DA6C4990A52975F77CAD8A",
"reminderMinutesBeforeStart": 15,
"isReminderOn": true,
"hasAttachments": false,
"subject": "event test",
"bodyPreview": "",
"importance": "normal",
"sensitivity": "normal",
"isAllDay": false,
"isCancelled": false,
"isOrganizer": true,
"responseRequested": true,
"seriesMasterId": null,
"showAs": "busy",
"type": "singleInstance",
"webLink": "https://outlook.live.com/owa/?itemid=AQMkADAwATNiZmYAZC01N2E2LTYyZDYtMDACLTAwCgBGAAADiea%2BkiTHkkGyRB2nztFSRQcA72QERTxLykaU1e%2BTybdcrl=1&path=/calendar/item",
"onlineMeetingUrl": null,
"isOnlineMeeting": false,
"onlineMeetingProvider": "unknown",
"allowNewTimeProposals": true,
"occurrenceId": null,
"isDraft": false,
"hideAttendees": false,
"responseStatus": {
"response": "organizer",
"time": "0001-01-01T00:00:00Z"
},
"body": {
"contentType": "html",
"content": "\r\n\r\n<!--"
},
"start": {
"dateTime": "2022-12-10T04:30:00.0000000",
"timeZone": "UTC"
},
"end": {
"dateTime": "2022-12-10T05:10:00.0000000",
"timeZone": "UTC"
},
"location": {
"displayName": "",
"locationType": "default",
"uniqueIdType": "unknown",
"address": {},
"coordinates": {}
},
"locations": [],
"recurrence": null,
"attendees": [
{
"type": "required",
"status": {
"response": "none",
"time": "0001-01-01T00:00:00Z"
},
"emailAddress": {
"name": "tanmay.agrawal@kore.com ",
"address": "tanmay.agrawal@kore.com "
}
},
{
"type": "required",
"status": {
"response": "none",
"time": "0001-01-01T00:00:00Z"
},
"emailAddress": {
"name": " purushottam.kumar@kore.com",
"address": " purushottam.kumar@kore.com"
}
}
],
"organizer": {
"emailAddress": {
"name": "Purushottam Kumar",
"address": "purushottamKumar1215@outlook.com"
}
},
"onlineMeeting": null,
"calendar@odata.associationLink": "https://graph.microsoft.com/v1.0/users('purushottamKumar1215@outlook.com')/calendars('AQMkADAwATNiZmYAZC01N2E2LTYyZDYtMDACLTAERTxLykaU1e_')/$ref",
"calendar@odata.navigationLink": "https://graph.microsoft.com/v1.0/users"
},
{
"@odata.etag": "W/\"72QERTxLykaU1e+TybdcNQAACgSHcw==\"",
"id": "AQMkADAwATNiZmYAZC01N2E2LTYyZDYtMDACLTAwCgBGAAADiea_kiTHkkGyRB2nztAA=",
"createdDateTime": "2022-11-10T06:01:05.8265067Z",
"lastModifiedDateTime": "2022-11-10T06:01:06.3275042Z",
"changeKey": "72QERTxLykaU1e+TybdcNQAACgSHcw==",
"categories": [],
"transactionId": null,
"originalStartTimeZone": "India Standard Time",
"originalEndTimeZone": "India Standard Time",
"iCalUId": "040000008200E00074C5B7101A82E008000000003A2221D2C9F4D8010000000000000000100000003A24283C5796EB4AB4442F1ECBF05FF7",
"reminderMinutesBeforeStart": 15,
"isReminderOn": true,
"hasAttachments": false,
"subject": "My event 1",
"bodyPreview": "",
"importance": "normal",
"sensitivity": "normal",
"isAllDay": false,
"isCancelled": false,
"isOrganizer": true,
"responseRequested": true,
"seriesMasterId": null,
"showAs": "busy",
"type": "singleInstance",
"webLink": "https://outlook.live.com/owa/?itemid=AQMkADAwATNiZmYAZC01N2E2LTYyZDYtMDACLTAwCgBGAAADiea%2BkiTybdcxvsurl=1&path=/calendar/item",
"onlineMeetingUrl": null,
"isOnlineMeeting": false,
"onlineMeetingProvider": "unknown",
"allowNewTimeProposals": true,
"occurrenceId": null,
"isDraft": false,
"hideAttendees": false,
"responseStatus": {
"response": "organizer",
"time": "0001-01-01T00:00:00Z"
},
"body": {
"contentType": "html",
"content": "\r\n"
},
"start": {
"dateTime": "2022-11-09T18:42:00.0000000",
"timeZone": "UTC"
},
"end": {
"dateTime": "2022-11-09T19:25:00.0000000",
"timeZone": "UTC"
},
"location": {
"displayName": "",
"locationType": "default",
"uniqueIdType": "unknown",
"address": {},
"coordinates": {}
},
"locations": [],
"recurrence": null,
"attendees": [
{
"type": "required",
"status": {
"response": "none",
"time": "0001-01-01T00:00:00Z"
},
"emailAddress": {
"name": "aa@gmail.com ",
"address": "aa@gmail.com "
}
},
{
"type": "required",
"status": {
"response": "none",
"time": "0001-01-01T00:00:00Z"
},
"emailAddress": {
"name": " bb@yahoo.com",
"address": " bb@yahoo.com"
}
}
],
"organizer": {
"emailAddress": {
"name": "Purushottam Kumar",
"address": "purushottamKumar1215@outlook.com"
}
},
"onlineMeeting": null,
"calendar@odata.associationLink": "https://graph.microsoft.com/v1.0/users('_TybdcNQAAAgk9AAAA')/$ref",
"calendar@odata.navigationLink": "https://graph.microsoft.com/v1.0/users('alan@abc.com')/calendars('AQMkADAwATNiZmYAZC01N2E2LTYERTxLykaU1e_TybQERTxLykaU1e_TybdcNQAAAgk9AAAA')"
}
],
"@odata.nextLink": "https://graph.microsoft.com/v1.0/me/events?%24top=10&%24skip=10"
}
} - listAllEventstMessage – A message node with the script to display responses for various events.
- Click the Train tab to complete the Dialog task training.
- Click the Talk to Bot icon to test and debug the dialog task.
- Follow the prompts in the VA console to view all events as shown below:
- You can now view events in the Microsoft Graph system.
List All To-Do (Tasks) Lists
Steps to view all to-do lists in the Microsoft Graph integration:
- Refer to the Installing the Microsoft Graph templates section to install this template.
- The List All Todo Lists dialog task is added with the following components:
- listAllToDolists – A user intent to view all to-do lists.
- listAllToDoListService – A bot action service to get all the to do lists and send an an email from an external integration. Click the Plus icon to expand to view the listAllToDoListService bot action component properties.
- In the Component Properties window, to add one or more responses, scroll down and click +Add Response:
Sample Response:
{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users('purushottamkumar1215%40outlook.com')/todo/lists",
"value": [
{
"@odata.etag": "W/\"72QERTxLykaU1e+TybdcNQAAHgSugA==\"",
"displayName": "Tasks",
"isOwner": true,
"isShared": false,
"wellknownListName": "defaultList",
"id": "AQMkADAwATNiZmYAZC01N2E2LTYyZDYtMDACLTAwCgAuAAADiea_kiTHkkGyRB2nztFSRQEA72QERTxLykaU1e_TybdcNQAAAgESAAAA"
},
{
"@odata.etag": "W/\"72QERTxLykaU1e+TybdcNQAAHgSugg==\"",
"displayName": "create List from bot",
"isOwner": true,
"isShared": false,
"wellknownListName": "none",
"id": "AQMkADAwATNiZmYAZC01N2E2LTYyZDYtMDACLTAwCgAuAAADiea_kiTHkkGyRB2nztFSRQEA72QERTxLykaU1e_TybdcNQAAAAe9TR8AAAA="
},
{
"@odata.etag": "W/\"72QERTxLykaU1e+TybdcNQAAHgSuhA==\"",
"displayName": "myList1",
"isOwner": true,
"isShared": false,
"wellknownListName": "none",
"id": "AQMkADAwATNiZmYAZC01N2E2LTYyZDYtMDACLTAwCgAuAAADiea_kiTHkkGyRB2nztFSRQEA72QERTxLykaU1e_TybdcNQAAAAe9TSAAAAA="
},
{
"@odata.etag": "W/\"72QERTxLykaU1e+TybdcNQAAHgSuhg==\"",
"displayName": "Postman created list",
"isOwner": true,
"isShared": false,
"wellknownListName": "none",
"id": "AQMkADAwATNiZmYAZC01N2E2LTYyZDYtMDACLTAwCgAuAAADiea_kiTHkkGyRB2nztFSRQEA72QERTxLykaU1e_TybdcNQAAAmBlAAAA"
},
{
"@odata.etag": "W/\"72QERTxLykaU1e+TybdcNQAAHgSuiA==\"",
"displayName": "Postman created list3",
"isOwner": true,
"isShared": false,
"wellknownListName": "none",
"id": "AQMkADAwATNiZmYAZC01N2E2LTYyZDYtMDACLTAwCgAuAAADiea_kiTHkkGyRB2nztFSRQEA72QERTxLykaU1e_TybdcNQAAAAe9TR4AAAA="
},
{
"@odata.etag": "W/\"72QERTxLykaU1e+TybdcNQAAHgSuig==\"",
"displayName": "Task11",
"isOwner": true,
"isShared": false,
"wellknownListName": "none",
"id": "AQMkADAwATNiZmYAZC01N2E2LTYyZDYtMDACLTAwCgAuAAADiea_kiTHkkGyRB2nztFSRQEA72QERTxLykaU1e_TybdcNQAAAmBkAAAA"
},
{
"@odata.etag": "W/\"72QERTxLykaU1e+TybdcNQAAAAAh3w==\"",
"displayName": "Flagged Emails",
"isOwner": true,
"isShared": false,
"wellknownListName": "flaggedEmails",
"id": "AQMkADAwATNiZmYAZC01N2E2LTYyZDYtMDACLTAwCgAuAAADiea_kiTHkkGyRB2nztFSRQEA72QERTxLykaU1e_TybdcNQAAAmBhAAAA"
}
] - listAllTodoListsMessage – A message node with script to display responses for various to-do lists.
- Click the Train tab to complete the Dialog task training.
- Click the Talk to Bot icon to test and debug the dialog task.
- Follow the prompts in the VA console to view all to-do lists as shown below.
- You can now view all to-do lists in the Microsoft Graph system.
Create an Event
Steps to create an event in the Microsoft Graph integration:
- Refer to the Installing the Microsoft Graph templates section to install this template.
- The Create an Event dialog task is added with the following components:
- createEvent– A user intent to create an event.
- eventSubject, startDate, startTime, endDate, endTime, and attendeesEmailAddresses – Entity nodes for gathering the required event details
- getMailboxSettingsService – A bot action service to fetch information about the mailbox and user’s time zone from an external integration. Click the Plus icon to expand to view the getMailboxSettingsService bot action component properties.
- entityFormatterScript – A script to format all email entities of event attendees.
- createEventService – A bot action service to create an event in an external integration. Click the Plus icon to expand to view the createEventService bot action component properties.
- In the Component Properties window, click Edit Request to modify the request parameters.
Sample Request
{
"subject": "My event 1",
"start": {
"dateTime": "2022-11-09T11:45",
"timeZone": "India Standard Time"
},
"end": {
"dateTime": "2022-11-09T11:50",
"timeZone": "India Standard Time"
},
"attendees": [
{
"emailAddress": {
"address": "purushottam.kumar@gmail.com"
}
}
] }
To add one or more responses, scroll down and click +Add Response.
{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users('purushottamKumar1215%40outlook.com')/events/$entity",
"@odata.etag": "W/\"72QERTxLykaU1e+TybdcNQAAKxxx==\"",
"id": "AQMkADAwATNiZmYAZC01N2E2LTYyZDYtMDACLTAwCgBGAAADiea_kiTHkkGyRB2nztFSRQcA72QERTxLykaU1e_=",
"createdDateTime": "2022-12-28T14:53:39.8527171Z",
"lastModifiedDateTime": "2022-12-28T14:53:40.5291771Z",
"changeKey": "72QERTxLykaU1e+Tybdcxxxxxxxx==",
"categories": [],
"transactionId": null,
"originalStartTimeZone": "India Standard Time",
"originalEndTimeZone": "India Standard Time",
"iCalUId": "040000008200E00074C5B7101A82E008000000001D9B0A2CCC1AD901000000000000",
"reminderMinutesBeforeStart": 15,
"isReminderOn": true,
"hasAttachments": false,
"subject": "My event 1",
"bodyPreview": "",
"importance": "normal",
"sensitivity": "normal",
"isAllDay": false,
"isCancelled": false,
"isOrganizer": true,
"responseRequested": true,
"seriesMasterId": null,
"showAs": "busy",
"type": "singleInstance",
"webLink": "https://outlook.live.com/owa/?itemid=AQMkADAwATNiZmYAZC01N2E2LTYyZDYtpath=/calendar/item",
"onlineMeetingUrl": null,
"isOnlineMeeting": false,
"onlineMeetingProvider": "unknown",
"allowNewTimeProposals": true,
"occurrenceId": null,
"isDraft": false,
"hideAttendees": false,
"responseStatus": {
"response": "organizer",
"time": "0001-01-01T00:00:00Z"
},
"body": {
"contentType": "html",
"content": "
},
"start": {
"dateTime": "2022-11-09T11:45:00.0000000",
"timeZone": "India Standard Time"
},
"end": {
"dateTime": "2022-11-09T11:50:00.0000000",
"timeZone": "India Standard Time"
},
"location": {
"displayName": "",
"locationType": "default",
"uniqueIdType": "unknown",
"address": {},
"coordinates": {}
},
"locations": [],
"recurrence": null,
"attendees": [
{
"type": "required",
"status": {
"response": "none",
"time": "0001-01-01T00:00:00Z"
},
"emailAddress": {
"name": "alanr@abc.com",
"address": "alan@abc.com"
}
}
],
"organizer": {
"emailAddress": {
"name": "Alan Smith",
"address": "alan@outlook.com"
}
},
"onlineMeeting": null
} - createEventMessage – A message node with the script to display responses to create events.
- Click the Train tab to complete the Dialog task training.
- Click the Talk to Bot icon to test and debug the dialog task.
- Follow the prompts in the VA console to create an event as shown below.
- You can now view this event in the Microsoft Graph system.
Create a To-do (Tasks) List
Steps to create a to-do list in the Microsoft Graph integration:
- Refer to the Installing the Microsoft Graph templates section to install this template.
- The create a todo list dialog task is added with the following components:
- createTodolist – A user intent to create a task list.
- listName – An entity node to gather the name of the todo list.
- createTodolistService – A bot action service to create a todo list in an external integration. Click the Plus icon to expand to view the createTodoListService bot action component properties.
- In the Component Properties window, click the Edit Request link to edit the request parameters as shown below.
Sample Request
{
"displayName": "Postman created list3"
}To add one or more responses, scroll down and click +Add Response.
Sample Response
{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users('purushottamkumar1215%40outlook.com')/todo/lists/$entity",
"@odata.etag": "W/\"72QERTxLykaU1e+Tybdcxsxxxxx==\"",
"displayName": "Postman created list3 (1)",
"isOwner": true,
"isShared": false,
"wellknownListName": "none",
"id": "AQMkADAwATNiZmYAZC01N2E2LTYyZDYtMDACLTAwCgAuAAADiea_kiTHkkGyRB2nztFSRQEA72QERTxLykaU1e_A="
}
- createTodolistMessage – A message node with the script to display responses to create to-do lists.
- Click the Train tab to complete the Dialog task training.
- Click the Talk to Bot icon to test and debug the dialog task.
- Follow the prompts in the VA console to create a todo list as shown below.
- You can now view this todo list in the Microsoft Graph system.
Send an Email
Steps to send email from the Microsoft Graph integration:
- Refer to the Installing the Microsoft Graph templates section to install this template.
- The Send email dialog task is added with the following components:
- sendEmail -: A user intent to send an email.
- mailSubject, mailContent, and receipentsEmailAddresses– Entity nodes for sending the email to users.
- prepareEmailIdsScript – A bot action service to fetch email ID in an external integration.
- sendEmailService – A bot action service to send email from an external integration. Click the Plus icon to expand to view the sendEmailService bot action component properties.
- In the Component Properties window, click the Edit Request link to modify the request parameters as shown below:
Sample Request
{
"message": {
"subject": "Testing MS graph",
"body": {
"contentType": "Text",
"content": "Integration is working fine"
},
"toRecipients": [
{
"emailAddress": {
"address": "alan@abc.com"
}
},
{
"emailAddress": {
"address": "john@abc.com"
}
}
] }
} - sendMailMessage– A message node with the script to display responses to send emails.
- Click the Train tab to complete the Dialog task training.
- Click the Talk to Bot icon to test and debug the dialog task.
- Follow the prompts in the VA console to send an email, as shown below.