SAP Help Home SAP Intelligent RPA Help Portal SAP Intelligent RPA Community

Module - Outlook Online

Set of activities related to Outlook Online.

Activities

Send Email

Send an email


Technical Name Type Minimal Agent Version
mail.sendMail asynchronous WIN-3.24, MAC-3.24, CLOUD-3.34

Input Parameters:

Name Type Attributes Default Description
mailDescription irpa_365online.mailDescription mandatory Description of the email

Sample Code:

await irpa_365online.outlook.mail.sendMail(mailDescription);

Errors:

Error Class Package Description
RequestError irpa_core Error sending email.
NotFound irpa_core Attachment file was not found.
InvalidArgument irpa_core Invalid email arguments.
InvalidAuthenticationToken irpa_365online Invalid token was retrieved to call grapAPI.


Search Emails

Search for emails


Technical Name Type Minimal Agent Version
mail.searchMails asynchronous WIN-3.24, MAC-3.24, CLOUD-3.34

Input Parameters:

Name Type Attributes Default Description
mailSearchCriterions Array.<irpa_365online.mailSearchCriterion> mandatory Email search criterion
rootFolder irpa_365online.enums.mail.folders optional Known folder in which you want to search
folderPath string optional Folder path from root folder
maxResults number optional 50 Number of results to return. The maximum number accepted is 200. The most recent emails are returned first.

Output Parameters:

Name Type Description
searchResult Array.<irpa_365online.mailSearchResult> The list of results.

Sample Code:

const searchResult = await irpa_365online.outlook.mail.searchMails(mailSearchCriterions, enums.mail.folders.inbox, null, false);

Note:

If you search using the 'received' or 'sent' criterion, please use the following format "YYYY-MM-DD"

Note:

If you search using the 'isRead' or 'hasAttachment' criteria, please use true or false

Note:

The character " (double quote) is not authorized as a search value

Errors:

Error Class Package Description
InvalidArgument irpa_core Unauthorized character.
RequestError irpa_core Error searching mail.
InvalidAuthenticationToken irpa_365online Invalid token was retrieved to call grapAPI.


Get Email Details Deprecated

Retrieve details of the email


Status From Substitute Activity
Deprecated 1.34 irpa_365online.outlook.mail.getInformation

Comment:

This activity returns all the details that Microsoft gives about a given mail. Prefer to use Get Mail Information to get a more accurate properties list



Technical Name Type Minimal Agent Version
mail.getDetails asynchronous WIN-3.24, MAC-3.24, CLOUD-3.34

Input Parameters:

Name Type Attributes Default Description
mailId string mandatory The ID of the email from which you want to retrieve details

Output Parameters:

Name Type Description
mailDetails any Details of the email

Sample Code:

const mailDetails = await irpa_365online.outlook.mail.getDetails();

Errors:

Error Class Package Description
RequestError irpa_core Error getting details of the mail.
InvalidAuthenticationToken irpa_365online Invalid token was retrieved to call grapAPI.


Get Email Information

Retrieve information about the email


Technical Name Type Minimal Agent Version
mail.getInformation asynchronous WIN-3.24, MAC-3.24, CLOUD-3.34

Input Parameters:

Name Type Attributes Default Description
mailId string mandatory The ID of the email from which you want to retrieve information.

Output Parameters:

Name Type Description
mailInformation irpa_365online.mailInformation Information about the email

Sample Code:

const mailInformation = await irpa_365online.outlook.mail.getInformation();

Errors:

Error Class Package Description
RequestError irpa_core Error getting Information of the mail.
InvalidAuthenticationToken irpa_365online Invalid token was retrieved to call grapAPI.
NotFound irpa_core The path was not found.


Save All Attachments Locally

Saves the attachments from an email in a local folder, with a filter on the file type. To save link attachments, choose Save Link Attachments Locally.


Technical Name Type Minimal Agent Version
mail.saveAllAttachmentsLocally asynchronous WIN-3.24, MAC-3.24, CLOUD-3.34

Input Parameters:

