Sharepoint

Learning the Sharepoint Book

Make sure you have learned the Sharepoint book from the departments tab before working with the corresponding English.

Connecting to Sharepoint

To connect to you instance of sharepoint write the following in your automation:

connect to sharepoint

When you run the command, you'll be prompted to provide connection details:

  • client id
  • client secret
  • tenant id
Kognitos prompting user for connection details.

Kognitos prompting user for connection details.

Sharepoint Operations

Getting a Folder

To get a folder, you need the URL to the folder you want:

get a folder at "https://kognitosinc.sharepoint.com/sites/PresalesDemos/Shared%20Documents/ExcelFiles"

The formatting of the URL is very important, for example:

This is the URL we use in the automation:
https://kognitosinc.sharepoint.com/sites/PresalesDemos/Shared%20Documents/ExcelFiles

This is the URL if I were to copy from the browser:
https://kognitosinc.sharepoint.com/:f:/s/PresalesDemos/EjGzzRsBoEVGrts4Y6gCUMIB4TXvUy4Q3oN5QMC79wqTTg?e=bGA6dL

So please note, the URL as is when you copy from Sharepoint is formatted differently than the one we use in our automations!

Deleting a Folder

delete a folder at "https://test.sharepoint.com/sites/YOUR_FOLDER_PATH"

Getting the Files in a Folder

After you have gotten a folder from Sharepoint, you can access all of the files like this:

get the folder's files

Deleting a File

delete a file at "https://yoursharepointlink.com/sites/FILE_PATH"

Uploading a File to Sharepoint

# once you have located a folder in sharepoint
# and once you have access a file (can be pdf, Excel sheet, csv, image, etc)

upload the file to the folder where
  the filename is "boarding-pass.xlsx"