SharePoint Online - Set document set approval status

Use SharePoint Online - Set document set approval status action A tool for building the processes, logic, and direction within workflows. Actions are the steps the workflow performs to complete a process. to set a specified approval status for the document set(s) in a specified SharePoint Online document library.

For example, you can automate an expense claim process using this action. The accounts team may approve, reject, or mark pending for the employee’s expense documents stored within a document set.

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

Configure the SharePoint Online - Set document set approval status action

Prerequisites 

Set the approval settings for a SharePoint Online site or library. For more information and instructions, see this Microsoft help article.

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 an action to the workflow.

  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 are available in the drop-down. For more information about authentication methods for SharePoint Online connections, see Authentication methods for SharePoint Online connections.

  1. Type a SharePoint site URL and click Retrieve libraries.
    Example:https://domain.sharepoint.com/sites/hr

  2. Select the source Document library that contains the document set(s) for which you want to set the approval status.
  3. Type a value for Document set limit. Maximum limit is 100 document sets.
  4. Important: If you are performing this action on a document set/library containing more than 5,000 items at the root level, the workflow will fail. For example, if your library contains 15,000 items (overall) and 4500 at the root level, your workflow will run successfully. However, if your library contains 15,000 items (overall) and 6000 at the root level, your workflow will fail.

  5. Select a suitable Approval status to set on the items in the selected document library.

SharePoint Online - Set document 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 that enables workflows to communicate with external systems, services, or applications. It's 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 access the SharePoint Online site in which the source document library is available. (n/a)
Source library

SharePoint site URL

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

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

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

Boolean, Collection, DateTime, Decimal, Integer, Text

 

Document library

The name of the library that you want to use for this action.

Boolean, Collection, DateTime, Decimal, Integer, Text

Conditions Add conditions/Edit conditions

Add or edit conditions to select the document sets to update. Only the document sets 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 document sets in subfolders Option used to apply this action on the document set(s) within the subfolder(s) in the specified source document library. (n/a)
  Document set limit

Value to indicate the maximum number of document sets that can be used for this action. Maximum limit is 100 document sets.

Integer
  Approval status

Options to set the approval status for the selected document set(s) in the source document library. Select an option:

  • Approved: When set to approved, the item(s) will become visible to all users.
  • Rejected: When set to rejected, the item(s) will be returned to its creator and only be visible to its creator and all users who can see draft items.
  • Pending: When set to pending, the item(s) will remain visible to its creator and all users who can see draft items.
(n/a)
  Comments Field to include any comments about why the item is approved, rejected, or in pending status. Boolean, Collection, DateTime, Decimal, Integer, Text
Output Result

Stores the result of the action as an object containing the following variables.

Object