The Box API offers a playground for enhancing content management and collaboration within your cloud storage. With Pipedream, you can orchestrate Box's functionality to automate document handling, streamline approval flows, sync files across apps, and trigger actions based on file events. Think of Pipedream as the glue that allows you to connect Box with your tech stack, triggering workflows with new file uploads, comments, or when sharing settings change, to enhance productivity and minimize manual labor.
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
box: {
type: "app",
app: "box",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://api.box.com/2.0/users/me`,
headers: {
Authorization: `Bearer ${this.box.$auth.oauth_access_token}`,
},
})
},
})
Automated Document Backup: When a new file is uploaded to a specific Box folder, a Pipedream workflow can automatically back it up to a secondary cloud storage like Google Drive or AWS S3, ensuring redundancy and compliance with data backup policies.
Content Approval Pipeline: Kick off a content approval process whenever a document is added to a designated Box folder. Use Pipedream to notify a Slack channel, await approvals or rejections through Slack interactions, and move the file to an "Approved" or "Rejected" folder based on the response.
CRM Attachment Sync: Integrate Box with a CRM platform like Salesforce. When a sales contract is uploaded to Box, Pipedream can automatically attach the file to the relevant opportunity in Salesforce, streamlining record-keeping and ensuring all team members have access to the latest documents.
Emit new event when an event with subscribed event source triggered on a target. See the documentation
Emit new event when a new file uploaded on a target. See the documentation
Emit new event when a new folder created on a target. See the documentation
Downloads a file from Box to your workflow's /tmp
directory. See the documentation
Searches for files, folders, web links, and shared files across the users content or across the entire enterprise. See the documentation.
Box uses OAuth authentication. When you connect your Box account, Pipedream will open a popup window where you can sign into Box and grant Pipedream permission to connect to your account. Pipedream securely stores and automatically refreshes the OAuth tokens so you can easily authenticate any Box API.
Pipedream requests the following authorization scopes when you connect your account:
GET
https://account.box.com/api/oauth2/authorize
?
client_id={{oauth.client_id}}
&
redirect_uri={{oauth.redirect_uri}}
&
state={{oauth.state}}
&
response_type=code
&
scope={{oauth.space_separated_scopes}}
POST
https://api.box.com/oauth2/token
content-type: application/x-www-form-urlencoded
accept: application/json
client_id={{oauth.client_id}}
&
client_secret={{oauth.client_secret}}
&
redirect_uri={{oauth.redirect_uri}}
&
grant_type=authorization_code
&
code={{oauth.code}}
POST
https://api.box.com/oauth2/token
content-type: application/x-www-form-urlencoded
accept: application/json
client_id={{oauth.client_id}}
&
client_secret={{oauth.client_secret}}
&
grant_type=refresh_token
&
refresh_token={{oauth.refresh_token}}