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

Module - Calendar

Collection of functions based on the Outlook calendar.

Activities

Create Appointment

Create and save an appointment.


Technical Name Type Minimal Agent Version
createAppointment synchronous WIN-2.0.0

Input Parameters:

Name Type Attributes Default Description
appointmentProperties irpa_outlook.appointmentProperties mandatory The appointment properties.

Sample Code:

await irpa_outlook.calendar.createAppointment({Subject: "My Applointment", StartDateTime: "2021-09-07T22:00:00+02:00", Duration: 60, Reminder: 10});

Sample Code:

await irpa_outlook.calendar.createAppointment({Subject: "My Applointment", StartDateTime: "2021-09-07T22:00:00", Duration: 30, Reminder: 5});

Sample Code:

await irpa_outlook.calendar.createAppointment({Subject: "My Applointment", StartDateTime: "2021-09-07 22:00:00", Duration: 60, Reminder: 10});

Errors:

Error Class Package Description
InvalidArgument irpa_core Invalid argument


Create Meeting

Create and send or save a meeting.


Technical Name Type Minimal Agent Version
createMeeting synchronous WIN-2.0.0

Input Parameters:

Name Type Attributes Default Description
meetingProperties irpa_outlook.meetingProperties mandatory The meeting properties.

Sample Code:

await irpa_outlook.calendar.createMeeting({Subject: "New Meeting", RequiredAttendees: "user1@domain.com;user2@domain.com", AnswerRequired: false, ForwardAllowed: false, StartDateTime: "2021-09-07T21:00:00", Duration: 30, ToSend: true});

Sample Code:

await irpa_outlook.calendar.createMeeting({Subject: "New Meeting", RequiredAttendees: "user1@domain.com;user2@domain.com", OptionalAttendees: "user3@domain.com", AnswerRequired: true, ForwardAllowed: true, StartDateTime: "2021-09-07 21:00:00", Duration: 30, ToSend: false});

Errors:

Error Class Package Description
InvalidArgument irpa_core Invalid argument


Search Calendar Items

Search for a specific calendar item and fills the context with the result.


Technical Name Type Minimal Agent Version
searchCalendarItems synchronous WIN-2.0.0

Input Parameters:

Name Type Attributes Default Description
calendarSearchCriteria irpa_outlook.calendarSearchCriteria mandatory The calendar search criteria.

Sample Code:

await irpa_outlook.calendar.searchCalendarItems(calendarSearchCriteria);



Get All Calendar Items

Retrieve all the calendar items from the context.


Technical Name Type Minimal Agent Version
getAllCalendarItems synchronous WIN-2.0.0

Input Parameters:

Name Type Attributes Default Description
propertiesFilter irpa_outlook.calendarItemPropertiesFilter optional The filter to determine which properties to return. If no filter is provided, then all handled fields except for recipients and attachments are returned.
limit number optional 100 The maximum number of items you can retrieve.

Output Parameters:

Name Type Description
calendarItemDetails Array.<irpa_outlook.calendarItemDetails> Details of the calendar item.

Sample Code:

await irpa_outlook.calendar.getAllCalendarItems();



Check Current Calendar Item

Check if the current calendar item is defined. Useful when using the 'Get Next Calendar Item' or 'Get Previous Calendar Item' activities to verify if the calendar item cursor is still inside the context.


Technical Name Type Minimal Agent Version
context.isContextCurrentCalendarExist synchronous WIN-2.0.0

Output Parameters:

Name Type Description
isContextCurrentCalendarExist boolean True if there is a context for the current calendar, false otherwise.

Sample Code:

let bCurExists = await irpa_outlook.calendar.context.isContextCurrentCalendarExist();



Get Calendar Items Number (Context)

Retrieve the number of calendar items within a specified context.


Technical Name Type Minimal Agent Version
context.count synchronous WIN-2.0.0

Output Parameters:

Name Type Description
count number Number of items.

Sample Code:

await irpa_outlook.calendar.context.count();



Get Calendar Item Details

Within a specified context, retrieve the current calendar item.


Technical Name Type Minimal Agent Version
context.getCurrentItem synchronous WIN-2.0.0

Input Parameters:

Name Type Attributes Default Description
propertiesFilter irpa_outlook.calendarItemPropertiesFilter optional The filter to determine which properties to return. If no filter is provided, then all handled fields except for recipients and attachments are returned.

Output Parameters:

Name Type Description
calendarItemDetail irpa_outlook.calendarItemDetails Details of the calendar item.

Sample Code:

await irpa_outlook.calendar.context.getCurrentItem();



Get Last Calendar Item (Context)

Within a specified context, make the last calendar item as the current calendar item.


