Examples

End-to-end automation examples using the SharePoint BDK Book.

Overview

The SharePoint Book supports powerful automation capabilities for working with SharePoint sites, lists, and document libraries. This page provides end-to-end examples demonstrating how to use the Book’s procedures in an automation.

📝 Example 1: Employee Feedback Form

This automation demonstrates how to dynamically manage a SharePoint list for collecting employee feedback. It connects to a SharePoint site, creates a new list, adds a new column, and then simulates a form submission by creating a list item.

Manage an Employee Feedback Form
get sites from sharepoint whose name is "HR Resources"
use the first site as the site

create a list in the site
  the list name is "Employee Feedback Form"
use the above as the list

add a column to the list
  the name is "Satisfaction Score"
  the description is "Employee satisfaction rating from 1 to 5"
use the above as the column

retrieve column definitions from the list

create a json
use the above as the item body
set the item body's "Title" to "New Score"
set the item body's "Satisfaction Score" to "4"
add the item body to the list

get the list's items

📝 Example 2: Bulk Deletion

This automation example demonstrates how to perform bulk deletion in SharePoint. It creates and populates a list with multiple items. Then, the list is filtered to identify all entries where the "My Col" column is set to "Value 1". These entries are then deleted in bulk, showcasing an efficient method for removing targeted data.

Get some sites from SharePoint whose name is "Testing"
use the first site as the site

create a list in the site
  the list name is "Item Deletion Example"

retrieve the site's lists whose name is "Item Deletion Example"
get the first list
use the first list as the list

add a column to the list
  the name is "My Col"

create a json
use the above as the first body
set the first body's "Title" to "First Item"
set the first body's "My Col" to "Value 1"
add the first body to the list

create a json
use the above as the second body
set the second body's "Title" to "First Item"
set the second body's "My Col" to "Value 1"
add the second body to the list

create a json
use the above as the third body
set the third body's "Title" to "First Item"
set the third body's "My Col" to "Value 2"
add the third body to the list

retrieve the list as a table

get the list as the slist
get the slist's items whose "My Col" is "Value 1"
use the above as the deletable items
delete the deletable items from the list

retrieve the list as a table

Last updated

Was this helpful?