Move or Rename Item

onedrive.move
ActionFiles & storageconnection required

Calls the OneDrive API with the connection's credentials.

Move an item into another folder, rename it, or both, by patching its parent reference and name.

Connection

Required
Yes — the node will not save without one
Auth type
OAuth 2.0
Providers
OneDrive
Secret shape
{"client_id": "…", "client_secret": "…", "refresh_token": "…"} with the Files.ReadWrite delegated scope
Config it needs
tenant, drive_id
Resolved by
config.connection_id, else node.connection_id

Configuration

5 fields, none required. A dotted path is a nested object and name[] an array of objects — the editor renders the same tree.

FieldTypeRequiredDefaultConstraintsExample
drive_id
The drive to act on. Leave blank for the connected user's own OneDrive (/me/drive). A SharePoint document library's drive id also works here.
stringNo———
item_id
The driveItem id, addressing it as /drives/{drive-id}/items/{item-id}. Takes precedence over item_path when both are set.
stringNo———
item_path
The item's path inside the drive, e.g. 'Reports/Q3.xlsx', addressing it as /drives/{drive-id}/root:/Reports/Q3.xlsx. Used when item_id is blank.
stringNo———
new_parent_id
Id of the folder to move the item into. Leave blank to rename in place.
stringNo———
new_name
New name for the item. Leave blank to keep the current name.
stringNo———
  • At least one of item_id, item_path must be set.
  • At least one of new_parent_id, new_name must be set.

Output

One shape.

result

FieldTypeExample
id
The driveItem id.
string—
name
The file or folder name.
string—
size
Size in bytes.
number—
web_url
Browser URL for the item.
string—
is_folder
True when the item is a folder.
boolean—
mime_type
The file's MIME type; empty for a folder.
string—
last_modified
ISO-8601 timestamp of the last change.
string—
created
ISO-8601 timestamp of creation.
string—
parent_id
The id of the containing folder.
string—
parent_path
The containing folder's drive-relative path.
string—
drive_id
The id of the drive the item lives in.
string—
{
  "created": "",
  "drive_id": "",
  "id": "",
  "is_folder": false,
  "last_modified": "",
  "mime_type": "",
  "name": "",
  "parent_id": "",
  "parent_path": "",
  "size": 0,
  "web_url": ""
}

See Move or Rename Item run in a workflow.

In a technical demo we add the OneDrive connection, drop the node on the canvas and let Workflow Health pre-flight it before the first real run.