Add Collaboration

box.add_collaboration
ActionFiles & storageconnection required

Calls the Box API with the connection's credentials.

Invite a user or group to collaborate on a file or folder with a given role.

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

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

FieldTypeRequiredDefaultConstraintsExample
item_type
Whether the item is a file or a folder — Box uses a different path for each.
stringNofileone of "file", "folder"—
item_id
The id of the file or folder to act on.
stringYes———
role
The permission level to grant the collaborator.
stringNoviewerone of "editor", "viewer", "previewer", "uploader", "previewer uploader", "viewer uploader", "co-owner"—
login
The email address of the person to invite. Use this or accessible_by_id, not both.
stringNo—email format—
accessible_by_id
The Box user or group id to invite, instead of an email address.
stringNo———
accessible_by_type
Whether accessible_by_id names a user or a group.
stringConditionaluserone of "user", "group"; only with accessible_by_id—
notify
Whether Box should email the collaborator about the invitation.
booleanNo———
  • At least one of login, accessible_by_id must be set.

Example configuration

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

{
  "accessible_by_type": "user",
  "item_type": "file",
  "role": "viewer"
}

Output

One shape.

result

FieldTypeExample
id
The id of the collaboration Box created.
string—
type
Always 'collaboration'.
stringcollaboration
role
The role that was granted.
string—
status
Whether the invitation is accepted or pending.
string—
invite_email
The address invited, for a non-Box user.
string—
accessible_by.id
The id of the invited user or group.
string—
item.id
The id of the shared file or folder.
string—
{
  "accessible_by": {
    "id": ""
  },
  "id": "",
  "invite_email": "",
  "item": {
    "id": ""
  },
  "role": "",
  "status": "",
  "type": "collaboration"
}

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 Add Collaboration 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.