Name Type Attributes Default Description
mailId string mandatory The ID of the email you want from which you want to save the attachments
destFolder string mandatory The local folder destination where you want to save the attachments
onlyExtensions Array. optional Only attachments with one of these extensions will be saved.
excludeExtensions Array. optional All of the attachments will be saved except those that have these extensions. If you use onlyExtensions, excludeExtensions is ignored.
filterInline boolean optional true Ignore inline attachments such as the signature image. The default setting is "True".

Output Parameters:

Name Type Description
fileList Array. List of the file names of the saved attachments.

Sample Code:

// Save pdf and jpg attachments to c:\temp\attachments. Don't save inline attachments such as signature image. const fileList = await irpa_365online.outlook.mail.saveAllAttachmentsLocally('AAMkAGJ2rcg_0YAnrcg_0y8rAAA=', 'c:\\temp\\attachments', ['pdf'], ['jpg']); // Save all attachments except png to c:\temp\attachments. Don't save inline attachments such as signature image. const fileList = await irpa_365online.outlook.mail.saveAllAttachmentsLocally('AAMkAGJ2rcg_0YAnrcg_0y8rAAA=', 'c:\\temp\\attachments', undefined, ['png']); // Save all attachments to c:\temp\attachments; including inline attachments such as signature image. const fileList = await irpa_365online.outlook.mail.saveAllAttachmentsLocally('AAMkAGJ2rcg_0YAnrcg_0y8rAAA=', 'c:\\temp\\attachments', undefined, undefined, false);

Note:

If files exist with the same names, attachments are saved with incremental suffixes

Errors:

Error Class Package Description
RequestError irpa_core Error getting details of the mail.
InvalidAuthenticationToken irpa_365online Invalid token was retrieved to call grapAPI.
NotFound irpa_core The path was not found.


Save All Attachments Online

Saves the attachments from an email in a remote folder, with a filter on the file type. To save link attachments, choose Save Link Attachments Locally.


Technical Name Type Minimal Agent Version
mail.saveAllAttachmentsOnline asynchronous WIN-3.24, MAC-3.24, CLOUD-3.34

Input Parameters:

Name Type Attributes Default Description
mailId string mandatory The ID of the email you want from which you want to save the attachments
driveId string optional If empty, the local drive is used by default. Otherwise, the drive ID of the remote drive is used.
uploadPath string optional The path for the remote upload folder to which you want to save attachments.
onlyExtensions Array. optional Only attachments with one of these extensions will be saved.
excludeExtensions Array. optional All of the attachments will be saved except those that have these extensions. If you use onlyExtensions, excludeExtensions is ignored.
filterInline boolean optional true Ignore inline attachments such as the signature image. The default setting is "True".

Output Parameters:

Name Type Description
fileList Array. List of the file names of the saved attachments.

Sample Code:

// Save pdf and jpg attachments to myFolder to my own drive. Don't save inline attachments such as signature image. const fileList = await irpa_365online.outlook.mail.saveAllAttachmentsOnline('AAMkAGJ2rcg_0YAnrcg_0y8rAAA=', undefined, 'myFolder', ['pdf'], ['jpg']); // Save all attachments except png to myFolder to my own drive. Don't save inline attachments such as signature image. const fileList = await irpa_365online.outlook.mail.saveAllAttachmentsOnline('AAMkAGJ2rcg_0YAnrcg_0y8rAAA=', undefined, 'myFolder', undefined, ['png']); // Save all attachments to myFolder to remote drive; including inline attachments such as signature image. const fileList = await irpa_365online.outlook.mail.saveAllAttachmentsOnline('AAMkAGJ2rcg_0YAnrcg_0y8rAAA=', 'myDriveId', 'myFolder', undefined, undefined, false);

Note:

If attachments have the same names, they are saved with incremental suffixes

Errors:

Error Class Package Description
RequestError irpa_core Error getting details of the mail.
InvalidAuthenticationToken irpa_365online Invalid token was retrieved to call grapAPI.
NotFound irpa_core The path was not found.


Save All Link Attachments Locally

Saves link attachments from an email to a local folder, with a filter on the file type.


Technical Name Type Minimal Agent Version
mail.saveAllLinkAttachmentsLocally asynchronous WIN-3.24, MAC-3.24, CLOUD-3.34

Input Parameters:

