Exchange Action

Microsoft Exchange is an enterprise messaging solution that provides improved e-mail security and enhanced operational efficiency for members of the IT staff. The Exchange action contains a variety of activities that one can use to automate the most common operations on Exchange objects, like appointments, contacts, tasks and e-mails. These activities allow you to create, get, move, delete, or modify Exchange objects. This action supports Exchange 2003 which uses the WebDav protocol and Exchange 2007/2010 which uses the EWS (Exchange Web Service) protocol.

The Exchange activities use Microsoft's Exchange engine to perform their work. Because of this, you must have a valid copy of Exchange Server installed in order to use these activities.

See Also: Send E-mail, Get Email, HTTP, FTP, MSMQ, Twitter

Properties Tab

In the Activity to perform box, select an activity, then configure the properties for that activity. The available properties depend on the activity selected.

To set properties

  1. In the Available Actions pane, open the Network folder and double-click the Exchange action or drag it into the Steps pane.

  2. On the Properties tab, select an Activity to perform.

  3. Specify the properties that appear, depending on the activity selected.

  4. To set the Description tab properties, refer to Description Tab Options.

  5. To set the Error Causes and On Error tab properties, refer to Step Error Handling.

  6. When finished, click OK to save settings and close the properties dialog box.

Available Activities

The following table briefly describes the available activities that can be performed on Exchange objects along with the object types supported and some AML examples.

Activity

Description

Supported Object Types

Examples

Create Exchange Object

Creates a new Exchange object. This activity supports creation of a task, appointment or contact.

  • Tasks

  • Appointments

  • Contacts

Example 1 - Create Contact:

<AMEXCHANGE EXCHANGEOBJECTTYPE="Contact" RESULTVARIABLE="theVar" EMAILADDRESS="test.exchange@netauto.com" SERVER="servername.netauto.com" DOMAINNAME="netauto" USERNAME="test.exchange" PASSWORD="AM1/M9fgpoQkU1a9P85M3OojA==aME"><Property Name="First" Value="Peter" /><Property Name="Last" Value="Parker" /><Property Name="Company" Value="Network Automation" /><Property Name="JobTitle" Value="Sales" /><Property Name="Email" Value="pp@netauto.com" /><Property Name="BusinessPhone" Value="323-555-1234" /><Property Name="Street" Value="1234 West St." /><Property Name="City" Value="Los Angeles" /><Property Name="ZIPOrPostalCode" Value="90005" /><Property Name="CountryOrRegion" Value="USA" /></AMEXCHANGE>

Example 2 - Meeting Request:

<AMEXCHANGE EXCHANGEOBJECTTYPE="Appointment" RESULTVARIABLE="a" EMAILADDRESS="test.exchange@networkautomation.com" SERVER="indra.networkautomation.com" DOMAINNAME="netauto" USERNAME="test.exchange" PASSWORD="AM1/M9fgpoQkU1a9P85M3OojA==aME"><Property Name="Subject" Value="BPA" /><Property Name="StartTime" Value="12/8/2008 1:26:41 PM" /><Property Name="EndTime" Value="12/9/2008 2:26:43 PM" /><Property Name="Body" Value="All the new Features" /><Property Name="Location" Value="Scott's Office" /><Property Name="AllDayEvent" Value="true" /><Property Name="Body" Value="Meeting" /><Property Name="RequiredAttendees" Value="mm@netauto.com" /></AMEXCHANGE>

Example 3 - Create Task:

<AMEXCHANGE EXCHANGEOBJECTTYPE="Task" RESULTVARIABLE="theVar" EMAILADDRESS="test.exchange@networkautomation.com" SERVER="indra.networkautomation.com" DOMAINNAME="netauto" USERNAME="test.exchange" PASSWORD="AM1/M9fgpoQkU1a9P85M3OojA==aME"><Property Name="Subject" Value="Complete Monthly Report" /><Property Name="StartDate" Value="12/8/2008 4:00:00 PM" /><Property Name="DueDate" Value="12/8/2008 5:00:00 PM" /><Property Name="Body" Value="Complete Monthly Sales Report " /></AMEXCHANGE>

Delete Exchange Object(s)

Deletes one or more existing Exchange objects of the specified type.

  • Tasks

  • Appointments

  • Contacts

  • E-mails

