# Listing Emails from an Outlook Folder by Date with the io.Connect Outlook Adapter

**URL:** <https://community.interop.io/t/listing-emails-from-an-outlook-folder-by-date-with-the-io-connect-outlook-adapter/575>\
**Category:** Adapters\
**Tags:** FAQs\
**Created:** [May 5, 2026, 9:26am UTC](https://community.interop.io/t/listing-emails-from-an-outlook-folder-by-date-with-the-io-connect-outlook-adapter/575 "2026-05-05T09:26:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![toni.petrov](https://yyz2.discourse-cdn.com/flex028/user_avatar/community.interop.io/toni.petrov/32/17_2.png) [@toni.petrov](https://community.interop.io/u/toni.petrov)\
**Post date:** [May 5, 2026, 9:26am UTC](https://community.interop.io/t/listing-emails-from-an-outlook-folder-by-date-with-the-io-connect-outlook-adapter/575/1 "2026-05-05T09:26:27Z")

</div>

The io.Connect Outlook Adapter exposes an interop method, `T42.Outlook.AdvancedSearch`. A common use case is listing all emails received in a monitored folder for a given period, for example, when an app starts or restarts and needs to pull in everything received earlier the same day. You can register an interop callback, build a filter string, and invoke `T42.Outlook.AdvancedSearch`. The adapter delivers the search updates to your callback:

### 1. Register a callback to receive search updates

```auto
io.interop.register('onOutlookSearch', console.info)

```

### 2. Define a filter by date received

The example below filters to messages received between the start of today and the current time. It uses the `urn:schemas:httpmail:datereceived` property:

```auto
filter = `"urn:schemas:httpmail:datereceived" >= '${new Date(new Date().setHours(0,0,0,0)).toISOString().slice(0,19).replace("T"," ")}' AND "urn:schemas:httpmail:datereceived" <= '${new Date().toISOString().slice(0,19).replace("T"," ")}'`;

```

If you’d rather avoid inline date, here’s a helper to format a `Date` into the string format Outlook expects:

```auto
function toOutlookDateTimeString(date) {
  const pad = n => n.toString().padStart(2, "0");
  return (
    date.getFullYear() + "-" +
    pad(date.getMonth() + 1) + "-" +
    pad(date.getDate()) + " " +
    pad(date.getHours()) + ":" +
    pad(date.getMinutes()) + ":" +
    pad(date.getSeconds())
  );
}

```

### 3. Invoke the search

```auto
io.interop.invoke("T42.Outlook.AdvancedSearch", {
  itemType: "Mail",
  searchId: "today-mails-or-some-correlation-id",
  scope: "Inbox",
  filter,
  searchSubfolders: false,
  callbackMethod: "onOutlookSearch"
});

```

* * *

Additionally the method `T42.Outlook.GetRootMonitorDetails`, exposes information about the root monitor’s details.

## See also

- [Outlook Adapter — JavaScript guide](https://docs.interop.io/adapters/ms-office/outlook/javascript/index.html)
