This workflow automates Box file operations via a webhook, creating folders, uploading, downloading, copying, and deleting files. Key nodes include Webhook (receives POST requests), Input Validation (sanitizes inputs), Check Operation Valid (verifies operation), Create Folder (makes Box folder), Read Binary File (loads local file), Upload File (uploads to Box), Get File Metadata (fetches file info), Download File, Copy File, Process Operations Result (summarizes results), Delete Original File, Delete Copied File, Delete Folder (cleans up), Success Response (returns JSON), and error responses (Invalid Operation, Folder Creation, File Read, Box Operations). It uses the Box API. Setup Requirements Install n8n from n8n.io or sign up at cloud.n8n.io. Import the JSON into n8n’s workflow editor. Create a Box app at developer.box.com (Custom App, OAuth 2.0); obtain Client ID and Secret. In n8n, configure boxOAuth2Api credentials with these details. Place a test file (e.g., /tmp/test-file.png) on the n8n server with read permissions. Configure the Webhook node by copying its URL (/box-operations). Set allowedOrigins (e.g., 'https://your-domain.com') for security. The workflow expects a JSON payload with 'operation' (e.g., full_lifecycle_test), 'folderName', 'fileName', and 'sourceFilePath'. Handle errors like invalid operation (400: Invalid operation), missing file (404: Source file could not be read), or invalid credentials (401: Unauthorized). Secure credentials and file paths. Testing and Deployment Import the JSON into n8n and activate the workflow. Configure Box credentials and place a test PNG in /tmp. Test the Webhook with a POST request (e.g., curl -X POST [webhook-url] -d '{"operation": "full_lifecycle_test"}' -H 'Content-Type: application/json'). Verify folder creation, file upload, metadata retrieval, copying, and cleanup; check Success Response JSON. Test error cases: invalid operation (400: Invalid operation), missing file (404: Source file could not be read), or incorrect credentials (401: Unauthorized). Monitor Box API limits (429: Too Many Requests). Integrate the webhook URL into your application, ensure file permissions, activate the workflow, and deploy for automated Box file management.
$6.99
Workflow steps: 20
Integrated apps: webhook, set, if