Connect to Sharepoint no-code

Create a no-code SharePoint step to upload files to Sharepoint sites, create folders, or share files.

Before you begin

Prepare to connect to Microsoft

As part of the integration, you need to whitelist the Next Matter domain and create a service account. See if you've completed all the required steps.

Upload files

You can upload files to a static or dynamic folder:

  • Static folder: A fixed folder path you select.
  • Dynamic folder: A path defined by data from previous workflow steps, such as variables or output.
  1. Click Workflows > + Create new... > Create a new workflow and give your workflow a name. If you have a workflow ready, click ... > Edit workflow.
  2. Click + Add step and select Integrations > Sharepoint.
  3. Click the step and click Configure integration.
  4. Select Upload file.
  5. Select Site. The drop-down list shows all sites you (or your user) have access to.
  6. Select Document library. This displays all document libraries in the selected Sharepoint site. Each Document library corresponds to a OneDrive instance.
  7. Select Folder. You can either select one of the following options:
    • Select connected folder: select a folder from the Sharepoint folders available in the selected Document library
    • Enter folder reference: if the folder appeared in a previous step (for example as output data, prefilled value, or a variable), you can select it using the data reference picker {}. Alternatively, you can enter the folder ID.
How do I find folder ID
  1. Log in to Graph Explorer.
  2. Run the following query:
    GET /me/drive/root/search(q='FolderName')
    • the FolderName (or a part of it) should be the name of the folder whose ID you're after.
    • The query will list all items with the search value together with their IDs.The id field (01ABCD23DEF456GHIJ78KL9MNO) is the Folder ID.
  1. Decide how to resolve name duplicates. You have the following options:
  • None: Overwrites the old file with the new one. This is also the default setting when you don't make the selection. If the file is overwritten, the original SharePoint web URL remains the same.
  • Rename: Renames the new file by adding a (number) or (copy) identifier
  • Fail: Prevents the upload of the new file with the same name. All the other files before the duplicate file get uploaded.
  1. Provide the URL of the file (comma-separated for multiple files).

📘

There are no restrictions to the type of files you can upload. You can also upload a file from an external drive (for example Google Drive) but the file must be publicly accessible. Files over 20MB may slow uploads or cause failures.

  1. Provide the new name for the file without the file extension (for example .jpg).
  • If you upload multiple files, the name will be used to create a schema. For example, if you name the file myfile, the next file will be called myfile-1, and then myfile-2.
  • We will use the original file format of the uploaded files.
  • If you leave the field blank, the original file names will be used.
How can I use the File name field

Creating your own name schema might be useful when your organization has its own naming conventions. The field enables combining free text and data references, so you can create a meaningful structure that allows for quick file identification.

For example, if a customer uploads photos of their broken car from their phone, the pictures might have random names. However, To make them recognizable, your schema might be {casenumber}-carphoto-{customernumber}. This way, when the files get uploaded in Sharepoint by the Next Matter step, they will follow a clear structure.

Additional information

Upload operation and empty files

  • If data reference to the file is empty (there was no uploaded file), the system skips the upload step without errors and retains files already existing on SharePoint.
  • When valid files are provided in a mixed list, the system handles them correctly, skipping missing references and processing valid ones.

Variables

When you create JSONPath variables for the uploaded file, you can follow this pattern: $.'Uploaded Files'[0].'Uploaded Drive Item Web' (file 1), $.'Uploaded Files'[1].'Uploaded Drive Item Web' (file 2), and so on.

Create a folder (in a parent folder)

  1. Click Workflows > + Create new... > Create a new workflow and give your workflow a name. If you have a workflow ready, click ... > Edit workflow.
  2. Click + Add step and select Integrations > Sharepoint.
  3. Click the step and click Configure integration.
  4. Select Create folder.
  5. Select Site. The drop-down list shows all sites you (or your user) have access to.
  6. Select Document library. This displays all document libraries in the selected Sharepoint site. Each Document library corresponds to a OneDrive instance.
  7. Select Folder. This will be the parent for the new folder. The drop-down list shows all folders within a document library.
  8. Enter the name for your new folder.
  9. Save your changes.

📘

The new folder access is defined by the SharePoint settings of your organization.

Share folder or file

You can share one folder or file per step.

  1. Click Workflows > + Create new... > Create a new workflow and give your workflow a name. If you have a workflow ready, click ... > Edit workflow.
  2. Click + Add step and select Integrations > Sharepoint.
  3. Click the step and click Configure integration.
  4. Select Share folder or file.
  5. Enter or reference Drive ID and Drive item ID.
How do I find the Drive ID

If you can't get the IDs from the response of a previous no-code step, you can get it programmatically.

  1. Log in to Graph Explorer.
  2. Get the Site ID by making the following call:
    GET https://graph.microsoft.com/v1.0/sites/YourDomainName.sharepoint.com:/sites/YourSiteName
  • Replace the YourDomainName and YourSiteName with real data for your organization
  1. Copy the Site ID from the response and use it in the following call that gets you the Drive ID (or the list of Drive IDs that you have on the site):
    GET https://graph.microsoft.com/v1.0/sites/ReturnedSiteID/drives
  • Replace the ReturnedSiteID with the ID returned by your GET Site ID call.
  • The response will list all the drives for this site together with the Drive IDs.
  1. Use the Drive ID where the folder is located to make this call: GET /drives/ReturnedDriveID/root/delta.
  • Replace the ReturnedDriveID with the ID returned by your GET Drive ID call.
  • This call will list all the changes to items in the Drive together with their IDs (which are the IDs of drive items).
  1. Enter a comma-separated list of recipients.
  2. Decide what access the recipients should have to the shared folder or file. They can have edit or view access.
  3. Select at least one option:
  • Require sign-in to access shared item: The recipients will need to sign in to Sharepoint
  • Send access link by email: The link to the shared item will be sent to the recipients' email inboxes
  1. (Optional) If you've selected to share the link by email, enter the message for the recipients.
  2. Save your changes.

📘

When you share a folder, users typically have access to everything within that folder unless unique permissions are set at the file or subfolder level.