πŸš€ Automating File Routing in Box with AWS Lambda & Webhooks

Business Applications Specialist (Technical Product Manager) - Doctors of BC | 2025

GitHub

Problem Statement

Box Relay is a powerful workflow automation tool for many content-centric processes. However, one of its limitations is that it doesn’t support routing files to folders based on custom metadata values. For example, you might want all uploaded invoices tagged with department=HR to go into a dedicated folder for Human Resource, and those tagged with FR into Finance's folder. Relay cannot directly express this routing logic, especially when combined with complex metadata validation.
The result?

Solution

By leveraging AWS Lambda and Box Webhooks, we can create a lightweight, scalable solution to automatically route files as soon as they land in an intake folder. The flow looks like this:

This approach is:

  • Flexible – Any logic supported in code can be applied (metadata validation, error handling, default routes).
  • Efficient – Uses a cached OAuth2 token, parallel Box API calls, and avoids unnecessary moves.
  • Secure – With webhook signature validation and environment-based folder mappings.
  • Architecture Overview

      
    

    Tech Stack

    Possible Applications

    ← Back to Home