SharePoint - List user alert(s)

Declaration

<AMSHAREPOINT ACTIVITY="list_useralerts" SITEURL="text" USER="text" RESULTDATASET="text" />

Related Topics

Description

Retrieves a list of user alerts and creates and populates a dataset with results.

NOTE:
  • This activity only supports SharePoint 2016 and 2019 Server with the 64-bit version of Automate Desktop.
  • SharePoint-related error messages appearing in Automate Desktop are sent from your SharePoint site or server. Automate Desktop displays these messages verbatim. For information on SharePoint error messages, refer to Microsoft's SharePoint documentation.

Practical usage

Alerts are notifications of changes to content on a site that you receive as email messages or text messages to your mobile phone. This activity allows you to retrieve user alerts as a way to perform an activity on a batch of user alerts.

Parameters

Server

Property Type Required Default Markup Description
Site Text Yes (Empty) SITE="http://myServer/folder" The SharePoint site from which to retrieve alerts.
User Text Yes (Empty) USER="theUser" Specifies how to identify the user to retrieve a list of a user alerts for. The available options are:
  • Login - Identifies the user's by their login name.

  • Email - Identifies the user by their email address.

Create and populate dataset with SharePoint user alerts information Text Yes (Empty) RESULTDATASET="userAlerts" The name of the dataset to create and populate with information about the user alerts. See Datasets for more information.

Description

Error Causes

On Error

Additional notes

Datasets

A dataset is a multiple column, multiple row container object where every column represents a particular variable, and each row corresponds to a given member of the dataset in question. This activity creates and populates a dataset containing specific fields (rows) in addition to the standard dataset fields. The table below describes these fields (assuming the dataset name assigned was theDataset).

Name Type Return Value
theDataset.AlertFrequency Text The time interval for sending the alert.
theDataset.AlertType Text The type of object to which the alert applies, which can be a list or document library, a list item or document, or a custom object.
theDataset.AlwaysNotify Text If set to True, the user is notified when the alert is triggered. If set to False, the user will not receive the alert.
theDataset.DeliveryChannels Text The value that indicates the delivery method of the alert.
theDataset.EventType Text The type of event to which the alert applies.
theDataset.Filter Text The query in Collaborative Application Markup Language (CAML) for a filter to apply to the alert.
theDataset.ID Text The ID of the alert.
theDataset.Item Text The list item or document to which the alert applies.
theDataset.ItemID Text The integer that identifies the list item or document to which an alert applies in the parent collection of list items.
theDataset.List Text The list or document library to which the alert applies.
theDataset.ListID Text The globally unique identifier (GUID) of the list or document library to which the alert applies.
theDataset.Status Text The status of the alert.
theDataset.Title Text The title of the alert as displayed in the user interface.
theDataset.User Text The user object representing the user who created the alert.

Example

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.

Description

This sample task retrieves SharePoint user alerts for a user, and then creates and populates a dataset with the results.

Copy
<AMSHAREPOINT ACTIVITY="list_useralerts" SITEURL="http://myServer/folder" USER="theUser" RESULTDATASET="theUserAlertList" />