Box ACTION
Create Collaboration
Adds a collaboration for a user or group on a file or folder, granting them access with a role (editor, viewer, previewer, uploader, previewer uploader, viewer uploader, or co-owner). Item Type must be
file or folder. Invite users by email or user ID; groups must be invited by group ID only. Can View Path applies only to folder collaborations. Use Delete Collaboration to revoke access. See the documentation.- Action
- Writes data
- OAuth
- SDK
- MCP
IMPLEMENTATION
Call this tool
Connect a user's Box account once, then configure and run Create Collaboration from your backend or agent.
import { PipedreamClient } from "@pipedream/sdk"
const pd = new PipedreamClient({
projectId: process.env.PIPEDREAM_PROJECT_ID!,
clientId: process.env.PIPEDREAM_CLIENT_ID!,
clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
projectEnvironment: "production",
})
const result = await pd.actions.run({
id: "box-create-collaboration",
externalUserId: "{external_user_id}", // any stable ID for this user in your system
configuredProps: {
box: { authProvisionId: "apn_xxxxxxx" },
itemType: "Item Type",
folderId: "Folder",
},
})
console.log(result)curl -X POST https://api.pipedream.com/v1/connect/{project_id}/actions/run \
-H "Content-Type: application/json" \
-H "X-PD-Environment: production" \
-H "Authorization: Bearer {access_token}" \
-d '{
"external_user_id": "{external_user_id}",
"id": "box-create-collaboration",
"configured_props": {
"box": { "authProvisionId": "apn_xxxxxxx" },
"itemType": "Item Type",
"folderId": "Folder"
}
}'// accessToken: mint a short-lived token with the Connect SDK — see the MCP guide
const transport = new StreamableHTTPClientTransport(
new URL("https://remote.mcp.pipedream.net/v3"),
{
requestInit: {
headers: {
Authorization: `Bearer ${accessToken}`,
"x-pd-project-id": "{project_id}",
"x-pd-environment": "production",
"x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
"x-pd-app-slug": "box",
},
},
},
)
const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)
const { tools } = await mcp.listTools()
// listTools() hands your model this tool's input schema, so it can
// fill the arguments itself:
const result = await mcp.callTool({
name: "box-create-collaboration",
arguments: {
itemType: "Item Type",
folderId: "Folder",
},
})SCHEMA
Inputs
Pipedream supplies the connected account. Your application provides the operation-specific values below. Dynamic inputs are resolved against that user's account.
| Property | Type | Description |
|---|---|---|
itemType Item Type | string | The type of Box item. Valid values: file or folder. Required |
folderId Folder | string | The folder to add a collaboration to when Item Type is folder. When Item Type is file, this instead scopes the File dropdown to a parent folder. Use 0 for the root folder. Use the List Folders action to retrieve folder IDs. Required Dynamic |
fileId File | string | The file to add a collaboration to (e.g. 123456789). Required when Item Type is file. Use the List Folder Items action to retrieve file IDs. Optional Dynamic |
canViewPath Can View Path | boolean | Whether the collaborator can view the parent path to the folder. Only applicable when Item Type is folder. Optional |
accessibleByType Collaborator Type | string | The type of collaborator to invite. Valid values: user or group. Groups must be identified by ID (not email). Required |
identifyBy Identify By | string | How to identify the user collaborator: by email or by ID. Only applicable when Collaborator Type is user (groups are always identified by ID via Collaborator ID). Optional |
login Email | string | The email address of the user to invite (e.g. user@example.com). Required when Collaborator Type is user and Identify By is email. Optional |
accessibleById Collaborator ID | string | The ID of the user or group to invite (e.g. 123456789). Required when Collaborator Type is group, or when Collaborator Type is user and Identify By is id. Optional |
role Role | string | The level of access granted. Valid values: editor, viewer, previewer, uploader, previewer uploader, viewer uploader, co-owner. Required |
notify Notify | boolean | Whether to notify the collaborator via email Optional |
REFERENCE
Tool details
Behavior hints are published with the component in the Pipedream registry and surface as MCP tool annotations, so an agent can reason about a tool before it calls it.
- Registry key
- box-create-collaboration
- Version
- 0.0.2
- App
- Box
- Authentication
- OAuth
- Read-only
- No
- Destructive
- No
- Open world
- Yes
- Source
- View on GitHub ↗