# Office365 Exchange - Custom App

### Objective <a href="#toc65659001" id="toc65659001"></a>

This document will demonstrate how easy it is to integrate Office 365 Exchange to the iX Hello platform, create methods to pull data, and publish to Lex to test the Apps.

### Pre-requisites - Azure Subscription <a href="#toc65659002" id="toc65659002"></a>

The first and foremost prerequisite for a Microsoft Office365 Exchange App is to get an Azure Subscription. Please follow this document for [MicrosoftOffice365 Integration](https://docs.ixhello.com/ixhc/connections/microsoft-office365-integration-guide).

1. In Azure, you will need to add some Office 365 exchange permissions. To give these permissions, click on the **Add a permission** button.

<figure><img src="https://1107164708-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M8XHvUsfyTUFLvToHqD%2Fuploads%2FtcyTAvvYu1Cb4Bq2fVgd%2Faddpermission.png?alt=media&#x26;token=772ccae6-8c86-40a8-9cbf-2fa6c2058b90" alt=""><figcaption></figcaption></figure>

2. Click on the **Microsoft Graph** button option at top.

<div align="center"><figure><img src="https://1107164708-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M8XHvUsfyTUFLvToHqD%2Fuploads%2FQbEVV91UPdoyebAvvoQv%2Fazure.png?alt=media&#x26;token=ae5819c6-cd67-4faf-a124-2edc616b3c79" alt=""><figcaption></figcaption></figure></div>

3. 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.

<div align="left"><figure><img src="https://1107164708-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M8XHvUsfyTUFLvToHqD%2Fuploads%2FuDXGTRsARD18itp5tk1s%2Fdelegatedpositions.png?alt=media&#x26;token=fa1da365-1661-4256-ae73-ce716a04e3a5" alt=""><figcaption></figcaption></figure></div>

4. Use the Select permissions field to narrow your search. Add the following permissions:     \
   &#x20;    Calendars.ReadWrite.Shared\
   &#x20;    Mail.ReadWrite\
   &#x20;    Notes.ReadWrite.All\
   &#x20;    Notes.ReadWrite.All\
   &#x20;    offline\_access \
   &#x20;    People.Read<br>
5. Click on the **Add permissions** button to complete the permission as shown in picture below:

   <figure><img src="https://1107164708-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M8XHvUsfyTUFLvToHqD%2Fuploads%2FZ8DglHuqXLMvUFa1kuUe%2Fspaces00.png?alt=media&#x26;token=5eae775f-9d48-49ad-b69f-adaaa50b87e6" alt=""><figcaption></figcaption></figure>
6. At the end, the permissions should look similar to:

<figure><img src="https://1107164708-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M8XHvUsfyTUFLvToHqD%2Fuploads%2Fle42CNKmsOipYuAd9tMd%2F6lists.png?alt=media&#x26;token=845be62d-a428-4cbe-9abb-d7eac727a2be" alt=""><figcaption></figcaption></figure>

7. 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.&#x20;

<figure><img src="https://1107164708-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M8XHvUsfyTUFLvToHqD%2Fuploads%2F5mQ5bEvJdtOrnYVMMvYA%2FyuorAppName.png?alt=media&#x26;token=0a266e80-796f-4d8f-9e64-044538092cc5" alt=""><figcaption></figcaption></figure>

8. Provide the following URL to iX Hello as Redirect URL, so that Office365 can redirect to iX Hello after the authentication is done: **<https://bots.ixhello.com/OAuthCode/Redirect>**

<div align="center"><figure><img src="https://1107164708-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M8XHvUsfyTUFLvToHqD%2Fuploads%2Fq1SfN8BBjWwXAMRGuOEn%2FConfigureWeb.png?alt=media&#x26;token=a0d7d376-5bcc-4556-b6a8-c6f914585339" alt=""><figcaption></figcaption></figure></div>

9. Once the platform is added, you should see redirect URIs as below:

<figure><img src="https://1107164708-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M8XHvUsfyTUFLvToHqD%2Fuploads%2F2Vkl1riicVVYDx8MA9x9%2FREdirectURIList.png?alt=media&#x26;token=aeb74d94-3f75-4550-afb5-0c481500355d" alt=""><figcaption></figcaption></figure>

Now you have successfully configured App on Azure.&#x20;

## Application (Client) ID, Tenant ID, Client Secret, Permissions & Authentication

1. To be able to connect to Office365 from the iX Hello 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:
2. 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.

<figure><img src="https://1107164708-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M8XHvUsfyTUFLvToHqD%2Fuploads%2FHMZzVd1fbC5R5qU6SaIM%2FHomeAppRegO365.png?alt=media&#x26;token=ced8a372-5d1c-4b3f-856d-c9d466a9ac4c" alt="" width="563"><figcaption></figcaption></figure>

3. On the left navigation menu, click **Certificates & Secrets**. Click on **New client secret**:

<figure><img src="https://1107164708-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M8XHvUsfyTUFLvToHqD%2Fuploads%2F5Djka4Pi8envHdqV7dwg%2Fimage.png?alt=media&#x26;token=2c4ac6a6-87bf-4cef-986c-f14f62381e70" alt=""><figcaption></figcaption></figure>

4. A popup will appear. Fill-in the necessary information as shown and press **Next**:\ <br>

   <figure><img src="https://1107164708-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M8XHvUsfyTUFLvToHqD%2Fuploads%2FsxsD8s3Dm8oQfi726n4m%2FCertificatesAndSecrets.png?alt=media&#x26;token=abb653ed-23c7-4605-99ea-71898b6fa40d" alt=""><figcaption></figcaption></figure>
5. App expiration can be customized as shown below:\ <br>

   <div align="center"><figure><img src="https://1107164708-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M8XHvUsfyTUFLvToHqD%2Fuploads%2F6Ppv7NBMOIukNvzt4ShQ%2FADnewClientSecret.png?alt=media&#x26;token=57fb5f38-a8e9-4b78-986a-72352e9385a9" alt=""><figcaption></figcaption></figure></div>
6. 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.\ <br>

   <figure><img src="https://1107164708-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M8XHvUsfyTUFLvToHqD%2Fuploads%2FHDbgaTGevzLnRz2FJBKa%2FNewClientSecret33.png?alt=media&#x26;token=53ace14b-8b90-4067-ae8b-1ddf8ad33693" alt=""><figcaption></figcaption></figure>
7. User should now have Client ID, Tenant ID, and Client Secret.

### Connecting with iX Hello <a href="#toc65659003" id="toc65659003"></a>

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 iX Hello 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.

1. [Sign Up for Amazon Web Services](https://signin.aws.amazon.com/signin?redirect_uri=https%3A%2F%2Fus-east-2.console.aws.amazon.com%2Fconsole%2Fhome%3Fregion%3Dus-east-2%26state%3DhashArgs%2523%26isauthcode%3Dtrue\&client_id=arn%3Aaws%3Aiam%3A%3A015428540659%3Auser%2Fhomepage\&forceMobileApp=0\&code_challenge=9nNXzyrNIGZEa88E12gdwP_z_GcXjUlexn0VjUc6Z_s\&code_challenge_method=SHA-256).
2. [Sign up for Lex developer account](https://signin.aws.amazon.com/signin?redirect_uri=https%3A%2F%2Fus-east-2.console.aws.amazon.com%2Fconsole%2Fhome%3Fregion%3Dus-east-2%26state%3DhashArgs%2523%26isauthcode%3Dtrue\&client_id=arn%3Aaws%3Aiam%3A%3A015428540659%3Auser%2Fhomepage\&forceMobileApp=0\&code_challenge=9nNXzyrNIGZEa88E12gdwP_z_GcXjUlexn0VjUc6Z_s\&code_challenge_method=SHA-256).
3. Sign up for iX Hello account&#x20;
4. Ensure you Login with Amazon (LWA) [https://developer.amazon.com/amazon lex/console/ask](https://console.aws.amazon.com) account is setup by your admin. If you are the account admin, you can follow this instruction to set it up.
5. Set up connection to Office 365 Exchange
6. Create a custom App in iX Hello
7. Publish the App
8. Test the Lex App

### Setup connection to Office 365 Exchange <a href="#toc65659004" id="toc65659004"></a>

1. Login to the iX Hello portal at <https://bots.ixhello.com>
2. Click on the Studio Mode link at the top of the page:

<figure><img src="https://1107164708-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M8XHvUsfyTUFLvToHqD%2Fuploads%2F2AZe9LIjJYLMjCLjYyri%2Frebar.png?alt=media&#x26;token=9957d82f-3d25-4c5d-bec1-f0e9809bdc89" alt=""><figcaption></figcaption></figure>

3. Studio Mode opens:

<figure><img src="https://1107164708-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M8XHvUsfyTUFLvToHqD%2Fuploads%2F6cq2hbedSzPEFxK3Bg7P%2Fsuitandtie.png?alt=media&#x26;token=e93968e9-a8a5-49cd-9c32-3af0016bfbf1" alt=""><figcaption></figcaption></figure>

4. Browse to: **Integration** > **Connect System** as shown below. Click **Add New Connection**.

<figure><img src="https://1107164708-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M8XHvUsfyTUFLvToHqD%2Fuploads%2FkPLjKDAJ5KBm16IQTFhY%2Fonetwo.png?alt=media&#x26;token=b4f28a11-58b0-40a6-a091-4e3ed108c175" alt=""><figcaption></figcaption></figure>

5. From the dropdown list, select **Microsoft Office365 Exchange** and press **Next**

<figure><img src="https://1107164708-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M8XHvUsfyTUFLvToHqD%2Fuploads%2FLKV8M63NWo93nXixnVoZ%2Fdropdown.png?alt=media&#x26;token=420b91e2-8e94-4e41-be52-22f93e72d2e6" alt=""><figcaption></figcaption></figure>

6. Click on **Connect to Office365**

<figure><img src="https://1107164708-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M8XHvUsfyTUFLvToHqD%2Fuploads%2Fn8mQiPAheKle1dFeEpfL%2FConnecttoOffice365.png?alt=media&#x26;token=f32b073f-f54c-4ecb-9f50-cb9ee066e125" alt=""><figcaption></figcaption></figure>

7. A Configuration page appears:

<div align="left"><figure><img src="https://1107164708-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M8XHvUsfyTUFLvToHqD%2Fuploads%2FUTCWqThnN0v5863a94Us%2Fdeltadawn.png?alt=media&#x26;token=20625334-0550-4bda-9cbc-1bc71abc9e4f" alt="" width="563"><figcaption></figcaption></figure></div>

3. You will be redirected to the Microsoft login screen. Enter your Microsoft Office 365 login credentials.

<div align="center"><img src="https://1107164708-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M8XHvUsfyTUFLvToHqD%2Fuploads%2FBc4kgeu9jwDPaDAX2Gat%2F8?alt=media" alt="" width="375"></div>

4. Microsoft Office 365 will confirm your acceptance to allow SmartOffice connect to your Microsoft Office 365 Platform. Click **Allow**.
5. You will be redirected to the SmartOffice integration confirmation page

<figure><img src="https://1107164708-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M8XHvUsfyTUFLvToHqD%2Fuploads%2FlbYqGikRWEVkHtvtzyYP%2F9?alt=media" alt=""><figcaption></figcaption></figure>

6. You have successfully configured SmartOffice integration to Microsoft Office 365. Now, you have successfully integrated Office 365 Exchange with the iX Hello 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.

<figure><img src="https://1107164708-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M8XHvUsfyTUFLvToHqD%2Fuploads%2F90DdfDB3XHvjjALM4PGS%2FMyConnection.png?alt=media&#x26;token=460f94f2-6f4b-4b3b-9b79-19f7b29abaf5" alt=""><figcaption></figcaption></figure>

### Create a custom App in iX Hello <a href="#toc65659005" id="toc65659005"></a>

1. 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.

<div align="center"><figure><img src="https://1107164708-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M8XHvUsfyTUFLvToHqD%2Fuploads%2FYQwTOO8LJDY5xwUKtHsP%2FAddCustomAppOffice365.png?alt=media&#x26;token=e25ade2d-47f6-4914-91dc-b62605f672cd" alt="" width="375"><figcaption></figcaption></figure></div>

Provide following details in the pop-up form.

**Name:** iX Hello Exchange 2025

**Custom App Type**: Search

**Category**: Default

**Click**: Save.

You should see a screen as shown below:

<figure><img src="https://1107164708-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M8XHvUsfyTUFLvToHqD%2Fuploads%2F29tcnqDiL5TjfW1NXVTf%2FixHelloExchange2025.png?alt=media&#x26;token=941c4646-fafc-4c0e-a581-8d99ba4db237" alt=""><figcaption></figcaption></figure>

## Creating a Data Source <a href="#toc46273070" id="toc46273070"></a>

A Data Source connects the app with the integration. Once you have an App created, click on the iX Hello Exchange 2025 name to open the App properties page. Open the **Data Sources** tab and click on **Create New Data Source**.

<figure><img src="https://1107164708-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M8XHvUsfyTUFLvToHqD%2Fuploads%2FraSUY8TK9uFatykNiopH%2FCreateNewDataSource.png?alt=media&#x26;token=e3c7e4f3-5b3f-436e-aea4-9280ac83102c" alt=""><figcaption></figcaption></figure>

A popup screen appears:

<figure><img src="https://1107164708-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M8XHvUsfyTUFLvToHqD%2Fuploads%2FyPuaKC9JBlTlhRxVeVld%2FNewExchangenotSharepoint.png?alt=media&#x26;token=452192ef-481b-470b-b02e-cedd37a155ce" alt=""><figcaption></figcaption></figure>

Add DataSource by doing the following:

**Name:** Office Exchange DS

**Integration Configuration:** Select Microsoft Office365 Exchange: SharePoint Portal (created in Step 4)

### Create Methods to fetch the data from Office 365 Exchange <a href="#toc65659007" id="toc65659007"></a>

Methods allows you to interact with Office 365 Exchange data.

As of the publication date of this document, iX Hello supports following Office 365 methods:

1. Read Emails
2. Read Emails from Email Addresses
3. Send Email
4. Search Messages
5. Get All Calendars
6. Get Calendar by Date Range
7. Search Contact by Name
8. Get my Notebook
9. 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.

### **Scenario/Use Case (Read Emails):** <a href="#toc65659008" id="toc65659008"></a>

You want to fetch emails from your Office 365 inbox. For this, you can use the *ReadEmails* method as explained below.

1. To create a new method, click on the **Methods** tab and press **Manage Data Sources**.

<figure><img src="https://1107164708-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M8XHvUsfyTUFLvToHqD%2Fuploads%2FgkpRkSS6AoaarUbfmYmV%2FmanageDataSources.png?alt=media&#x26;token=9b43b720-0c09-4d4f-800b-93aaa9048e8b" alt=""><figcaption></figcaption></figure>

2. Press **Create New Method**

<figure><img src="https://1107164708-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M8XHvUsfyTUFLvToHqD%2Fuploads%2Ffq5fbq3KMgGRihmsMhzu%2FCreateNewMethod66.png?alt=media&#x26;token=22bc6c94-5201-406f-8dfb-7d50468f0aa8" alt=""><figcaption></figcaption></figure>

3. Select or enter the following in **Method Inputs**, **Method Output,** and **Method Result** tabs respectively.

<figure><img src="https://1107164708-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M8XHvUsfyTUFLvToHqD%2Fuploads%2FH87Agz9JALfE1zqAKVgj%2FNewMethod.png?alt=media&#x26;token=4f6ae69e-cd97-4213-bd9a-aafd9b4463bf" alt=""><figcaption></figcaption></figure>

&#x20;    **a. Name**: ReadEmailMethod

&#x20;    **b. Request Type**: ReadEmails

<figure><img src="https://1107164708-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M8XHvUsfyTUFLvToHqD%2Fuploads%2FH87Agz9JALfE1zqAKVgj%2FNewMethod.png?alt=media&#x26;token=4f6ae69e-cd97-4213-bd9a-aafd9b4463bf" alt=""><figcaption></figcaption></figure>

&#x20;  **c. Result Type**: ListOfRecords

<figure><img src="https://1107164708-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M8XHvUsfyTUFLvToHqD%2Fuploads%2FW39y7YMTmxEjeMRU9v4A%2FNewMethod1.png?alt=media&#x26;token=ac1e2340-113a-48d8-a6d6-1b36fcfe44cb" alt=""><figcaption></figcaption></figure>

&#x20;   **d. Record JsonPath:** $.value\[\*]

&#x20;   **e. Valid Result Template:** Here are your last few emails in your inbox: {{Records}}

&#x20;   **f. Empty Result Template:** I could not find any emails in your inbox

&#x20;  **g. Record Template:** {{subject}}

<figure><img src="https://1107164708-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M8XHvUsfyTUFLvToHqD%2Fuploads%2Fw291cEivDQHrH2P7ZljS%2FNewMethod2.png?alt=media&#x26;token=b7477cc8-33e8-4eb7-98d0-58bde85ab81b" alt=""><figcaption></figcaption></figure>

4. 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.

<div align="center"><img src="https://1107164708-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M8XHvUsfyTUFLvToHqD%2Fuploads%2Fs5umBQ2jTpxk4qOjNmZv%2F20?alt=media" alt="" width="563"></div>

### Create Intents <a href="#toc65659009" id="toc65659009"></a>

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

### Create Slots <a href="#toc65659010" id="toc65659010"></a>

Slots are required when methods have parameters. Since, this method does not have any parameter, we can skip this step.

### Create Utterance <a href="#toc65659011" id="toc65659011"></a>

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

### Create Input <a href="#toc65659012" id="toc65659012"></a>

In the top menu tabs, select **Input** and select **Create New Input**.

<figure><img src="https://1107164708-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M8XHvUsfyTUFLvToHqD%2Fuploads%2Fs9n2uHgrUHLcbC06G1Va%2FCreateNewInput12.png?alt=media&#x26;token=dfabc7a0-d8e8-4141-9119-3b92dddb7e10" alt=""><figcaption></figcaption></figure>

The Add New Custom Input screen opens:

<div align="center"><figure><img src="https://1107164708-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M8XHvUsfyTUFLvToHqD%2Fuploads%2FlnQeb0kv7d9v3LuiKFL8%2FNewCustomInput.png?alt=media&#x26;token=ceb586ea-ec62-4662-9562-ad661a92dd7f" alt="" width="375"><figcaption></figcaption></figure></div>

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

### **Publish to Lex** <a href="#toc65659013" id="toc65659013"></a>

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.&#x20;

1. To publish to Lex, select **Publish** in the top menu tabs then click **Add App Publishing**.

<figure><img src="https://1107164708-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M8XHvUsfyTUFLvToHqD%2Fuploads%2FHYYKl5Ev90ANlnQdpGFe%2Fpublishagain.png?alt=media&#x26;token=9161fd17-0ce8-4c67-9551-4fa491a4463a" alt=""><figcaption></figcaption></figure>

2. In the Add App Publishing window, add an App Description, App Type, Channel, Lex Version, and press **Save**.

   <figure><img src="https://1107164708-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M8XHvUsfyTUFLvToHqD%2Fuploads%2FJatPozZeLKnEH2hhafr4%2FEvenNewerLex.png?alt=media&#x26;token=3e971d6a-9c73-4b53-b5cc-fc2fae5ea579" alt=""><figcaption></figcaption></figure>

**External App Name**: ixHelloExchange 2025&#x20;

**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.

3. 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**.

<figure><img src="https://1107164708-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M8XHvUsfyTUFLvToHqD%2Fuploads%2F0Tut6VFfWGgRrxBTcdTZ%2FPublishToLexAgainAgain.png?alt=media&#x26;token=1d0288d1-9ee7-409d-b1c3-4ac6e1afd131" alt=""><figcaption></figcaption></figure>

4. 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**.

<figure><img src="https://1107164708-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M8XHvUsfyTUFLvToHqD%2Fuploads%2F9EDImf9P26WHrnXbhDJC%2FPublishToV2xxyy.png?alt=media&#x26;token=0b24218f-acd9-4b58-be83-fcde81319bb5" alt=""><figcaption></figcaption></figure>

**Selected App**: ixHello Exchange 2025

**Select Amazon Account:** Select the LWA account setup by your admin or one you set up earlier

5. If everything is correct, you will see the Publishing Status with all green checkmarks:

<figure><img src="https://1107164708-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M8XHvUsfyTUFLvToHqD%2Fuploads%2FQTCnjYlNXpNnNH9fB4jM%2FL2Publish.png?alt=media&#x26;token=b6755d54-31ef-4810-9b03-70a774d36e33" alt=""><figcaption></figcaption></figure>

6. If not successful, return to the App to fix any issue shown in publishing result. If successful, press **Test Lex Bot**.

### Test the App using Simulator <a href="#toc43910947" id="toc43910947"></a>

1. To test the app using the Lex simulator, click **Test Lex Bot**.
2. A test window will open.
3. Type **Read my email,** and the console should show some emails from your inbox.

<figure><img src="https://1107164708-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M8XHvUsfyTUFLvToHqD%2Fuploads%2FZsC5fjzy7M49hASnTeM0%2Ftestbot.png?alt=media&#x26;token=9e84b34e-6d4a-4f41-a46a-b425a8078251" alt=""><figcaption></figcaption></figure>

Congratulations! You have successfully completed building a Custom App and publishing to Lex.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ixhello.com/ixhc/apps/office365-exchange-custom-app.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