Example 1 - Delete all appointments

<AMEXCHANGE ACTIVITY="delete" EXCHANGEOBJECTTYPE="Appointment" RESULTDATASET="theDataset" EMAILADDRESS="test.exchange@netauto.com" SERVER="server.netauto.com" DOMAINNAME="netauto" USERNAME="test.exchange" PASSWORD="AM1/M9fgpoQkU1a9P85M3OojA==aME" />

Example 2 - Delete all appointments that contain attachments

<AMEXCHANGE ACTIVITY="delete" EXCHANGEOBJECTTYPE="Appointment" RESULTDATASET="theDataset" EMAILADDRESS="test.exchange@netauto.com" SERVER="server.netauto.com" DOMAINNAME="netauto" USERNAME="test.exchange" PASSWORD="AM1/M9fgpoQkU1a9P85M3OojA==aME"><Property Name="HasAttachments" Value="true" Operator="Equals" /></AMEXCHANGE>

Delete Single Exchange Object

Deletes an individual Exchange object of the specified type.

  • Tasks

  • Appointments

  • Contacts

  • E-mails

Example 1 - Delete single Exchange contact

<AMEXCHANGE ACTIVITY="delete_single" EXCHANGEOBJECTADDRESS="https://domain.com/exchange/Contacts/Contact.Name.EML" EMAILADDRESS="test@netauto.com" SERVER="domain.netauto.com" DOMAINNAME="netauto.com" USERNAME="test" PASSWORD="AM1+D+CW7k/sepW0nRCPDzNcZBWjE8XXD4XaME" />

Example 2 - Delete single Exchange appointment

<AMEXCHANGE ACTIVITY="delete_single" EXCHANGEOBJECTADDRESS="https://domain.com/exchange/Calendar/appointment.Name.EML" EMAILADDRESS="test@netauto.com" SERVER="domain.netauto.com" DOMAINNAME="netauto.com" USERNAME="test" PASSWORD="AM1+D+CW7k/sepW0nRCPDzNcZBWjE8XXD4XaME" />

Get Exchange Object(s)

Retrieves information about one or more Exchange objects and places the results in a dataset.

  •  Tasks

  • Appointments

  • Contacts

  • E-mails

Get exchange object of type Email and populate the dataset name "theDataset" with results. Save attachments to C:\Temp\.

<AMEXCHANGE ACTIVITY="get" EXCHANGEOBJECTTYPE="Email" RESULTDATASET="theDataset" ATTACHMENTDEST="C:\Temp\" SAVEMODE="overwrite" EMAILADDRESS="test.exchange@netauto.com" SERVER="server.netauto.com" DOMAINNAME="netauto" USERNAME="test.exchange" PASSWORD="AM1/M9fgpoQkU1a9P85M3OojA==aME" />

Modify Exchange Object

Alters the properties of an existing Exchange object.

  • Tasks

  • Appointments

  • Contacts

  • E-mails

This sample step modifies the following properties of an appointment object:

  • Location = Conference Room

  • Start Time = 8/23/2010 09:00:00 AM

<AMEXCHANGE ACTIVITY="modify" EXCHANGEOBJECTTYPE="Appointment" EXCHANGEOBJECTADDRESS="https://domain.com/exchange/Calendar/appointment.Name.EML" EMAILADDRESS="test@netauto.com" SERVER="domain.netauto.com" DOMAINNAME="netauto.com" USERNAME="test" PASSWORD="AM1+D+CW7k/sepW0nRCPDzNcZBWjE8XXD4XaME"><Property Name="Location" Value="Conference Room" /><Property Name="StartTime" Value="8/23/2010 09:00:00 AM" /></AMEXCHANGE>

Move Exchange Object(s)

Moves one or more Exchange objects to the folder specified.

  • Tasks

  • Appointments

  • Contacts

  • E-mails

This sample step moves all Exchange objects of type "task" that has a completed date of 08-29-2010 or later to a folder named "My Tasks".

