Exchange - Create object

Declaration

<AMEXCHANGE PROTOCOLTYPE="text (options)" SESSION="text" EMAILADDRESS="text" AUTODISCOVERURL="YES/NO" USEHTTP="YES/NO" SERVER="text"  IGNOREINVALIDCERTIFICATE="YES/NO" IMPERSONATE="YES/NO" AUTHTYPE="text (options)"  USERNAME="text" PASSWORD="text (encrypted)" DOMAINNAME="text" TENANTID="text (encrypted)" CLIENTID="text (encrypted)" CLIENTSECRET="text (encrypted)" CURRENTFOLDER="text" TIMEOUT="number" PROXYTYPE="text (options)" PROXYSERVER="text" PROXYPORT="number" PROXYUSERNAME="text" PROXYPASSWORD="text (encrypted)" RESULTVARIABLE="text"><PROPERTY NAME="text (options)" VALUE="text" /></AMEXCHANGE>

Related Topics   

Description

Creates a new Exchange object.

Practical usage

See Description.

Parameters

Connection

Property Type Required Default Markup Description
Connection --- --- --- --- Indicates where user credentials, server settings, and other preferences required to establish a connection to the Exchange server originate. The available options are:
  • Host (default) - Specifies that user credentials, server settings, and advanced preferences are configured individually for this activity. This option is normally chosen if only a single activity is required to complete an operation.
  • Session - Specifies that user credentials, server settings and advanced preferences are obtained from a pre-configured session created in an earlier step with the use of the Exchange - Create session activity. This option is normally chosen if a combination of related activities is required to complete an operation. Linking several activities to a single session eliminates redundancy. Additionally, a single task supports construction and simultaneous execution of multiple sessions, improving efficiency.
NOTE: This parameter does not contain markup and is only displayed in visual mode for task construction and configuration purposes.

Connection - Session

Property Type Required Default Markup Description
Session Text Yes, if Connection set to Session ExchangeSession1 SESSION="ExchangeSess21" The Exchange-based session to use with this activity. This parameter is only available and required if the Connection parameter is set to Session.

Connection - Host > Server

Property Type Required Default Markup Description
Protocol Text (options) Yes, after setting Connection to Host EWS (Exchange 2007 & newer, Online)
  • PROTOCOLTYPE="ews2007"
  • PROTOCOLTYPE="webdav"
  • PROTOCOLTYPE="ewsonline"
Specifies the protocol to use to connect the Exchange server. This parameter is only available and required if the Connection parameter is set to Host. The available options are:
  • WEBDAV (Exchange 2003, 2007) - Uses the Web Distributed Authoring and Provisioning (WEBDAV) protocol. Compatible with Microsoft Exchange Server 2003 and Exchange Server 2007.
  • EWS (Exchange 2007 & newer, Online) - Uses the Exchange Web Services (EWS) protocol. Compatible with Microsoft Exchange Server 2007 and newer versions, and Exchange Online.
  • EWS Online - Uses the EWS protocol to access Microsoft Exchange Online by way of Modern Authentication.
Email address Text Yes (Empty) EMAILADDRESS="test@netauto.com" A valid email address to use to authenticate the connection to the Exchange server.
Refer to these parameters when Protocol is set to WEBDAV (Exchange 2003, 2007).
HTTPS/HTTP Yes/No No HTTPS USEHTTP="YES" Indicates whether to use HTTP (normal HTTP) or HTTPS (secure HTTP) as the Exchange server protocol type.
Exchange server Text Yes (Empty) SERVER="server.domain.com" Specifies the address of the Exchange server.
Authentication type Text (options) Yes Basic
  • AUTHTYPE="Basic"
  • AUTHTYPE="Default"
  • AUTHTYPE="Form"
Specifies the type of authentication to use to connect to the Exchange server. This parameter is only available and required if the Protocol parameter is set to WEBDAV (Exchange 2003, 2007). The available options are:
  • Basic - Processes basic authentication credentials presented in HTTP headers.
  • Default - Uses the current Windows user's credentials to authenticate. Selecting this option disables the Domain name, Username, and Password parameters.
  • Form - Forms-based authentication lets you use an HTML form to obtain credentials from users who are attempting to access the Exchange server.
NOTE: If you are unsure of the option to use for this parameter, contact your network administrator
Domain name Text Yes (Empty)
  • DOMAINNAME="server.domain.com"
  • DOMAINNAME="xxx.xxx.xxx.xxx"
