Connect to Outlook Desktop Application
Connects to the Outlook desktop application.
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.