<AMEXCHANGE ACTIVITY="move" EXCHANGEOBJECTTYPE="Task" RESULTDATASET="theDataset" FOLDER="My Tasks" EMAILADDRESS="test@netauto.com" SERVER="domain.netauto.com" DOMAINNAME="netauto.com" USERNAME="test" PASSWORD="AM1+D+CW7k/sepW0nRCPDzNcZBWjE8XXD4XaME"><Property Name="DateCompleted" Value="8/29/2010 12:00:00 AM" Operator="LessThenOrEquals" /></AMEXCHANGE>

Move Single Exchange Object

Moves an individual Exchange object to the folder specified.

  • Tasks

  • Appointments

  • Contacts

  • E-mails

This sample step moves a single Exchange e-mail object. The Exchange object id is "https://domain.com/exchange/mail@netauto.com/Inbox/No%20Subject-38.EML".

<AMEXCHANGE ACTIVITY="move_single" EXCHANGEOBJECTADDRESS="https://domain.com/exchange/mail@netauto.com/Inbox/No%20Subject-38.EML" FOLDER="FolderName" EMAILADDRESS="test@netauto.com" SERVER="domain.netauto.com" DOMAINNAME="netauto.com" USERNAME="test" PASSWORD="AM1+D+CW7k/sepW0nRCPDzNcZBWjE8XXD4XaME" />

General Properties

Property

Type

Required

Default

Markup

Description

Create and populate dataset

Text

No

(Empty)

RESULTDATASET="theDataset"

The dataset to create and populate with information regarding the Exchange object(s) to delete. More about the dataset fields that this activity creates are detailed below.

Destination folder

Text

Yes

(Empty)

FOLDER="folderName"

The destination folder in which to move the desired object(s). Click the provided down arrow to query available Exchange server folders.

Exchange object ID

Text

Yes

(Empty)

EXCHANGEOBJECTADDRESS="https://domain.com/

exchange/mail@netauto.com/Contact/ContactName.EML"

The object ID (Exchange object address or.EML file) of the Exchange object to delete. For example, the object ID of a particular contact would look like similar to:

https://domain.com/exchange/

mail@netauto.com/Contact/ContactName.EML

If filename already exists

Text (options)

No

Do not save

SAVEMODE="overwrite"

Indicates what this activity should do if a file with the same name already exists in the attachment location. The available options are:

  • Do not save (Default)

  • Save with unique file name

  • Overwrite existing file

Populate variable with Exchange object ID

Text

Yes

(Empty)

RESULTVARIABLE="theVar"

The name of an already created variable to populate with the object ID of the newly created Exchange object.

Save attachments

       

If enabled, attachments will be saved to the specified location. This parameter is disabled by default.

Save attachments in folder

Text

Yes if Save attachments is enabled

(Empty)

ATTACHMENTDEST="C:\Temp\"

The folder in which to save attachments to. This parameter is available only if the Save attachments parameter is enabled.

Exchange Properties

Property

Type

Required

Default

Markup

Description

Filter type

       

The filter type to use. This allows you to include/exclude specific items based on the query or custom filter that you set. To delete all instances of the specified object, omit any queries or filters. The available options are:

  • Custom

  • Query

Property

Text

Yes

(Empty)

Name="Subject"

The property name associated to the Exchange object to create. More on Property Name/Value Specifications can be found below.

Operator

Text (options)

No

(Empty)

Operator="Equals"

Built in operators that allow you to filter data. The available options are:

  • Contains

  • Not Contain

  • Equals

  • Less Than

  • Greater Than

  • Less than or equal to

  • Greater than or equal to

Value

Text

Yes

(Empty)

Value="BPA"

The value corresponding to the property name. More on Property Name/Value Specifications can be found below.

Query

Text

No

(Empty)

QUERY="theQuery"

The query to perform. This parameter is available only if the Filter type parameter is set to Query.

Server Properties

Property

Type

Required

Default

Markup

Description

Protocol

Text (options)

Yes

WEBDAV

PROTOCOLTYPE="ews2007"

The Exchange server protocol to communicate with. The available options are:

  • Exchange 2003 (WEBDAV)

  • Exchange 2007 (EWS)

  • Exchange 2010 (EWS)

The WebDav filter is query-based and any filtering on Exchange 2010 in either the Exchange or other email actions (Get Email and Send E-mail) uses the query based approach.  

Email address

Text

Yes

(Empty)

