Box Connector
Sync files and folders from Box into LH42.
Features
- Files - Documents, PDFs, Office files
- Folders - Recursive folder sync
- Box Notes - Native notes as markdown
- Shared folders - Collaboration content
- Webhooks - Real-time update notifications
- Enterprise - Full enterprise account support
Prerequisites
- Box account (Personal, Business, or Enterprise)
- Folder access permissions
Setup
Step 1: Connect via OAuth
- Go to Settings > Integrations
- Find Box and click Connect
- Sign in with your Box account
- Grant the requested permissions
Step 2: Configure Sync Settings
python
client.connectors.configure("box", {
"settings": {
"folder_id": "0", # Root folder (0) or specific ID
"enterprise_id": "optional-enterprise", # For enterprise accounts
"include_notes": True, # Include Box Notes
"max_file_size_mb": 50
}
})Options:
folder_id: "0"syncs entire account- Specify folder ID to limit sync scope
enterprise_idfor admin-level access
Step 3: Start Initial Sync
python
client.connectors.sync("box", mode="full")Supported File Types
| Type | Extensions | Processing |
|---|---|---|
| Documents | .docx, .doc, .pdf | Text extraction |
| Presentations | .pptx, .ppt | Slide text extraction |
| Spreadsheets | .xlsx, .xls, .csv | Cell content |
| Text | .txt, .md, .html | Direct indexing |
| Box Notes | .boxnote | Markdown conversion |
API Reference
List Files
bash
GET /api/connectors/{connector_id}/files?folder_id=0&limit=50
# Response
{
"files": [
{
"id": "file_abc123",
"box_id": "123456789",
"name": "Q4 Report.pdf",
"size": 2048000,
"modified": "2026-01-20T10:30:00Z",
"synced": true
}
]
}List Folders
bash
GET /api/connectors/{connector_id}/folders?parent_id=0Sync Specific Folder
bash
POST /api/connectors/{connector_id}/sync
{
"mode": "incremental",
"filters": {
"folder_ids": ["123456789"]
}
}Webhook Support
Box supports webhooks for real-time updates:
python
# Enable webhooks for instant sync
client.connectors.configure("box", {
"settings": {
"enable_webhooks": True,
"webhook_events": ["FILE.UPLOADED", "FILE.TRASHED", "FILE.RESTORED"]
}
})Supported webhook events:
FILE.UPLOADED- New file addedFILE.TRASHED- File deletedFILE.RESTORED- File recoveredFILE.COPIED- File copiedFILE.MOVED- File relocated
Box Notes
Box Notes are converted to markdown:
- Headings and formatting preserved
- Checklists as markdown tasks
- Tables as markdown tables
- Images as references
Enterprise Features
For Box Enterprise accounts:
python
# Configure enterprise-wide access
client.connectors.configure("box", {
"settings": {
"enterprise_id": "12345",
"as_user": "admin@company.com" # Admin impersonation
}
})Sync Frequency
| Mode | Frequency | Use Case |
|---|---|---|
| Scheduled | Every 4 hours | Standard sync |
| On-demand | Manual trigger | Immediate updates |
| Webhook | Real-time | Enterprise recommended |
Troubleshooting
"Folder not accessible" errors
- Verify you have access to the folder
- Check folder ID is correct
Missing files
- Verify file type is supported
- Check file isn't over size limit
Webhook not firing
- Verify webhook is enabled in Box admin
- Check callback URL is accessible
Next Steps
- Custom Connectors - Build your own
- Integrations Overview - Architecture overview