Share an HTML report in Microsoft Teams
Dragging report.html into a channel feels like the right move, and it
is the one thing Teams handles worst.
Why the upload doesn't render
A channel's Files tab isn't Teams storage — it's a SharePoint
document library. SharePoint Online disables custom script on modern
sites by default, and an .html file living there is served as a
download rather than rendered as a page. Teams shows a file card; the
click produces a copy in someone's downloads folder.
From there it's the local-file problem in full: the assets folder didn't
travel, fetch is blocked on the file:// origin, and on the Teams
mobile app there's no sensible way to open it at all. See
opening a local HTML file.
And you now have N copies in N downloads folders, one per person who clicked, each frozen at the moment they clicked it.
Post a link instead
Publish the report once:
curl -X POST https://commareports.com/api/v1/reports \
-H "Authorization: Bearer $COMMA_API_TOKEN" \
-H "Content-Type: application/json" \
-d "$(jq -n --rawfile html report.html \
'{title: "Nightly suite — main", html: $html, visibility: "registered"}')"
Paste the URL in the channel. It opens in the browser on desktop and in the Teams mobile app's web view, it's the same document for everyone, and it stays current when the report is refreshed.
Keeping it internal
A channel post is visible to the channel, but a link is a link — someone will forward it. The access check lives on the report, not on the message:
private— you and the report's team.registered— any signed-in Comma user.- Domain gating and named reviewers for the "this stays inside the company" case.
Details in sharing & access control.
Automating the post
If the report comes out of a pipeline, PATCH the same report id every run so the URL never changes, then let your existing Teams incoming webhook post that one URL:
curl -fsS -X PATCH "https://commareports.com/api/v1/reports/$REPORT_ID" \
-H "Authorization: Bearer $COMMA_API_TOKEN" \
-H "Content-Type: application/json" \
-d "$(jq -n --rawfile html report.html '{html: $html}')"
One stable link in the channel topic beats a new file card every night. More in publishing from CI.
Where the discussion goes
The reason a report in a chat channel decays is that the response to it is also in the chat channel — twenty messages down by the next morning. Anchored comments put the question on the row it's about, and it's still there on the next run.
Try it
Comma is free — unlimited reports, unlimited commenters, unlimited revision history.
Publish a report for your channel →