Office365 Exchange - Custom App
Last updated
Was this helpful?
Last updated
Was this helpful?
This document will demonstrate how easy it is to integrate Office 365 Exchange to the ixHello platform, create methods to pull data, and publish to Lex to test the Apps.
The first and foremost prerequisite for a Microsoft Office365 Exchange App is to get an Azure Subscription. Please follow this document for .
In Azure, you will need to add some Office 365 exchange permissions. To give these permissions, click on the Add a permission button.
Click on the Microsoft Graph button option at top.
Click on the Delegated permissions button option. You will be able to see the list of permissions that you can give to your registered application.
Use the Select permissions field to narrow your search. Add the following permissions: Calendars.ReadWrite.Shared Mail.ReadWrite Notes.ReadWrite.All Notes.ReadWrite.All offline_access People.Read
Click on the Add permissions button to complete the permission as shown in picture below:
At the end, the permissions should look similar to:
For authentication, you have to provide a redirect URL where Office 365 resides. Click on Authentication in the left menu. Then click Add a platform, Select Web in Configure platforms section.
Provide the following URL to ixHello as Redirect URL, so that Office365 can redirect to ixHello after the authentication is done: https://bots.ixhello.com/OAuthCode/Redirect
Once the platform is added, you should see redirect URIs as below:
Now you have successfully configured App on Azure.
To be able to connect to Office365 from the ixHello platform, one application registration is required, and the user should have permissions to view and execute Office365 functions. Once the application registration is successful, you can copy the information as described in the steps below:
User will need to visit the newly created application and note the following information as highlighted with red marker. The Application ID and Tenant ID can be found inside the red contour.
On the left navigation menu, click Certificates & Secrets. Click on New client secret:
A popup will appear. Fill-in the necessary information as shown and press Next:
App expiration can be customized as shown below:
After user clicks Add, the application secret will appear as shown below. Copy the value and store it in a safe location. This information can only be seen once. If this value is lost, it will be necessary to create a new secret.
User should now have Client ID, Tenant ID, and Client Secret.
To proceed with these steps, you should have all the pre-requisites satisfied. If you are missing something, please go back and make sure you satisfy all of them.
Once done, you are ready to get started using ixHello platform with Office 365 Exchange.
The following shows the general steps/activities that will be carried out in setting up this integration. Note: It is advisable to use same E-Mail for signup across the 3 channels below. Step 1 -3 below are compulsory.
Sign up for ixHello account
Set up connection to Office 365 Exchange
Create a custom App in ixHello
Publish the App
Test the Lex App
Click on the Studio Mode link at the top of the page:
Studio Mode opens:
Browse to: Integration > Connect System as shown below. Click Add New Connection.
From the dropdown list, select Microsoft Office365 Exchange and press Next
Click on Connect to Office365
A Configuration page appears:
You will be redirected to the Microsoft login screen. Enter your Microsoft Office 365 login credentials.
Microsoft Office 365 will confirm your acceptance to allow SmartOffice connect to your Microsoft Office 365 Platform. Click Allow.
You will be redirected to the SmartOffice integration confirmation page
You have successfully configured SmartOffice integration to Microsoft Office 365. Now, you have successfully integrated Office 365 Exchange with the ixHello platform. Now, you may click on Return to Integration Configuration button to come back to the connections page. You should see Microsoft Office 365 Exchange in the list as shown below.
To create an app, browse to Apps > Custom Apps and click on New Custom App, you should see a small popup screen as shown below.
Provide following details in the pop-up form.
Name: ixHello Exchange 2025
Custom App Type: Search
Category: Default
Click: Save.
You should see a screen as shown below:
A Data Source connects the app with the integration. Once you have an App created, click on the ixHello Exchange 2025 name to open the App properties page. Open the Data Sources tab and click on Create New Data Source.
A popup screen appears:
Add DataSource by doing the following:
Name: Office Exchange DS
Integration Configuration: Select Microsoft Office365 Exchange: SharePoint Portal (created in Step 4)
Methods allows you to interact with Office 365 Exchange data.
As of the publication date of this document, ixHello supports following Office 365 methods:
Read Emails
Read Emails from Email Addresses
Send Email
Search Messages
Get All Calendars
Get Calendar by Date Range
Search Contact by Name
Get my Notebook
Create Notebook
Depending on your requirement, you will have to use an appropriate method. This document will explain one method with an example and rest of methods will be on the appendix section.
Let’s start with a use case.
You want to fetch emails from your Office 365 inbox. For this, you can use the ReadEmails method as explained below.
To create a new method, click on the Methods tab and press Manage Data Sources.
Press Create New Method
Select or enter the following in Method Inputs, Method Output, and Method Result tabs respectively.
a. Name: ReadEmailMethod
b. Request Type: ReadEmails
c. Result Type: ListOfRecords
d. Record JsonPath: $.value[*]
e. Valid Result Template: Here are your last few emails in your inbox: {{Records}}
f. Empty Result Template: I could not find any emails in your inbox
g. Record Template: {{subject}}
Click on Save & Test after filling the above details.
You have to check the Test Result section to confirm if the integration with Office365 Exchange is successful and if the method build is correct.
Following screens demonstrate a successful method. If you are not getting the following results, there might be something missing in your app build. You might also want to test your integration configuration first.
In the top menu tabs, select Intents and Create New Intent.
Provide the following details and Click on Save.
Name: ReadEmailIntent
Intent Type: Search
Intent Action: Execute Method
DataSource: ixHello Exchange DS
DataSource Method: ReadEmailMethod
Slots are required when methods have parameters. Since, this method does not have any parameter, we can skip this step.
In the top menu tabs, select Utterance and select Create New Utterance. Make sure that the selected Intent is the one we created in previous step. We are creating utterance to invoke the particular intent. Hence, we need to make sure that the correct intent is being selected.
Utterance are words spoken to launch specific intents. Now input or select the following:
Value: Read my email
Custom App: ixHello Exchange 2025
Intent: ReadEmailIntent
Click: Save
In the top menu tabs, select Input and select Create New Input.
The Add New Custom Input screen opens:
Then input or select the following:
Name: ReadEmailInput
Description: Read contents of emails
Custom App: ixHello Exchange 2025
Custom Intent: ReadEmailIntent
Data Source: ixHello Exchange DS
Data Source Method: ReadEmailMethod
ixHello supports publishing to number of channels like Amazon Alexa, Amazon Lex, Teams, Slack etc. We will be publishing to Amazon Lex V2 for this document.
To publish to Lex, select Publish in the top menu tabs then click Add App Publishing.
In the Add App Publishing window, add an App Description, App Type, Channel, Lex Version, and press Save.
External App Name: ixHelloExchange 2025
Description: Use Office Exchange to read emails
App Type: Search
Channel: Lex
Version: V2
Auto Publish: Unselected
Messages: These fields shall be automatically populated and are used to greet and guide the user. You can modify it as per your interest as well
Optional: Replace all placeholder values in all “Message”. Uncheck all the settings shown in the second image below.
Click: Save.
The App Publishing page reappears with a listing for the new App. Press the ellipses on the far right side and select Publish to Lex.
The Publish app to Amazon Lex V2 screen appears. From the Select Amazon Lex Account dropdown, choose the Lex integration you will use. Press Publish To Lex V2.
Selected App: ixHello Exchange 2025
Select Amazon Account: Select the LWA account setup by your admin or one you set up earlier
If everything is correct, you will see the Publishing Status with all green checkmarks:
If not successful, return to the App to fix any issue shown in publishing result. If successful, press Test Lex Bot.
To test the app using the Lex simulator, click Test Lex Bot.
A test window will open.
Type Read my email, and the console should show some emails from your inbox.
Congratulations! You have successfully completed building a Custom App and publishing to Lex.
.
.
Ensure you Login with Amazon (LWA) account is setup by your admin. If you are the account admin, you can follow this instruction to set it up.
Login to the ixHello portal at