The domain name (for example, domain.exchangeServer.com) or IP address to use to connect to the Exchange server.
Username Text Yes (Empty) USERNAME="theUser" A valid username to use to authenticate the connection to the Exchange server. This value may or may not be identical to the value set in the Email address field.
Password Text Yes (Empty) PASSWORD="text (encrypted)" A valid password, corresponding to the Username parameter, to use to authenticate Exchange connection. This parameter is encrypted in Task Builder.
Refer to these parameters when Protocol is set to EWS (Exchange 2007 & newer, Online).
Username Text Yes (Empty) USERNAME="theUser" The username to use to authenticate the connection to the Exchange server. This value may or may not be identical to the value set in the Email address field.
Password Text Yes (Empty) PASSWORD="text (encrypted)" The password that corresponds with the Username parameter to use to authenticate Exchange connection. This parameter is encrypted in Task Builder.
Domain name (optional) Text No (Empty)
  • DOMAINNAME="server.domain.com"
  • DOMAINNAME="xxx.xxx.xxx.xxx"
The domain name (for example, domain.exchangeServer.com) or IP address to use to connect to the Exchange server. This parameter is only optional if the Protocol parameter is set to EWS (Exchange 2007 & newer, Online).
HTTPS/HTTP Yes/No No HTTPS USEHTTP="YES" Indicates whether to use HTTP (normal HTTP) or HTTPS (secure HTTP) as the Exchange server protocol type.
Exchange server Text Yes (Empty) SERVER="server.domain.com" Specifies the address of the Exchange server. Click Discover to automatically discover the server based on the email address and password entered.
Authenticate as current windows user --- No Disabled AUTHTYPE="default" If selected, authentication to the Exchange server is by way of the current Windows user's credentials, and the Username, Password and Domain name parameters are disabled. This parameter is disabled by default.
Rediscover server at runtime Yes/No No No AUTODISCOVERURL="YES" If selected, the Autodiscover service automatically performs at runtime (disabled by default). The Autodiscover service makes it easier to configure Outlook 2007 or newer, as well as some mobile phones, by using a user's email address and password to automatically configure a user's profile. Setting this parameter to YES disables the Exchange server parameter.
Refer to these parameters when Protocol is set to EWS Online.
Tenant ID Text Yes (Empty) TENANTID="text (encrypted)" The Directory (tenant) ID to use for authentication. This parameter is encrypted in Task Builder.
Client ID Text Yes (Empty) CLIENTID="text (encrypted)" The Application (client) ID to use for authentication. This parameter is encrypted in Task Builder.
Client secret Text Yes (Empty) CLIENTSECRET="text (encrypted)" The client secret Value to use for authentication. This parameter is encrypted in Task Builder.

Once the Email address, Tenant ID, Client ID, and Client secret parameters are populated, click Verify to perform a test connection to the Exchange Online server.

Connection - Host > Advanced

Property Type Required Default Markup Description
Current folder Text Yes Calendar CURRENTFOLDER="Contact" The Exchange folder of where to perform this activity.
Timeout (seconds) Number No 100 TIMEOUT="120" The total amount of time in seconds that this activity is allowed to execute before a time out error occurs.
Impersonate Yes/No No No IMPERSONATE="YES" If selected, Exchange Impersonation is enabled (disabled by default). Impersonation enables a caller to impersonate a given account so that the operations are performed under the rights of the impersonated account, instead of the rights that are associated with the caller's account. This parameter is available only if the Protocol parameter is set to EWS (Exchange 2007 & newer, Online). The default setting for this parameter is NO.
Ignore invalid server certificate Yes/No No No IGNOREINVALIDCERTIFICATE="YES" If selected, invalid server certificates are ignored. In some cases, the SSL certificate may be expired or invalid and an exception is thrown due to its validity status. You can avoid such SSL certificate errors by selecting this parameter. This parameter is available only if the Protocol parameter is set to EWS (Exchange 2007 & newer, Online). The default setting for this parameter is NO.
Proxy type Text (options) No System default
  • PROXYTYPE="none"
  • PROXYTYPE="http"
Specifies the proxy type for Automate Desktop to use when attempting network communications through a proxy server. The available options are:
  • System default - Uses the default configurations set for Proxy in the Default Properties section of the Task Administrator (Options > Default Properties > Proxy).
  • None - No proxy is required.
  • HTTP - The proxy type is HTTP.
