Delete Folder

box.delete_folder
ActionFiles & storageconnection required

Calls the Box API with the connection's credentials.

Move a folder to the Box trash. Box refuses a folder that still has contents unless 'recursive' is switched on.

Connection

Required
Yes — the node will not save without one
Auth type
OAuth 2.0
Providers
Box
Secret shape
{"client_id": "…", "client_secret": "…", "box_subject_type": "enterprise|user", "box_subject_id": "…"} for a server-authentication app, or {"client_id": "…", "client_secret": "…", "refresh_token": "…"} for OAuth2
Resolved by
config.connection_id, else node.connection_id

Configuration

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

FieldTypeRequiredDefaultConstraintsExample
folder_id
The id of the folder to trash. The account root ('0') cannot be trashed, so this is always a real folder id.
stringYes——12345
recursive
Trash the folder together with everything inside it.
booleanNofalse——

Example configuration

Every value below is the contract’s own example or default — nothing invented.

{
  "folder_id": "12345",
  "recursive": false
}

Output

One shape.

result

FieldTypeExample
deleted
True when Box accepted the delete.
boolean—
id
The id of the folder that was trashed.
string—
type
Always 'folder'.
stringfolder
recursive
Whether the contents went with it.
boolean—
{
  "deleted": false,
  "id": "",
  "recursive": false,
  "type": "folder"
}

Notes

  • Uploads go to upload.box.com and everything else to api.box.com; the nodes pick the right host for you.
  • Use a Box server-authentication (Client Credentials) app for anything unattended: its credential can be exchanged for a token indefinitely. A plain OAuth2 refresh token is spent by its first use, so that connection needs re-authorising.
  • The root folder always has the id '0'.

See Delete Folder run in a workflow.

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