SharePoint Online - Set approval status

Use the SharePoint Online - Set approval status action A tool for building the processes, logic, and direction within workflows. to set the approval status for items in a list in SharePoint Online. You can set the approval status of the specified items to a value such as Approved, Rejected, Pending, Draft, or Scheduled.

For more information about the SharePoint Online connector, go to SharePoint Online.

Configure the SharePoint Online - Set approval status action

Prerequisites 

Content approval must be enabled on the destination list or document library for the action to run successfully. For instructions, see Steps to enable content approval for a SharePoint Online list.

Important: Before inserting variables in the action configuration, you must manually type or select the values and populate other dependent fields in order to retrieve the output data. Once configured, you can insert variables to the required fields.

  1. Add the action to the workflow and open the action configuration panel. For more information, see Add, rename, and copy actions.

  2. Select a SharePoint Online Connection. If you do not have a connection, see Add a connection.

    Note: 

    Only the connections created with the List and libraries authentication method will be available in the drop-down list.

    For more information about authentication methods for SharePoint Online connections, see Authentication methods for SharePoint Online connections.

  1. Type the SharePoint site URL that has the list with the items you want to update and click Retrieve lists.

    Example: https://domain.sharepoint.com/sites/hr

    All the lists in the specified site are displayed in a drop-down list in the List name field to select from.

  2. Select the List name of the list that has the item.
  3. Specify the maximum number of items in Item limit.
  4. Select the Approval status to set for the items.

SharePoint Online - Set approval status action fields and settings

Important: Before inserting variables in the action configuration, you must manually type or select the values and populate other dependent fields in order to retrieve the output data. Once configured, you can insert variables to the required fields.

Section Field Description Variable types
(unlabeled)

Connection Credentials and other settings required to pass data between the workflow and the indicated service, which could be a cloud service, business application, or content store.

SharePoint Online connection to use to access the SharePoint Online site.

To refresh the available connections, click Refresh.

(n/a)
Source list

SharePoint site URL

The URL of the SharePoint Online site that has the list or document library you want to use.

To retrieve the lists for the SharePoint site URL, type the SharePoint site URL and click Retrieve lists.

Example: https://domain.sharepoint.com/sites/hr

Text, Decimal, Integer, Boolean, DateTime, Collection

  List name

The list in the selected site that has the items you want to update.

The lists and document libraries within the site specified in SharePoint site URL are displayed in the drop-down list.

Important: 

Content approval must be enabled on the destination list or document library for the action to run successfully.

Text, Decimal, Integer, Boolean, DateTime, Collection

Conditions Add conditions/Edit conditions

Add or edit conditions to select the items to update. Only the items that match the conditions will be updated with the approval status.

For conditions involving columns with multiple values, you need to create conditions for each available value and select And or Or options accordingly.

Displays the condition builder to define new conditions or edit existing conditions.

  • Add conditions - Displayed when there are no existing conditions specified for the action.

  • Edit conditions - Displayed when there are existing conditions set for the action. You can edit the conditions.

The Condition builder supports nested conditions, enabling you to create conditions within another condition.

(n/a)
Condition builder When

Displays the items from the Column field of the selected list.

Note: 

The following columns are not supported in the Condition builder:

  • Calculated

  • Hyperlink

  • Managed Metadata

  • Multiple lines of text

Text, Decimal, Integer, Boolean, DateTime, Collection
  Operator

How the item from the When drop-down and Value are compared. Select from the drop-down.

The operators available in the drop-down depend on the data type of the item selected from the When drop-down.

(n/a)
  Value

The value you are expecting in the column (field) specified for When.

The data type of Value must match the data type of the item selected in the When drop-down.

(varies)
  Add

Adds a new condition. When adding a new condition you have to select the level of the condition.

Select Nested condition to nest the new condition within the condition above it.

(n/a)
  And/Or

The connecting operator to use for the conditions. If you select:

And: The workflow starts when the item that is added matches all the conditions.

Or: The workflow starts when the item that is added matches any one of the conditions.

(n/a)
  Edit

Displays the following options menu for a condition. The following options are available:

  • Promote: Promotes the condition to a higher level. Promote option is shown if the condition is nested within another condition and allows you to move it to a higher level.

  • Demote: Demotes the condition to a lower level. If you demote a condition it is moved to a lower level making it nested within the condition immediately above it.

  • Delete: Deletes the selected condition.

(n/a)
  Include folders

Select the check box if you want to change the status of folders as well.

(n/a)
  Include items in subfolders Select the check box if you want to change the status of items that are inside subfolders as well. (n/a)
  Item limit

The number of items to update

Maximum number of items allowed is 5000.

Minimum number of items required is 1.

Integer
  Approval status

Select the approval status to apply to the item.

  • Approved: The item becomes visible to users who have permission to view the list or library.
  • Rejected: The item will be returned to its creator and will only be visible to its creator and all users who can see draft items.
  • Pending: The item will remain visible to its creator and all users who can see draft items.
  • Draft: The item will be returned to its creator and only be visible to its creator and all users who can see draft items.
  • Scheduled: The item will remain visible to its creator and all users who can see draft items.
Boolean, Collection, DateTime, Decimal, Integer, Text
  Comments Comments to add to the approval status updates. Boolean, Collection, DateTime, Decimal, Integer, Text
Output Result

Store the result of the action in an object with the following variables:

  • All approval status' set: Boolean variable to store the result of the action. Returns Yes if status is successfully set for all specified items. Returns No, even if one fails.
  • List item ID(s): Collection variable to store the list item IDs of the updated items.
  • List item URL(s): Collection variable to store the list item URLs of the updated items.

Object