Microsoft Sharepoint icon

Microsoft Sharepoint

Consume Microsoft SharePoint API

Overview

The Folder → Rename operation in the Microsoft SharePoint n8n node allows you to rename an existing folder within a specified SharePoint site. This is useful for maintaining organized folder structures, correcting naming errors, or updating folder names as project requirements change.

Common scenarios:

  • Standardizing folder names across a team or department.
  • Correcting typos or outdated folder names.
  • Automating folder renaming as part of a larger workflow (e.g., after moving or archiving content).

Example:
You have a folder named "2023 Reports" and want to rename it to "Archived 2023 Reports" automatically when the year ends.

Properties

Name Meaning
Site ID The identifier or name of the SharePoint site where the folder resides. Options include predefined site IDs such as "Financial".
Item ID The unique ID of the folder you wish to rename.
New Name The new name you want to assign to the folder.

Output

The output will be a JSON object representing the updated folder after renaming. The structure typically includes fields such as:

{
  "id": "string",
  "name": "string",
  "webUrl": "string",
  // ...other SharePoint folder metadata fields
}
  • id: The unique identifier of the folder.
  • name: The new name of the folder.
  • webUrl: The URL to access the folder in SharePoint.

No binary data is produced by this operation.

Dependencies

  • External Service: Requires access to Microsoft SharePoint.
  • Authentication: Needs valid OAuth2 credentials (microsoftSharepointOAuth2Api) configured in n8n.
  • n8n Configuration: Ensure the Microsoft SharePoint node is properly set up with the necessary permissions to read and modify folders.

Troubleshooting

Common issues:

  • Invalid Site ID or Item ID: If the provided Site ID or Item ID does not exist or is incorrect, the node will throw an error indicating that the resource could not be found.
  • Insufficient Permissions: If the connected account lacks permission to rename folders, you may receive an authorization error.
  • Empty New Name: If "New Name" is left blank, the API may reject the request or return an error.

Error messages and resolutions:

  • "Resource not found": Double-check the Site ID and Item ID values.
  • "Access denied": Verify that your OAuth2 credentials have sufficient permissions on the target SharePoint site.
  • "Invalid request body": Ensure that "New Name" is provided and valid.

Links and References

Discussion