Technical Name Type Minimal Agent Version
context.getLast synchronous WIN-2.0.0

Sample Code:

await irpa_outlook.calendar.context.getLast();



Get First Calendar Item (Context)

Within a specified context, make the first calendar item as the current calendar item.


Technical Name Type Minimal Agent Version
context.getFirst synchronous WIN-2.0.0

Sample Code:

await irpa_outlook.calendar.context.getFirst();



Get Next Calendar Item (Context)

Within a specified context, make the next calendar item as the current calendar item.


Technical Name Type Minimal Agent Version
context.getNext synchronous WIN-2.0.0

Sample Code:

await irpa_outlook.calendar.context.getNext();



Get Previous Calendar Item (Context)

Within a specified context, make the previous calendar item as the current calendar item.


Technical Name Type Minimal Agent Version
context.getPrevious synchronous WIN-2.0.0

Sample Code:

await irpa_outlook.calendar.context.getPrevious();



Save Calendar Item Attachment

Save the attachment of the current calendar item.


Technical Name Type Minimal Agent Version
calendarItem.saveAttachment synchronous WIN-2.0.0

Input Parameters:

Name Type Attributes Default Description
destinationPath string mandatory Path of the folder where the attachments are to be saved.
attachmentFileName string mandatory Name of the attachment to save.

Sample Code:

await irpa_outlook.calendar.calendarItem.saveAttachment("C:\\temp\\Attachments", "MyAttachment.jpg");

Sample Code:

await irpa_outlook.calendar.calendarItem.saveAttachment("%temp%\\Attachments", "MyAttachment.jpg");

Errors:

Error Class Package Description
ContextError irpa_outlook No calendar item found in context
InvalidArgument irpa_core Invalid argument
NotFound irpa_core Destination folder not found


Save All Calendar Item Attachments

Save all attachments of the current calendar item.


Technical Name Type Minimal Agent Version
calendarItem.saveAllAttachments synchronous WIN-2.0.0

Input Parameters:

Name Type Attributes Default Description
destinationPath string mandatory Path of the folder where the attachments are to be saved.
extensionsToSkip string optional Extensions to exclude from the attachment save. Multiple extensions must be semi-colon separated, e.g. 'pdf;xlsx;png'.
extensionsToKeep string optional Extensions to include in the attachment save. Multiple extensions must be semi-colon separated, e.g. 'pdf;xlsx;png'.

Output Parameters:

Name Type Description
attachmentsSavedList Array. List of the filenames of the saved attachments.

Sample Code:

let attachmentsSavedList = await irpa_outlook.calendar.calendarItem.saveAllAttachments("C:\\temp\\Attachments", undefined, "pdf;jpg;png;doc");

Sample Code:

let attachmentsSavedList = await irpa_outlook.calendar.calendarItem.saveAllAttachments("%temp%\\Attachments", undefined, "pdf;jpg;png;doc");

Errors:

Error Class Package Description
ContextError irpa_outlook No calendar item found in context
InvalidArgument irpa_core No folder defined to save attachments
NotFound irpa_core Destination folder not found


Forward Calendar Item

Forward the current calendar item.


Technical Name Type Minimal Agent Version
calendarItem.forward synchronous WIN-2.0.0

Input Parameters:

Name Type Attributes Default Description
forwardParameters irpa_outlook.calendarForwardParameters mandatory Forward parameters.

Sample Code:

await irpa_outlook.calendar.calendarItem.forward({To: 'foo@gmail.com', Body: 'Meeting is <b>attached</b>'});

Errors:

Error Class Package Description
ContextError irpa_outlook No calendar item found in context
InvalidArgument irpa_core Missing mandatory field : recipient (RequeredAttendees, OptionalAttendees or ResourceAttendees)


Answer Calendar Item

Answer to a meeting request.


Technical Name Type Minimal Agent Version
calendarItem.respond synchronous WIN-2.0.0

Input Parameters:

Name Type Attributes Default Description
response irpa_outlook.enums.olResponseStatus mandatory Answer

Sample Code:

await irpa_outlook.calendar.calendarItem.respond(enums.olResponseStatus.accept);

Errors:

Error Class Package Description
ContextError irpa_outlook No calendar item found in context


Delete Calendar Item

Delete the current calendar item.


Technical Name Type Minimal Agent Version
calendarItem.delete synchronous WIN-2.0.0

Sample Code:

await irpa_outlook.calendar.calendarItem.delete();

Note:

Deleting a calendar resets the current calendar in the context. A good practice is to use Get First calendar item or Get Last calendar item activity to select a valid calendar item after deletion.

Errors:

Error Class Package Description
ContextError irpa_outlook No calendar item found in context