SharePointDirect is a command line interface that can be used by Robotic Process Automation solutions that do not have the capability to connect to SharePoint Online directly and needs to execute some Sharepoint actions (see functionalities/methods available below).
- C# - Language used
- CSOM - API used for accessing Sharepoint Online
- SharePointPnPCoreOnline - Extension methods for CSOM
- GetNumberOfItems - Gets the number of items in the provided list. Writes the result to C:\Apps\GetNumberOfItems.txt
- GetItemId - Gets the ID of the item by title. Writes the result to C:\Apps\GetItemId.txt
- AddItem - adds an item to the list Writes the result to C:\Apps\AddItem.txt
- DeleteItemById - deletes an item from the list using a provided ID. Writes the result to C:\Apps\DeleteItemById.txt
- UploadFileWithMeta - uploads a file to a specified library and adds the given properties. Writes the result to C:\Apps\UploadFileWithMeta.txt. Please note that the current version does not work when uploading to sub folders.
- UploadFileNoMeta - uploads a file to a specified library with no properties. Writes the result to C:\Apps\UploadFileNoMeta.txt. Please note that the current version does not work when uploading to sub folders.
- GetOneItem - Gets an item from the list based on a given title and writes the requested field name and field value to a txt file. Writes the result to C:\Apps\GetOneItem.txt.
- GetOldestItem - Gets the oldest item from the list. When successful, writes the result to C:\Apps\GetOldestItem.csv.
- GetItems - Gets the x number of items from provided list based on the columns provided. When successful, writes the result to C:\Apps\GetItems.csv.
Build the Solution
copy the debug/release folder to any destination then rename it
cd [renamed folder]
SharePointDirect [Method] <options>
In your Robotic Process Automation solution, execute the program via the command prompt with the required arguments
SharePointDirect GetNumberOfItems URL Listname
SharePointDirect GetItemId URL Listname ItemTitle
SharePointDirect AddItem URL Listname Field Value
SharePointDirect DeleteItemById URL Listname ID
SharePointDirect UploadFileWithMeta URL Listname Filepath <PropertyKey, PropertyValue>...
SharePointDirect UploadFileNoMeta URL Listname Filepath
SharePointDirect GetOneItem URL Listname <FieldName1 FieldName2>...
SharePointDirect GetOldestItem URL Listname
SharePointDirect GetItems URL Listname NumberOfRows <Column1 Column2 Column... >
- Exx Navarro - Initial work - exxmen
See also the list of contributors who participated in this project.
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
Please note that you need to have Visual Studio and at least .NET 4.1 installed on your machine to contribute
git clone https://github.com/exxmen/sharepointdirect.git
cd SharePointDirect
Build Solution in Visual Studio
This project is licensed under the MIT License - see the LICENSE.md file for details
- Hat tip to anyone whose code was used. If you want to be mentioned, please let me know.
- Inspired by Marcin's awesome Excel SharePoint REST API based tool