EMAILADDRESS="test@netauto.com"

The e-mail address to perform the selected activity on.

Exchange server

Text

Yes

(Empty)

SERVER="server.domain.com"

The name of the Exchange server to perform the selected activity on.

HTTPS/HTTP

Yes/No

No

HTTPS

USEHTTP="yes"

Indicates whether to use HTTP or HTTPS as the Exchange server protocol type.

Autodiscover service URL

Yes/No

No

No

AUTODISCOVERURL="yes"

If set to YES, turns on Autodiscover service. The Autodiscover service makes it easier to configure Outlook 2007 or Outlook 2010 and some mobile phones by using a user's e-mail address and password to automatically configure a user's profile. This parameter is set to NO by default and only available if the Protocol parameter is set to EWS2007 or EWS2010.

Allow redirection

Yes/No

No

No

ALLOWREDIRECTION="yes"

If set to YES, allows redirection of incoming requests to another file or URL. This parameter is set to NO by default and only available if the Autodiscover service URL parameter is set to YES.

Ignore invalid server certificates

Yes/No

No

No

IGNOREINVALIDCERTIFICATE="yes"

If set to YES, invalid server certificates are ignored. In some cases the SSL certificate may be expired or become invalid and an exception is thrown due to invalid SSL certificate. You may avoid such SSL certificate errors by choosing to ignore invalid server certificates. This parameter is set to NO by default and only available if the Protocol parameter is set to EWS2007 or EWS2010.

Current folder

Text

Yes

(Empty)

CURRENTFOLDER="Contact"

The Exchange folder in which to perform the selected activity on.

Timeout

Number

No

100

TIMEOUT="120"

The total amount of time in seconds that this activity should be allowed to execute before a time out error occurs.

Authentication type

Text (options)

No

Basic

AUTHTYPE="Default"

The Exchange server authentication type. The available options are:

  • Basic

  • Default

  • Form (Exchange 2003 (WEBDAV) only)

Domain name

Text

Yes

(Empty)

DOMAINNAME="domain"

The domain name corresponding to the e-mail address to perform the selected action on.

Username

Text

Yes

(Empty)

USERNAME="username"

The username corresponding to the e-mail address to perform the selected action on.

Password

Text

Yes

(Empty)

PASSWORD="password"

The password corresponding to the e-mail address to perform the selected action on.

Proxy Properties

Property

Type

Required

Default

Markup

Description

Proxy type

Text (options)

No

System default

PROXYTYPE="http"

The proxy protocol that should be used. If you are unsure of the value to use in this parameter, contact your network administrator. The available options are:

  • System default

  • None

  • HTTP

Proxy host

Text

No

(Empty)

PROXYSERVER="proxy.host.com"

The hostname (server.domain.com) or IP address (xxx.xxx.xxx.xxx) of the proxy server.

Proxy username

Text

No

(Empty)

PROXYUSERNAME="username"

The username that should be used to authenticate when connecting through the proxy server. This option is only valid if the Use authentication parameter is enabled.

Proxy password

Text

No

(Empty)

PROXYPASSWORD="encrypted"

The password that should be used to authenticate when connecting through the proxy server. This option is only valid if the Use authentication parameter is enabled.

Proxy port

Number

No

1028

PROXYPORT="3000"

The port that should be used to connect to the proxy server. Most proxy servers operate on port 1028 (the default) however the proxy server can be customized to operate on other ports

Description Tab

The Description tab allows you to customize the text description of any step as it appears in the Task Builder's Steps Pane.

More on setting custom step description

Error Causes Tab

The Error Causes tab properties allow you to instruct a task step to react only to specific errors or ignore certain errors that should cause it to fail.

More on Error Causes properties

On Error Tab

The On Error tab properties lets you determine what the task should do if a particular step encounters an error as defined in the Error Causes properties.

More about On Error properties

Property Name/Value Specifications

The Property and Value parameters can differ depending on the combination of options selected from the Action and Exchange object type parameters. If the Action parameter is set to Create Exchange Object, the Property/Value table indicates the properties and values to set for the new object to be created. Click Load required properties to load all required properties for the Exchange object to be created. Required properties vary depending on the type of Exchange object selected. For example, creating an appointment, required properties such as StartTime, EndTime and Location will load. If creating a contact, required properties such as Organization, Street, City and Postal Code will load. To specify other properties, click Click here to add a new item. Click the newly created Property/Value fields and select the desired object property and value from the drop-down list.