NOTE: If you are unsure of the value to use in this parameter, contact your network administrator.
Proxy server Text Yes, if Proxy type is set to HTTP (Empty)
  • PROXYSERVER="proxy.host.com"
  • PROXYSERVER="xxx.xxx.xxx.xxx"
The hostname (server.domain.com) or IP address of the proxy server. This parameter is only available and required if the Proxy type parameter is set to HTTP.
Proxy port Number Yes, if Proxy type is set to HTTP 1028 PROXYPORT="3000" The proxy port number to use to connect to the proxy server. Most proxy servers operate on port 1028 ( default), however, a proxy server can operate on other ports. This parameter is only available and required if the Proxy type parameter is set to HTTP.
Proxy username (optional) Text No (Empty) PROXYUSERNAME="username" The username to use to authenticate when connecting through the proxy server. This parameter is only available if the Proxy type parameter is set to HTTP.
Proxy password (optional) Text No (Empty) PROXYPASSWORD="text (encrypted)" The password that corresponds with the username in the Proxy username parameter. This parameter is encrypted in Task Builder. This parameter is only available if the Proxy type parameter is set to HTTP.

Object

Property Type Required Default Markup Description
Object type Text (options) Yes Appointment
  • EXCHANGEOBJECTTYPE="contact"
  • EXCHANGEOBJECTTYPE="task"
The type of Exchange object to create. Properties vary, based on the object type selected. The available options are:
  • Appointment (default) - Creates an appointment object.
  • Contact - Creates a contact object.
  • Task - Creates a task object.
Populate variable with object ID Text No (Empty) RESULTVARIABLE="theID" The name of an existing variable to populate with the unique ID of the newly created object.
Object properti(es) --- --- --- --- Use the Object properties table to indicate property names and associated values to set for the newly created Exchange object.

Click Load required properties to load all required property names for the selected Exchange object and enter the desired value for each name. Properties vary depending on the type of object selected under the Object type parameter. For example, creating an Appointment object populates required properties such as StartTime, EndTime, and Location , whereas creating a Contact object populates required properties such as Organization, Street , City, and Postal Code.

To specify individual property name/value pairs, click Add.

To edit a specific name/value pair, select it from the table, and then click Edit .

To delete a specific name/value pair, select it from the table, and then click Delete .

For more information, see Property Name/Value Specifications.

NOTE: This parameter does not contain markup and is only displayed in visual mode for task construction and configuration purposes.
Name Text Yes (Empty) NAME="Subject" The property name associated with the Exchange object to create.

For more information, see Property Name/Value Specifications.

Value Text Yes (Empty) VALUE="BPA" The value corresponding to the property specified in the Name parameter.

For more information, see Property Name/Value Specifications.

Description

Error Causes

On Error

Additional notes

Property Name/Value Specifications

The available property names and dataset fields that are populated vary depending on the Exchange object type specified. The following tables supply available property names for each object type.

Appointments

If the Object type parameter is set to Appointment, the following property names and/or dataset fields are populated. Certain properties are required to create a new appointment.

Property/Dataset Type Required Description
AllDayEvent True/False No Specifies whether the appointment or meeting is scheduled for an entire day. Returns true if the appointment or meeting is scheduled for an entire day, otherwise, returns false.
AllowNewTimeProposals True/False No Indicates whether a new meeting time can be proposed for a meeting by an attendee. Returns true if an attendee can propose a new meeting time for a meeting, otherwise, returns false.
Attachments Text No Specifies the collection of attachments for this message. This property is read-only.
Body Text Yes Indicates the text body.
BusyStatus Text (options) No 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).
  • WorkingElsewhere - The messaging user is working in another location during the time span of this appointment.
  • No Data - Left blank.
Categorize Text No The list of categories that are associated with this item.
EndTime Date/Time Yes Contains the time an appointment ends. Either a Duration Property or an EndTime is required.
Importance Text (options) No An enumeration value indicating the importance of the item. The available options are:
  • Low
  • Normal
  • High
Location Text Yes The location of this appointment.
OptionalAttendees Text No A list of optional attendees for the meeting.
Reminder Date/Time No The date and time when the reminder is due for this item.
RequestResponses True/False No Whether a response is requested. Returns true if a response is requested, otherwise, returns false.
RequiredAttendees Text No A list of required attendees for the meeting.
Resources Text No A list of resources for the meeting.
SendInvitationsMode Text (options) No Determines how meeting invitations are handled:
  • SendToNone -Meeting invitations are not sent.
  • SendOnlyToAll - Meeting invitations are sent to all attendees, but a copy of the invitation is not saved in the Sent Items folder.
  • SendToAllAndSaveCopy - Meeting invitations are sent to all attendees and a copy of the invitation is saved in the Sent Items folder.
