Box Upload Activity and Storage Report
On a schedule, the flow aggregates Box activity - uploads, downloads, top contributors, storage by folder/user, and externally shared counts - stores a snapshot in Dataverse, and posts a usage report to Teams plus a Power BI dashboard refresh. Gives visibility into Box usage and growth.
Provided as-is, without warranty of any kind. Review and test each pattern in a non-production environment before deploying it to live automations. See our Terms.
Overview
On a schedule, this flow gives IT and leadership visibility into Box usage and growth. Every Monday at 07:00 it enumerates a monitored Box folder subtree, aggregates storage metrics, pulls recent activity (uploads / downloads / external shares) from the Box Admin Events API, writes a point-in-time snapshot to a Dataverse table, refreshes a Power BI dataset, and posts a usage report to a Teams channel.
Why it matters: Box storage and sharing grow unmonitored. A recurring snapshot surfaces growth trends, heavy contributors, and sharing risk, and feeds a Power BI dashboard for historical reporting.
Ships Off (demo).
Use Case
IT admins and executives want a regular, automated Box usage and storage report - storage by folder, activity counts, top contributors - captured as history in Dataverse and surfaced in Power BI and Teams without manual pulls from the Box admin console.
Flow Architecture
Weekly Monday 07:00
RecurrenceReport cadence.
Initialize Config & Accumulators
Initialize variableMints a correlation id and binds the Box folder, Box admin token, lookback hours, Power BI workspace/dataset, and Teams ids; sets file/folder/byte accumulators.
Walk Folder for Storage Metrics
Box - ListFolder (x2)Lists the monitored folder and each subfolder to total files, folders, bytes, and a per-folder breakdown (one level deep).
Get & Filter Box Activity
HTTP + Parse JSON + Filter arrayPulls recent events from the Box Admin Events API and counts uploads, downloads, and share events.
Create Snapshot
Microsoft Dataverse - CreateRecordWrites the point-in-time usage snapshot row.
Refresh Power BI & Post Report
Power BI RefreshDataset + TeamsRefreshes the usage dashboard dataset and posts the HTML usage report to a Teams channel.
Environment Variables
| Schema name | Type | Default | Description |
|---|---|---|---|
| flowlibs_BoxMonitoredFolderId | String | 0 | Box folder id whose subtree is aggregated (0 = All Files root). |
| flowlibs_BoxAdminToken | String | REPLACE_WITH_KEYVAULT_REF | Box admin OAuth bearer token for the HTTP events call - Key Vault-backed. |
| flowlibs_BoxEventsLookbackHours | String | 168 | Hours of Box admin events to aggregate (168 = 7 days). |
| flowlibs_PowerBIWorkspaceId | String | REPLACE_WITH_PBI_WORKSPACE_ID | Power BI workspace (group) GUID containing the dataset. |
| flowlibs_PowerBIDatasetId | String | REPLACE_WITH_PBI_DATASET_ID | Power BI dataset GUID refreshed each run. |
| flowlibs_TeamsGroupId | String | <your-team-id> | Teams team (group) id for the report. |
| flowlibs_TeamsChannelId | String | <your-channel-id> | Teams channel id for the report. |
| flowlibs_UsageTable | String | flowlibs_boxusagesnapshots | Snapshot entity set name. |
Connectors & Connections
| Connector | API name | Actions used |
|---|---|---|
| Box | shared_box | ListFolder |
| HTTP | shared_http | GET /2.0/events?stream_type=admin_logs |
| Microsoft Dataverse | shared_commondataserviceforapps | CreateRecord |
| Power BI | shared_powerbi | RefreshDataset |
| Microsoft Teams |
Customization Guide
Almost every realistic variant of this flow can be implemented by changing environment variable values. A few cases require small edits inside the flow definition — those are called out explicitly below.
- Anomaly detection
- Add a Condition to flag a mass-download spike (e.g. downloadcount over a threshold) and escalate in the Teams message.
- Chargeback
- Extend the per-folder breakdown into storage-per-team by mapping top-level folders to teams and emitting one snapshot row per team.
- Trend
- Drive the Power BI report off the Dataverse snapshot history for week-over-week growth.
- Deeper recursion
- The storage walk is one level deep; for full-tree storage, wrap the subfolder list in a recursive child flow or a Do-until queue.
Key Expressions
The flow is intentionally light on Power Fx / WDL gymnastics — the heaviest expressions are the branch-name concatenation and the approval outcome check. They are listed below in the order they appear in the flow.
EXPR.01Storage GB
Total bytes to GB.
EXPR.02Events window (RFC3339)
Lookback start for the events query.
EXPR.03Share filter
Counts share-type events.
EXPR.04Top contributor
First uploader in the window.
Comments
Sign in to join the conversation.
Sign inNo comments yet. Be the first to share your experience with this flow.