Connect to Outlook Desktop Application
Connects to the Outlook desktop application.
Migrating to Microsoft™ Outlook web
Following this command's deprecation on version 23.0.10, you need to migrate all your bots and resources that connect to the Microsoft™ Outlook desktop application to the Microsoft™ Outlook web version. See the following procedure to migrate your existing scripts:
- Add a connection to the Microsot™ Outlook Email application. Refer to Adding connections to an application for further instructions.
- Check your published scripts for the deprecated
outlookConnect
command, and replace it with the Connect to Microsoft™ Outlook (microsoftMailConnect
) command. - In the command's input parameter, select the connection that was created in step 1.
- In the command's output parameter, you can use the same Email connection variable used before or create a new one.
- Click Save.
- Save and publish the script.
Command availability: IBM RPA SaaS and IBM RPA on premises
Description
Connects to the Outlook desktop application and stores the established connection in a variable.
Script syntax
IBM RPA's proprietary script language has a syntax similar to other programming languages. The script syntax defines the command's syntax in the script file. You can work with this syntax in IBM RPA Studio's Script mode.
outlookConnect --mailusername(String) [--mailpassword(String)] [--enableLog(Boolean)] (EmailConnection)=value
Dependencies
- The Outlook desktop application must be installed and running so the connection can be established.
- If you want to access shared mailboxes that the connection's account have access to, you must use the Apply search filters (
emailapplysearchfilter
) command and enter the shared mailbox email in aList<text>
variable in theSearch in Mailboxes (N/A for IMAP)
parameter. - Ensure that you have installed the 64-bit version of the Outlook application.
Input parameters
The following table displays the list of input parameters available in this command. In the table, you can see the parameter name when working in IBM RPA Studio's Script mode and its Designer mode equivalent label.
Designer mode label | Script mode name | Required | Accepted variable types | Description |
---|---|---|---|---|
mailusername |
Required |
Text |
Email address to connect to the desktop application. | |
Password | mailpassword |
Optional |
Text |
Password of the email address to use for the connection. |
Enable log | enableLog |
Optional |
Boolean |
Enables protocol logging, if available. The log file is stored in the %localappdata%\IBM Robotic Process Automation directory. |
Output parameters
Designer mode label | Script mode name | Accepted variable types | Description |
---|---|---|---|
Connection | value |
Email Connection |
Collection containing all messages from the account's email boxes. |
Example
Connects to the Outlook desktop application.
defVar --name emailConnection --type EmailConnection
outlookConnect --mailusername "useremail@email.com" --mailpassword userpassword --enableLogemailConnection=value
emailDisconnect --connection ${emailConnection}
// Connects to an Outlook desktop application and ends the connection.
Limitations
- The command fails if the Outlook desktop application is closed.
- The command might not work properly if you are using a 32-bit version of Outlook desktop application.