Sensitivity Text (options) No The sensitivity of this item. The available options are:
  • Normal
  • Personal
  • Private
  • Confidential
StartTime Date/Time Yes The start time of the appointment.
Subject Text Yes The subject of this item.

Contacts

If the Object type parameter is set to Contact, the following property names and/or dataset fields are populated. Certain properties are required to create a new contact.

Property /Dataset Type Required Description
AddressType Text No The type of address.
Anniversary Date No The contact's anniversary date.
AssistantName Text No The name of the contact's assistant.
Birthday Date No The birthday of the contact.
Body Text No The body of this item.
BusinessFax Number No The recipient's business fax number.
BusinessPhone Number Yes The recipient's business phone number.
Categorize Text No The list of categories that are associated with this item.
City Text Yes The city where the contact resides.
Company Text Yes The company where the recipient works.
Country Text No The country where the contact resides.
CountryOrRegion Text Yes The country or region where the contact resides.
Department Text No The department in which the recipient works.
Email Text Yes The recipient's email address.
FileAs Text No The name under which this contact is filed.
First Text Yes The recipient's first name.
FullName Text No The recipient's full name.
HomePhone Number No The recipient's home phone number.
ImAddress Text No The list of instant messaging (IM) addresses for the contact.
JobTitle Text Yes The job title of the contact.
Last Text Yes The last name of the contact.
ManagerName Text No The name of the contact's manager.
Middle Text No The contact's middle initial.
MobilePhone Number No The contact's cell phone number.
NickName Text No The contact's nick name
Office Text No The office location for the recipient.
Profession Text No The contact's profession.
Spouse Text No The name of the contact's spouse.
State Text Yes The state where the contact resides.
Street Text Yes The contact's street.
WebPage Text No The contact's personal or company's website.
ZIPOrPostalCode Number Yes The ZIP code or the postal code where the contact is located.

Tasks

If the Object type parameter is set to Task, the following property names and/or dataset fields are populated. Certain properties are required to create a new task.

Property/Dataset Type Required Description
Attachments Text No Specifies the collection of attachments for this task. This property is read-only.
Bcc Text No The hidden recipients of the task.
Body Text Yes The body of the task.
Cc Text No The secondary recipients of the task.
From Text No The author of the task.
Importance Text (options) No An enumeration value indicating the importance of the task. The available options are:
  • Low
  • Normal
  • High
ReplyTo Text No Represents the recipients to whom the task is addressed.
RequestDeliveryReceipt True/False No Indicates whether a delivery receipt is requested. Return values are True or False.
RequestReadReceipt True/False No Indicates whether a read receipt is requested. Return values are True or False.
Sensitivity Text (options) No The sensitivity of this task. The available options are:
  • Normal
  • Personal
  • Private
  • Confidential
Subject Text Yes The subject of the task.
To Text No The primary recipients of the task.

Examples

NOTE:
  • Copy and paste the sample AML code below directly into the Task Builder Steps Panel.
  • To successfully run the sample code, update parameters containing user credentials, files, file paths, or other information specific to the task to match your environment.

Example 1

This sample task creates a contact.

Copy
<AMEXCHANGE PROTOCOLTYPE="ews" EMAILADDRESS="test.exchange@netauto.com" SERVER="servername.netauto.com" USERNAME="test.exchange" PASSWORD="AM5SfXdMACSLfqg7lPyVC9Ctw==aME" DOMAINNAME="netauto" CURRENTFOLDER="Contacts" EXCHANGEOBJECTTYPE="contact" RESULTVARIABLE="theVar"><PROPERTY NAME="First" VALUE="Peter" /><PROPERTY NAME="Last" VALUE="Parker" /><PROPERTY NAME="Company" VALUE="Netauto" /><PROPERTY NAME="JobTitle" VALUE="Sales" /><PROPERTY NAME="Email" VALUE="pp@netauto.com" /><PROPERTY NAME="BusinessPhone" VALUE="555-555-0100" /><PROPERTY NAME="Street" VALUE="1234 West St" /><PROPERTY NAME="City" VALUE="Los Angeles" /><PROPERTY NAME="State" VALUE="CA" /><PROPERTY NAME="ZIPOrPostalCode" VALUE="90005" /><PROPERTY NAME="CountryOrRegion" VALUE="USA" /></AMEXCHANGE>

