Publish an HTML report to Snowflake Intelligence (Cowork)
When the user asks to publish or share an HTML report you authored (or that already exists locally) — whether they call it "Snowflake Intelligence", "SI", or "Cowork" — publish it as a report artifact by running the Cortex CLI below. Do not hand-roll a stage upload.
Before publishing: confirm who to share with
Sharing is grant-based (link sharing is off) and at least one role is required — publishing with no roles is rejected. The grant is the entire access decision, so who you share with matters.
- If the user already stated who to share with (a specific role, or explicitly "everyone"/"the whole account"), use exactly that.
- Otherwise you must ask first and wait for their answer — do not publish until they tell you. Ask whether to share with a specific Snowflake role or with everyone in the account.
- Never default to
PUBLIC.PUBLICgrants READ to everyone in the account; use it only when the user explicitly asked for account-wide/everyone access. If the request is vague, ask — do not assumePUBLIC.
Pass each chosen role as a --grant-role.
Command
cortex artifact publish-report <file.html> --title "<Report Title>" --grant-role <ROLE> [--grant-role <ROLE> ...] [--connection <name>]
<file.html>— the HTML report to publish (an.html/.htmfile in the current working directory).--title— human-readable title shown in Snowflake Intelligence / Cowork.--connection— optional; omit to use the active connection.--grant-role— required, repeatable; the role(s) to grant READ. A report must be shared with someone (link sharing is always off).PUBLICshares with everyone in the account — use it only when the user explicitly asked for that, never as a default (see "confirm who to share with" above).
What it does
- Copies the HTML into your workspace at
<workspace>/reports/<file>— an editable copy. - Publishes it as a report artifact with lineage back to that copy, so the "edit" button opens it.
- Re-running with the same file updates the same artifact (no duplicates).
After publishing
The command prints one line containing the artifact id, the workspace path, the
granted roles, and a Shareable link: URL. Report it back in exactly this
format and order, one field per line:
Shareable link: <the URL the command printed, character-for-character>
Shared with: <the roles from "Granted READ to">
Title: <report title>
Artifact ID: <artifact id>
Workspace copy: <workspace path>
Copy the link verbatim — never construct, guess, shorten, or re-case a URL. Do not omit "Shared with"; the user needs to know who can open the report. If the command reported a republish, say so.