Name Type Attributes Default Description
mailId string mandatory The ID of the email you want from which you want to save the attachments
destFolder string mandatory The local folder destination where you want to save the attachments.
onlyExtensions Array. optional Only attachments with one of these extensions will be saved.
excludeExtensions Array. optional All the link attachments will be saved, except those that have these extensions. If you use onlyExtensions, excludeExtensions is ignored.

Output Parameters:

Name Type Description
fileList Array. List of the file names of the saved link attachments.

Sample Code:

// Save pdf and jpg link attachments to c:\temp\attachments. const fileList = await irpa_365online.outlook.mail.saveAllLinkAttachmentsLocally('AAMkAGJ2rcg_0YAnrcg_0y8rAAA=', 'c:\\temp\\attachments', ['pdf'], ['jpg']); // Save all link attachments except png to c:\temp\attachments. const fileList = await irpa_365online.outlook.mail.saveAllLinkAttachmentsLocally('AAMkAGJ2rcg_0YAnrcg_0y8rAAA=', 'c:\\temp\\attachments', undefined, ['png']); // Save all link attachments to c:\temp\attachments. const fileList = await irpa_365online.outlook.mail.saveAllLinkAttachmentsLocally('AAMkAGJ2rcg_0YAnrcg_0y8rAAA=', 'c:\\temp\\attachments', undefined, undefined);

Note:

If files exist with the same names, link attachments are saved with incremental suffixes

Errors:

Error Class Package Description
RequestError irpa_core Error getting details of the mail.
Error irpa_core Files without extension cannot be downloaded.
InvalidAuthenticationToken irpa_365online Invalid token was retrieved to call grapAPI.
NotFound irpa_core The path was not found.


Reply to Email

Reply to Email


Technical Name Type Minimal Agent Version
mail.replyTo asynchronous WIN-3.24, MAC-3.24, CLOUD-3.34

Input Parameters:

Name Type Attributes Default Description
mailId string mandatory The ID of the email you want to reply to
mailElementsToAdd irpa_365online.mailComplement optional Additional elements to add to the reply.

Sample Code:

await irpa_365online.outlook.mail.replyTo(mailId, mailDescription);

Errors:

Error Class Package Description
RequestError irpa_core Error replying mail.
NotFound irpa_core Attachment file was not found.
InvalidAuthenticationToken irpa_365online Invalid token was retrieved to call grapAPI.


Reply to All Email

Reply to All Email


Technical Name Type Minimal Agent Version
mail.replyToAll asynchronous WIN-3.24, MAC-3.24, CLOUD-3.34

Input Parameters:

Name Type Attributes Default Description
mailId string mandatory The ID of the email you want to reply to
mailElementsToAdd irpa_365online.mailComplement optional Description of the Email.

Sample Code:

await irpa_365online.outlook.mail.replyToAll(mailId, mailDescription);

Errors:

Error Class Package Description
RequestError irpa_core Error replying mail.
NotFound irpa_core Attachment file was not found.
InvalidAuthenticationToken irpa_365online Invalid token was retrieved to call grapAPI.


Forward Email

Forward Email


Technical Name Type Minimal Agent Version
mail.forward asynchronous WIN-3.24, MAC-3.24, CLOUD-3.34

Input Parameters:

Name Type Attributes Default Description
mailId string mandatory The ID of the email you want to forward.
mailElementsToAdd irpa_365online.mailComplement mandatory Description to be added to forward an email

Sample Code:

await irpa_365online.outlook.mail.forward('AAAAAD5v7TWSvczRJdhHbaoy02KBwAYUtsK31IIQ7n2rcg_0Yy8');

Errors:

Error Class Package Description
InvalidArgument irpa_core Invalid email arguments.
RequestError irpa_core Error forwading email.
InvalidAuthenticationToken irpa_365online Invalid token was retrieved to call grapAPI.


Move Email

Move Email


Technical Name Type Minimal Agent Version
mail.move asynchronous WIN-3.24, MAC-3.24, CLOUD-3.34

Input Parameters:

Name Type Attributes Default Description
mailId string mandatory The ID of the E-Mail you want to move
rootFolder irpa_365online.enums.mail.folders optional inbox Well-known folder to which you want to move the E-mail
folderPath string optional Folder path from the root folder to which you want to move the E-mail

Sample Code:

await irpa_365online.outlook.mail.move('AAAAAD5v7TWSvczRJdhHbaoy02KBwAYUtsK31IIQ7n2rcg_0Yy8', enums.mail.folders.deleteditems, null);

Errors:

Error Class Package Description
InvalidArgument irpa_core Invalid email arguments.
RequestError irpa_core Error moving email.
InvalidAuthenticationToken irpa_365online Invalid token was retrieved to call grapAPI.
NotFound irpa_core The mail was not found.


Set Email Read Status

Set Email Read Status


Technical Name Type Minimal Agent Version
mail.setRead asynchronous WIN-3.24, MAC-3.24, CLOUD-3.34

Input Parameters:

Name Type Attributes Default Description
mailId string mandatory The ID of the E-Mail for which you want to set the read status
read boolean optional true Used to set the status of the E-Mail read or unread

Sample Code:

await irpa_365online.outlook.mail.setRead('AAAAAD5v7TWSvczRJdhHbaoy02KBwAYUtsK31IIQ7n2rcg_0Yy8', true);

Errors:

Error Class Package Description
RequestError irpa_core Error setting email.
InvalidAuthenticationToken irpa_365online Invalid token was retrieved to call grapAPI.


List Calendar Events

List Calendar Events


Technical Name Type Minimal Agent Version
calendar.listCalendarEvents asynchronous WIN-3.24, MAC-3.24, CLOUD-3.34

Input Parameters:

Name Type Attributes Default Description
emailAddresses Array. mandatory Array of email addresses for which you want to list the calendar events
startDateTime irpa_365online.calendarDateTime mandatory Start of the time interval for which you want to list events
endDateTime irpa_365online.calendarDateTime mandatory End of the time interval for which you want to list events

Output Parameters:

Name Type Description
calendarEvents Array.<irpa_365online.userCalendarEvents> Array of users that have calendar events between the two dates or times.

Sample Code:

const calendarEvents = await irpa_365online.outlook.calendar.listCalendarEvents(["john.smith@domain.com"], {dateTime: "2023-01-01T13:00:00", timeZone: "Romance Standard Time"}, {dateTime: "2000-01-01T14:15:00", timeZone: "Romance Standard Time"});

Errors:

Error Class Package Description
RequestError irpa_core Error getting calendar events.
InvalidArgument irpa_core Invalid arguments.
InvalidAuthenticationToken irpa_365online Invalid token was retrieved to call grapAPI.


Check Users Availability

Check Users Availability


Technical Name Type Minimal Agent Version
calendar.checkUsersAvailability asynchronous WIN-3.24, MAC-3.24, CLOUD-3.34

Input Parameters:

Name Type Attributes Default Description
emailAddresses Array. mandatory The users for which you want to retrieve information about availability
startDateTime irpa_365online.calendarDateTime mandatory Start of the time interval for which you want to list events
endDateTime irpa_365online.calendarDateTime mandatory End of the time interval for which you want to list events

Output Parameters:

Name Type Description
usersAvailabilities Array.<irpa_365online.usersAvailability> Array of users with information about their availability for the specified time interval

Sample Code:

await irpa_365online.outlook.calendar.checkUsersAvailability(["john.smith@domain.com", "another_user@domain.com"]);

Errors:

Error Class Package Description
RequestError irpa_core Error getting users availability.
InvalidArgument irpa_core Invalid arguments.
InvalidAuthenticationToken irpa_365online Invalid token was retrieved to call grapAPI.


Send Meeting Request

Send Meeting Request


Technical Name Type Minimal Agent Version
calendar.sendMeetingInvitation asynchronous WIN-3.24, MAC-3.24, CLOUD-3.34

Input Parameters:

Name Type Attributes Default Description
meetingParameters irpa_365online.meetingInvitation mandatory Parameters of the Meeting To be Sent in Request

Output Parameters:

Name Type Description
meetingId string ID of the Meeting Created

Sample Code:

const meetingId = await irpa_365online.outlook.calendar.sendMeetingInvitation({isOnlineMeeting: true, subject: "New invitation", start: {dateTime: "2023-04-18T13:30:00", timeZone: "Romance_Standard_Time"}, optionalEmailAddresses: [], resources: [], end: {dateTime: "2023-04-18T14:00:00", timeZone: "Romance_Standard_Time"}, location: "Team Meeting", body: "<b>Hello World</b>", mandatoryEmailAddresses: ["toto@toto.com"]});

Errors:

Error Class Package Description
RequestError irpa_core Error sending the meeting.
InvalidArgument irpa_core Invalid arguments.
InvalidAuthenticationToken irpa_365online Invalid token was retrieved to call grapAPI.


Get Meeting Responses

Get Meeting Responses


Technical Name Type Minimal Agent Version
calendar.fetchMeetingResponse asynchronous WIN-3.24, MAC-3.24, CLOUD-3.34

Input Parameters:

Name Type Attributes Default Description
meetingId string mandatory ID of the Meeting From Which You Want to Fetch Responses

Output Parameters:

Name Type Description
meetingResponses Array.<irpa_365online.meetingResponse> Responses from Every Meeting Attendee

Sample Code:

const responses = await irpa_365online.outlook.calendar.fetchMeetingResponse('AAMkAGJhZGQ0NTc5LWRiZ...02KBwAYUtsK31IIQ7n2rcg_0Yy8');

Errors:

Error Class Package Description
RequestError irpa_core Error getting meeting responses.
InvalidAuthenticationToken irpa_365online Invalid token was retrieved to call grapAPI.


Update Event

Update Event


Technical Name Type Minimal Agent Version
calendar.updateEvent asynchronous WIN-3.24, MAC-3.24, CLOUD-3.34

Input Parameters:

Name Type Attributes Default Description
eventId string mandatory ID of the event to be updated
eventUpdateParameters irpa_365online.eventUpdate mandatory Parameters to be updated

Sample Code:

const responses = await irpa_365online.outlook.calendar.updateEvent('AAMkAGJhZGQ0NTc5LWRiZ...02KBwAYUtsK31IIQ7n2rcg_0Yy8', {subject: 'modified meeting'});

Errors:

Error Class Package Description
RequestError irpa_core Error updating event.
InvalidAuthenticationToken irpa_365online Invalid token was retrieved to call grapAPI.


Delete Event

Delete Event


Technical Name Type Minimal Agent Version
calendar.deleteEvent asynchronous WIN-3.24, MAC-3.24, CLOUD-3.34

Input Parameters:

Name Type Attributes Default Description
eventId string mandatory ID of the event to be deleted

Sample Code:

const responses = await irpa_365online.outlook.calendar.deleteEvent('AAMkAGJhZGQ0NTc5LWRiZ...02KBwAYUtsK31IIQ7n2rcg_0Yy8');

Errors:

Error Class Package Description
RequestError irpa_core Error deleting event.
InvalidAuthenticationToken irpa_365online Invalid token was retrieved to call grapAPI.


Search Calendar Events

Search Calendar Events


Technical Name Type Minimal Agent Version
calendar.searchCalendarEvents asynchronous WIN-3.24, MAC-3.24, CLOUD-3.34

Input Parameters:

Name Type Attributes Default Description
calendarSearchCriteria Array.<irpa_365online.calendarSearchCriterion> mandatory Calendar Search Criterion
timeZone irpa_365online.enums.calendar.timeZones optional Romance_Standard_Time Time zone of the time interval
maxResults number optional 100 Number of results to return. Maximum permitted is 500. Most recent events are returned first when they are sorted by date.

Output Parameters:

Name Type Description
calendarEvents Array.<irpa_365online.calandarEventSearchResult> Array of users that have calendar events between the two dates or times.

Sample Code:

irpa_365online.outlook.calendar.searchCalendarEvents();

Note:

Search operands are : contains for subject element, greater or equal for startdate operator, less or equal for enddate operator

Errors:

Error Class Package Description
RequestError irpa_core Error getting calendar events.
InvalidArgument irpa_core Invalid arguments.
InvalidAuthenticationToken irpa_365online Invalid token was retrieved to call grapAPI.