Sign Up
Loading...

Microsoft OneDrive commands

Use these commands from an endpoint, server function or event. Choose Add Command → Connector → Microsoft OneDrive, select the action, then choose an Account. Selecting an account reveals the remaining inputs. When the command returns a result, open OUTPUT and use Return as to name it for later commands.

All connector references · Connect an account · AI setup and shared results

List root files

Read files and folders immediately under the connected user’s drive root.

Inputs

InputTypeHow to use it
AccountAccountRequired. Choose a saved Microsoft OneDrive connection from this workspace’s account selector. Create or reconnect it in Settings > Connectors first. Do not paste a password, API key or token into this field. Connect through the provider’s authorization screen. If setup is unavailable, ask your Twidget administrator to configure this connection.
LimitnumberOptional. Maximum items requested in this page. Omit for 25; use a whole number from 1 to 100. The provider may return fewer items.
CursortextOptional. Continuation value from nextCursor. Omit for the first page. Copy it unchanged and keep the same filters. Use nextCursor, not the full @odata.nextLink URL. Twidget text limit: 16,384 characters; provider-specific limits may be lower.

Result

Returns drive items in value plus nextCursor and hasMore. Put nextCursor into Cursor, not the full @odata.nextLink. Subfolders are not traversed.

Example

Choose your Microsoft OneDrive Account and add List root files. Set Limit = 10. Leave Cursor unset for the first page. These are illustrative values: replace example IDs and addresses with your own permitted test values. Inspect the returned result before continuing.

Errors and limits

Check drive-item IDs and delegated file access. Folder creation fails on a conflicting name. Reconnect an unavailable connection in Settings > Connectors. Isolated tests and live debugging do not contact external services; Use live data is needed for an intended live call. If rate-limited, wait before retrying. Total input is limited to 64 KiB and results to 2 MiB; use smaller pages, narrower filters or less depth when too large. Calls wait up to 30 seconds, or less if the workflow reaches its own time limit. A timeout does not prove that a create/send failed, so check the provider before repeating it.

Get file metadata

Read file or folder metadata without downloading its contents.

Inputs

InputTypeHow to use it
AccountAccountRequired. Choose a saved Microsoft OneDrive connection from this workspace’s account selector. Create or reconnect it in Settings > Connectors first. Do not paste a password, API key or token into this field. Connect through the provider’s authorization screen. If setup is unavailable, ask your Twidget administrator to configure this connection.
FiletextRequired. Drive-item id from List root files or another result. Do not use a file name or download URL. Twidget text limit: 8,192 characters; provider-specific limits may be lower.

Result

Returns the drive-item object with id, name and available file/folder details. It does not download file contents.

Example

Choose your Microsoft OneDrive Account and add Get file metadata. Set File = "01DEMOFILEID". These are illustrative values: replace example IDs and addresses with your own permitted test values. Inspect the returned result before continuing.

Errors and limits

Check drive-item IDs and delegated file access. Folder creation fails on a conflicting name. Reconnect an unavailable connection in Settings > Connectors. Isolated tests and live debugging do not contact external services; Use live data is needed for an intended live call. If rate-limited, wait before retrying. Total input is limited to 64 KiB and results to 2 MiB; use smaller pages, narrower filters or less depth when too large. Calls wait up to 30 seconds, or less if the workflow reaches its own time limit. A timeout does not prove that a create/send failed, so check the provider before repeating it.

Create folder

Create a folder under a chosen OneDrive parent folder.

Inputs

InputTypeHow to use it
AccountAccountRequired. Choose a saved Microsoft OneDrive connection from this workspace’s account selector. Create or reconnect it in Settings > Connectors first. Do not paste a password, API key or token into this field. Connect through the provider’s authorization screen. If setup is unavailable, ask your Twidget administrator to configure this connection.
ParenttextRequired. Parent folder drive-item id from a drive result. Use a folder ID, not a path or file name. Twidget text limit: 8,192 characters; provider-specific limits may be lower.
NametextRequired. Name of the new child folder. A name conflict fails rather than replacing or renaming an existing folder. Twidget text limit: 32,768 characters; provider-specific limits may be lower.

Result

Returns the new folder drive-item object. Name conflicts fail rather than silently replacing or renaming a folder.

Example

Choose your Microsoft OneDrive Account and add Create folder. Set Parent = "01DEMOPARENTID"; Name = "Demo exports". These are illustrative values: replace example IDs and addresses with your own permitted test values. An intended live run creates/changes data or sends a message; inspect its receipt before repeating it.

Errors and limits

Check drive-item IDs and delegated file access. Folder creation fails on a conflicting name. Reconnect an unavailable connection in Settings > Connectors. Isolated tests and live debugging do not contact external services; Use live data is needed for an intended live call. If rate-limited, wait before retrying. Total input is limited to 64 KiB and results to 2 MiB; use smaller pages, narrower filters or less depth when too large. Calls wait up to 30 seconds, or less if the workflow reaches its own time limit. A timeout does not prove that a create/send failed, so check the provider before repeating it.

Test safely

Isolated tests and live debugging do not call connected providers. Enable Use live data only when you intend to contact the account. Writes, messages and AI requests can change real data or incur provider charges. A successful connection check does not prove access to every action. These examples explain the command contract; they are not evidence of a completed live provider request.

Related Topics

Google Calendar commands

Use these commands from an endpoint, server function or event. Choose Add Command → Connector → Google Calendar, select the action, then choose an Account. Selecting an account reveals the remaining inputs. When the command returns a result, open OUTPUT and use Return as to name it for later command...

Airtable commands

Use these commands from an endpoint, server function or event. Choose Add Command → Connector → Airtable, select the action, then choose an Account. Selecting an account reveals the remaining inputs. When the command returns a result, open OUTPUT and use Return as to name it for later commands. [All...

Zendesk commands

Use these commands from an endpoint, server function or event. Choose Add Command → Connector → Zendesk, select the action, then choose an Account. Selecting an account reveals the remaining inputs. When the command returns a result, open OUTPUT and use Return as to name it for later commands. [All ...

Connector command reference

Find detailed inputs, results, examples and common errors for every command in the 56-app connector library. Open an action below or use its help button in the editor. [Business connector setup](/docs/commands/business-connectors) · [AI connector setup](/docs/commands/ai-connectors) - [Google Drive]...

Slack commands

Use these commands from an endpoint, server function or event. Choose Add Command → Connector → Slack, select the action, then choose an Account. Selecting an account reveals the remaining inputs. When the command returns a result, open OUTPUT and use Return as to name it for later commands. [All co...