Example 2

This sample task creates a meeting request.

Copy
<AMEXCHANGE PROTOCOLTYPE="ews" EMAILADDRESS="test.exchange@netauto.com" SERVER="servername.netauto.com" USERNAME="test.exchange" PASSWORD="AM5CXBuFwxclW8ROkXtUNbqiQ==aME" DOMAINNAME="netauto" CURRENTFOLDER="Calendar" RESULTVARIABLE="theVar"><PROPERTY NAME="Subject" VALUE="AME" /><PROPERTY NAME="StartTime" VALUE="10/22/2020 1:00 PM" /><PROPERTY NAME="EndTime" VALUE="10/22/2020 2:00 PM" /><PROPERTY NAME="Body" VALUE="All the new features" /><PROPERTY NAME="Location" VALUE="Meeting Room A" /><PROPERTY NAME="AllDayEvent" VALUE="true" /><PROPERTY NAME="Body" VALUE="Meeting" /><PROPERTY NAME="RequiredAttendees" VALUE="dev@netauto.com" /></AMEXCHANGE>

Example 3

This sample task creates a task.

Copy
<AMEXCHANGE PROTOCOLTYPE="ews" EMAILADDRESS="test.exchange@netauto.com" SERVER="servername.netauto.com" USERNAME="test.exchange" PASSWORD="AM5pN2XX1WswX3uszufzoydfw==aME" DOMAINNAME="netauto" EXCHANGEOBJECTTYPE="task" RESULTVARIABLE="theVar"><PROPERTY NAME="Subject" VALUE="Complete Montly Sales Report" /><PROPERTY NAME="StartDate" VALUE="10/22/2020 4:00 PM" /><PROPERTY NAME="DueDate" VALUE="10/22/2020 5:00 PM" /><PROPERTY NAME="Body" VALUE="Complete Monthly Sales Report" /></AMEXCHANGE>

Example 4

This sample task creates an Exchange session and includes a few Exchange - Create object steps to create a meeting and task. The task ends with an Exchange - End session step.

Copy
<!-- Create Variables -->
<AMVARIABLE NAME="meetingObjectID" VALUE="" />
<AMVARIABLE NAME="taskObjectID" VALUE="" />
<!-- Create Exchange Session -->
<AMEXCHANGE ACTIVITY="create_session" SESSION="NetAutoExchange" PROTOCOLTYPE="webdav" EMAILADDRESS="exchange@netauto.com" SERVER="indra.netauto.com" USERNAME="netauto.exchange" PASSWORD="AM4IaUpiBW8p0jdVSjFibrJx0ilJ97MCLAjaME" DOMAINNAME="netauto" CURRENTFOLDER="Calendar" />
<!-- Create Meeting Request -->
<AMEXCHANGE SESSION="NetAutoExchange" RESULTVARIABLE="meetingObjectID"><PROPERTY NAME="Subject" VALUE="Phone System Demo" /><PROPERTY NAME="StartTime" VALUE="12/8/2020 3:26:41 PM" /><PROPERTY NAME="EndTime" VALUE="12/8/2020 4:26:43 PM" /><PROPERTY NAME="Body" VALUE="All the new Features" /><PROPERTY NAME="Location" VALUE="Batman's Office" /><PROPERTY NAME="BusyStatus" VALUE="Meeting" /><PROPERTY NAME="RequiredAttendees" VALUE="nl@netauto.com " /></AMEXCHANGE>
<!-- Create Task -->
<AMEXCHANGE SESSION="NetAutoExchange" EXCHANGEOBJECTTYPE="task" RESULTVARIABLE="TaskObjectID"><PROPERTY NAME="Subject" VALUE="BF2 Meeting" /><PROPERTY NAME="StartDate" VALUE="12/8/2020 4:00:00 PM" /><PROPERTY NAME="DueDate" VALUE="12/8/2020 5:00:00 PM" /><PROPERTY NAME="Body" VALUE="Discuss Improvements" /></AMEXCHANGE>
<!-- End Exchange Session -->
<AMEXCHANGE ACTIVITY="end_session" SESSION="NetAutoExchange" />