Embed an HTML report in Notion

Notion is where the doc lives, the report is an HTML file, and the two don't meet on their own.

Uploading the file doesn't work

Drop report.html into a page and Notion stores it as a file attachment. Clicking it downloads the file. What the reader then has is a local copy without its assets folder, opened from a file:// origin that blocks the fetch calls half of these reports rely on — the full list of ways that goes wrong is in opening a local HTML file.

The usual workaround is a screenshot pasted under a heading that says "latest numbers," with a date nobody updates.

The /embed block wants a URL

Notion's /embed renders a URL inside an iframe. So the report needs to be hosted somewhere that (a) serves it as a page and (b) permits framing from Notion.

Publish it to Comma, then use:

https://commareports.com/embed/REPORT_ID

and add the framing origin to that report's allowed embed origins:

  • https://www.notion.so — for the page inside your workspace.
  • https://yourteam.notion.site — additionally, if the page is published as a site. Origins are exact; a published site's host is its own origin, so add the one you actually use.

frame-ancestors is built from that same list, so the embed URL renders in Notion and nowhere else. Clear the list and every existing embed stops rendering on the next load.

Requirements on the report

An anonymous iframe can't authenticate anyone, so the endpoint is fail-closed. It serves a report only when it is public with the share link enabled, has at least one allowed embed origin, has no share password, isn't end-to-end encrypted and isn't archived. Anything else is a flat 404.

If the report can't be public-with-a-link, paste the share link as a bookmark instead and let access control run on click.

What you get over a pasted image

  • It's current. The embed serves the live revision, so a report refreshed from CI or on a schedule updates in the Notion page by itself.
  • It's interactive. The report runs in a nested sandboxed iframe (allow-scripts, no allow-same-origin), so a Plotly figure or a filterable table still works — see interactive HTML reports.
  • The report keeps its own comment layer, anchored to the content, rather than a Notion comment on a block that says "chart."

Try it

Comma is free — unlimited reports, unlimited commenters, unlimited revision history.

Publish a report to embed →

Related