If the Action parameter is set to Get Exchange object(s), Move Exchange object(s) or Delete Exchange object(s), the Property and Value parameters along with the Operator parameter act as a filtering feature to filter specific property/value combinations. Clicking the option Click here to add a new item or clicking inside the Property/Value fields will allow for the selection of a property name/value to be entered. Clicking the down arrow under the Property field will show a drop-down list of available properties to choose from. Click the Value field to select from the available options you can set (if applicable) for the selected property.

If the Action parameter is set to Modify Exchange object, the Property and Value parameters are used to specify the property name and value to modify.

Click X to remove an existing property name/value from the list.

Property Names and Datasets

The available property names and dataset fields that are populated vary depending on the object type specified.

Appointments

If the Exchange object type parameter is set to Appointment, the following property names and/or dataset fields are populated. The bold items are the required properties needed to create a new appointment.

Property Name/Dataset Field

Type

Description

AllDayEvent

True/False

Specifies whether the appointment or meeting is scheduled for an entire day. Return values are True or False

AllowNewTimeProposals

True/False

Indicates whether a new meeting time can be proposed for a meeting by an attendee. Return values are True or False.

AppointmentType

Text (options)

Specifies the type of an appointment. The available options are:

  • Single

  • Occurrence

  • Exception

  • Recurring Master

Attachments

Text

Specifies the collection of attachments for this message. This property is read-only.

Body

Text

Indicates the text body.

BusyStatus

Text (options)

The busy status of this messaging user for this appointment. The available options are:

  • Free - The messaging user has no conflicting commitments during the time span of this appointment.

  • Tentative - The messaging user has at least one tentative commitment during the time span of this appointment.

  • Busy - The messaging user has at least one confirmed commitment during the time span of this appointment.

  • OOF (Out of Office)  - The messaging user is to be considered out-of-office (OOF).

  • No Data - Left Blank

Categorize

Text

 

EndTime

Date/Time

Contains the time an appointment ends. Either a Duration Property or an EndTime is required.

EndTimeZone

Text

The time zone related to the end time.

HasAttachments

True/False

Indicates whether the item has attachments. True if the item has attachments; otherwise, false.

Id (Dataset only)

Number

The ID of this item. Only populated in a dataset.

Importance

Text (options)

An Importance enumeration value indicating the importance of the item. The available options are:

  • Low

  • Normal

  • High

Location

Text

The location of this appointment.

IsMeeting

True/False

Indicates whether the appointment is a meeting. True if the appointment is a meeting; otherwise, false.

OptionalAttendees

Text

A list of optional attendees for the meeting.

Reminder

Date/Time

The date and time when the reminder is due for this item.

RequestResponses

True/False

Whether a response is requested. True or False

RequiredAttendees

Text

A list of required attendees for the meeting.

Resources

Text

A list of resources for the meeting.

Sensitivity

Text (options)

The sensitivity of this item. The available options are:

  • Normal

  • Personal

  • Private

  • Confidential

StartTime

Date/Time

The start time of the appointment.

StartTimeZone

Text

The time zone related to the start time.

Subject

Text

The subject of this item.

Contacts

If the Exchange object type parameter is set to Contact, the following property names and/or dataset fields are populated. The bold items are the required properties needed to create a new appointment.

Property Name/Dataset Field

Type

Description

AddressType

Text

The type of address.

Anniversary

Date

The contact's anniversary date.

AssistantName

Text

The name of the contact's assistant.

Birthday

Date

The birthday of the contact.

Body

Text

The body of this item.

BusinessFax

Number

The recipient's business fax number.

BusinessPhone

Number

The recipient's business phone number.

Categorize

Text

The list of categories that are associated with this item.

City

Text

The city where the contact resides.

Company

Text

The company for which the recipient works.

Country

Text

The country where the contact resides.

CountryOrRegion

Text

The country or region where the contact resides.

DateTimeCreated

Date/Time

The date/time when the contact was created.

Department

Text

The department in which the recipient works.

Email

Text

The recipient's e-mail address.

