Create smaller CSV files from large Box uploads
CollaborationDocument ManagementUtilities
What it does
When a new CSV file lands in Box, this automation batches the data in groups of 10 lines. Each batch is validated for a user ID, converted to CSV format, and uploaded back to Box as a smaller file.
Who it's for
Operations teams who need to split large CSV files into manageable chunks for downstream processing.
Apps used
How teams use this
Split large customer exports for import
Upload a 10,000-row customer CSV to Box and let this automation break it into 1,000-row chunks. Each smaller file is ready to import into a downstream system without timeout errors.
Validate data before splitting files
Require a user ID on every batch so incomplete records are filtered out during the split. Only valid chunks are uploaded to Box for the team to use.
Add a notification when splits are done
Include a Slack message at the end so someone knows all batches have been uploaded and the smaller files are ready in Box. Set the message to tag the operations channel.
Archive the original file after splitting
Move the large CSV to an archive folder in Box once all batches are processed. Add a Box move step to keep the active folder clean and preserve the source for audit purposes.
How it works
- Detect new CSV file in Box. Monitor a Box folder for new CSV files. When one arrives, the automation starts and reads the file in batches of 10 lines to handle large datasets efficiently.
- Validate batch has user ID. Check each batch of 10 lines for a user ID field in Box. Skip batches that lack this required property since they cannot be processed downstream.
- Convert and upload CSV batch. Transform the validated batch from a list into CSV format using Box compose, then upload the smaller file back to Box. Each chunk is properly formatted for the next step.
- Repeat for all batches. Loop through the remaining batches in the original file, validating and uploading each one until all data is processed and split into smaller Box files.