Online Documents
English
English
  • First Launch Experience
  • Activate Software License
  • How to Train EMILY?
  • Simple Web Automation
  • Web Automation Tools
  • Web Automation Processor
  • User Fill
  • Workspace Script
  • File Exporter
  • File Enumerator
  • EXCEL Processor
  • EXCEL Analyzer
  • EXCEL Writer
  • EXCEL Filler
  • CSV Creator
  • PowerShell
  • PDF Analyzer
  • Mail Sender
  • Mail Reader
  • Exchange Mail Sender
  • Exchange Mail Reader
  • HTTP Analyzer
  • Command Line
  • DOCX Templater
  • SQL Executor
  • Desktop Automation (DA)
  • SFTP
  • JSON API Server
  • Chart
  • DOCX2HTML
  • Manage Folder
  • Google Drive
  • Google Sheets
  • Google OCR
  • Google NLU
  • Azure Form Recognizer
  • Anti-Captcha
  • ChatGPT
  • Gemini
  • Schedule Trigger
  • Mail Trigger
  • File Trigger
  • API Trigger
  • Protect Text
  • Flexibility & Security
  • Announcements
    • Version Release
    • Third Party Notice
Powered by GitBook
On this page
  • TENANT ID (supports %FILENAME% variables)
  • CLIENT ID (supports %FILENAME% variables)
  • CLIENT SECRET (supports %FILENAME% variables)
  • SIGN IN
  • ACCOUNT
  • MAILBOX
  • SINCE DAY(S) AGO
  • UNREAD ONLY
  • Input Object
  • Output Object
  • API

Exchange Mail Reader

Read Exchange Online emails via IMAP. An account that supports Exchange Online is required

PreviousExchange Mail SenderNextHTTP Analyzer

Last updated 1 month ago

TENANT ID (supports %FILENAME% variables)

Azure Active Directory tenant ID created in Azure Portal:

CLIENT ID (supports %FILENAME% variables)

The unique Application (client) ID is assigned to your app by Microsoft Entra ID when the app is registered. Here's how to register a client ID:

The account type should remain the default Single tenant, the platform setting should be Web, and the URI should be set to http://localhost:3650/callback.

After completing the registration, you can obtain a client ID and then proceed to Add a certificate or secret:

After completing adding the New client secret, copy the value of the client secret:

CLIENT SECRET (supports %FILENAME% variables)

Fill in the client secret mentioned above.

SIGN IN

ACCOUNT

After filling in the TENANT ID, CLIENT ID, and CLIENT SECRET, clicking SIGN IN will open a browser to allow the user to complete the authentication process and automatically fill in the ACCOUNT field.

MAILBOX

Mailbox name.

SINCE DAY(S) AGO

Read emails since how many days ago.

UNREAD ONLY

Choose whether to read unread emails only.

Input Object

Each element in the input object array represents each email read from the specified mailbox:

// Print the subject and sender of each email read
input.forEach((mail) => {
  console.log('from:' + mail.from + ', title:' + mail.subject)
})

Output Object

Each object added to the output array represents a row of data in the output table. The object contains key-value pairs, where the key is the column header, and the value is the data for that column in the row. Once all the data is processed, the table will be output as a .csv file called 'output.csv' in the workspace.

// Output each text field from the read emails to a CSV and save attachment files.
input.forEach((mail) => {
  output.push({
    from: mail.from,
    subject: mail.subject,
    date: mail.date.toLocaleString(),
  })
  
  if (mail.attachments.length > 0) {
    mail.attachments.forEach((att) => {
      api.write(att.filename, att.content)
    })
  }
})

// Specify the header field
output.header.push('from','subject','date')

API

Sychronous APIs are provided: api.files(), api.read(filename, encoding='utf8'), api.write(filename, text), api.rename(oldname, newname), api.remove(filename) to access files in workspace; and asynchronous APIs api.mail.moveto(uid, mailbox) and api.mail.remove(uid) are provided to mange mails.

// find mail with subject containing 'promote'
let mail = _.find(input, (m) => m.subject.includes('promote')

// move the mail to 'Trash' mailbox
await api.mail.moveto(mail.uid, 'Trash')

// find mail with subject containing 'prize'
mail = _.find(input, (m) => m.subject.includes('prize')

// remove the mail
await api.mail.remove(mail.uid)

After pressing the SIGN IN button, Microsoft Account verification will be performed. After successful verification, the user's email account will be automatically filled in, and EMILY.RPA can use this email mailbox. Please note: Microsoft will force the login information to expire 90 days after SIGNing IN, so you need to return to the module interface to log in again every 90 days. Learn more:

We are dedicated to improving our content. Please let us know if you come across any errors, including spelling, grammar, or other mistakes, as your is valuable to us! 🤖️⚡️

https://learn.microsoft.com/en-us/azure/active-directory/develop/configurable-token-lifetimes#refresh-and-session-token-lifetime-policy-properties
feedback