FileAs

Text

The name under which this contact is filed.

First

Text

The recipient's first name.

FullName

Text

The recipient's full name.

HasAttachments

True/False

Indicates whether the item has attachments. True if the item has attachments; otherwise, false.

HomePhone

Number

The recipient's home phone number.

Id

Text

The unique ID of this item.

JobTitle

Text

The job title of the contact.

Last

Text

The last name of the contact.

ManagerName

Text

The name of the contact's manager.

Middle

Text

The contact's middle initial.

MobilePhone

Number

The contact's cell phone number.

NickName

Text

The contact's nick name

Office

Text

The office location for the recipient.

Profession

Text

The contact's profession.

Spouse

Text

The name of the contact's spouse.

State

Text

The state where the contact resides.

Street

Text

The contact's street.

ZIPOrPostalCode

Number

The ZIP code or the postal code where the contact is located.

Tasks

If the Exchange object type parameter is set to Contact, the following property names and/or dataset fields are populated. The bold items are the required properties needed to create a new appointment.

Property Name/Dataset Field

Type

Description

ActualWork

Number

The actual work in hours.

Attachments

Text

Specifies the collection of attachments for this message. This property is read-only.

BillingInformation

Text

The billing information set for the item.

Body

Text

The body of this item.

Categorize

 

 

Company

Text

The company name the task is referencing.

DateCompleted

Text

The completion date of the task

DueDate

Text

The due date of the task.

HasAttachments

True/False

Indicates whether the item has attachments. True if the item has attachments; otherwise, false.

Id

Text

The unique ID of this item.

Importance

Text (options)

An Importance enumeration value indicating the importance of the item. The available options are:

  • Low

  • Normal

  • High

IsComplete

True/False

Indicates whether the task is complete. True if completed; otherwise, false.

Mileage

Number

The number of miles used to for the task.

Mode

Text

The modes of a Task.

Owner

Text

The owner of the task.

PercentComplete

Text

The completion percentage of the task.

Reminder

Text

Reminders entered for the task.

Sensitivity

Text (options)

The sensitivity of this item. The available options are:

  • Normal

  • Personal

  • Private

  • Confidential

StartDate

Date/Time

Start date of the task.

Status

Text

Defines the status of a task.

Subject

Text

The subject of the task.

To

Text

The primary recipients of the task.

TotalWork

Number

The total number of hours for the task.

E-mail

If the Exchange object type parameter is set to E-mail, the following property names and/or dataset fields are populated.

Property Name/Dataset Field

Type

Description

Attachments

Text

Specifies the collection of attachments for this message. This property is read-only.

Bcc

Text

The hidden recipients of the message.

Body

Text

The primary content of an e-mail message.

Cc

Text

The secondary recipients of the message.

DateReceived

Date

The date and time that the message was received.

From

Text

The author(s) of the message.

HasAttachments

True/False

Indicates whether the item has attachments. True if the item has attachments; otherwise, false.

HasBeenRead

True/False

Indicates whether the message has been read. True if the item has attachments; otherwise, false.

Headers

Text

Returns the panel that contains the form header.

ID (Dataset only)

Text

The unique ID of the message.

Importance

Text (options)

An Importance enumeration value indicating the importance of the item. The available options are:

  • Low

  • Normal

  • High

MessageID

Text

 The identifier string for the message. This is Read Only

ReplyTo

Text

Represents the recipients to whom the message is addressed.

RequestDeliveryReceipt

True/False

Indicates whether a delivery receipt is requested. True or False.

RequestReadReceipt

True/False

Indicates whether a read receipt is requested. True or False.

Sensitivity

Text (options)

Represents the sensitivity of the message. The available options are:

  • Normal

  • Personal

  • Private

  • Confidential

Subject

Text

The subject of the message.

To

Text

The primary recipients of the message.

Expressions, Variables and Functions

All text fields allow the use of expressions such as variables, functions or extended functions, which can be entered by surrounding the expression in percentage signs (example: %FileDateTime(myVar)% or %myVar%, % Left('Text',2)%). To help construct these expressions, you can open Expression Builder from these fields by clicking the percent sign (%) or by pressing F2.

More on expressions

More on variables

More on function

More on extended functions

More on the expression builder