Box Comment and Task to Teams Collaboration
When a comment or task is added on a Box file, the flow posts it to a mapped Teams channel with file context and a link, and mirrors Teams replies back as Box comments where possible. Keeps Box file collaboration visible to the team in Teams.
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
This solution keeps Box file collaboration visible in Microsoft Teams and closes the loop back to Box. A scheduled flow polls comments and tasks on the files in a watched Box folder and mirrors any new ones into a mapped Teams channel (with file context and a deep link). A second, event-driven flow watches that Teams channel and, when someone replies to a mirrored message, posts the reply back onto the originating Box file as a comment.
Why it matters: comments and tasks buried in Box go unseen by people who live in Teams. Surfacing them - and pushing replies back - keeps collaboration in one place without anyone leaving the tool they already use.
Two cloud flows plus one Dataverse mapping table in a single solution. Ships Off (demo).
Use Case
A team stores working files in Box but coordinates day-to-day in Teams. They want Box file discussions and tasks to appear automatically in the right Teams channel, and quick replies typed in Teams to land back on the Box file so the record of the conversation stays complete on both sides.
Flow Architecture
Poll Box On A Schedule (Flow 1)
Recurrence (15 min)Box has no comment/task trigger, so Flow 1 polls.
List Files & Read Comments/Tasks
Box ListFolder + HTTP GETEnumerates the watched folder (connector) and reads each file's comments and tasks via the Box REST API.
Mirror New Items to Teams
Dataverse ListRecords/CreateRecord + Teams + OutlookDe-dupes via the map table, posts new comments/tasks to Teams, emails the recipient on new tasks, and records the mapping.
When a New Channel Message Is Added (Flow 2)
Microsoft Teams - OnNewChannelMessageFires per new channel message (splitOn).
Detect Reply & Find Mapping
Condition + Dataverse ListRecordsOnly mirrors messages with a replyToId; finds which Box file the parent message maps to.
Post Reply Back to Box
HTTP POST /2.0/comments + Dataverse CreateRecordPosts the Teams reply back onto the Box file as a comment and records it.
Environment Variables
| Schema name | Type | Default | Description |
|---|---|---|---|
| flowlibs_BoxAccessToken | String | REPLACE_WITH_KEYVAULT_REF | Box OAuth bearer token for REST calls. |
| flowlibs_BoxMonitoredFolderId | String | 0 | Watched Box folder id. |
| flowlibs_TeamsGroupId | String | <your-team-id> | Target Teams team (group) id. |
| flowlibs_TeamsChannelId | String | <your-channel-id> | Target Teams channel id. |
| flowlibs_BoxThreadMapTable | String | flowlibs_boxthreadmaps | Dataverse entity set for the map table. |
| flowlibs_BoxCollabNotifyEmail | String | alerts@yourcompany.com | Recipient emailed on new Box tasks. |
Connectors & Connections
| Connector | API name | Actions used |
|---|---|---|
| Box | shared_box | ListFolder |
| HTTP | shared_http | GET /files/{id}/comments GET /files/{id}/tasks POST /comments |
| Microsoft Teams | shared_teams | OnNewChannelMessage PostMessageToConversation |
| Microsoft Dataverse | shared_commondataserviceforapps | ListRecords |
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.
- Watch multiple folders
- Replace the single monitored folder id with a JSON folder-to-channel map and loop folders, routing each to its own Teams channel.
- @mention the file owner
- Read owned_by from the Box file and prepend a Teams mention to the message body.
- Surface task due dates
- The task message includes due_at; add a Condition to flag tasks due within N days as high importance.
- Strip HTML from replies
- Teams bodies are HTML; add a Compose to convert to plain text before posting the Box comment.
- Switch to Box webhooks
- Replace the scheduled poll with a Box webhook posting to an HTTP-request-triggered flow for near-real-time mirroring.
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.01Box file deep link
Linked in the Teams message.
EXPR.02De-dup lookup filter
Finds an existing map row.
EXPR.03Is-a-reply test (Flow 2)
Only mirror replies, not root posts.
EXPR.04Mapped Box file id
Target file for the reply comment.
Comments
Sign in to join the conversation.
Sign inNo comments yet. Be the first to share your experience with this flow.