Hi everyone,
I'm trying to build a Confluence automation that sends the entire content of a page via email whenever I trigger it manually from that page.
What I want:
What I've tried so far:
{{page.body.storage}} in the email body → this only outputs the raw storage format (XML with ac: and ri: tags), which is unreadable in an email.
Send web request to the REST API to get rendered HTML:
https://<mydomain>.atlassian.net/wiki/rest/api/content/{{page.id}}?expand=body.export_viewwith {{webResponse.body.body.export_view.value}} in the email. → This returns 403 "Current user not permitted to use Confluence", and after adding an Authorization: Basic header with an API token, I now get a 401 Unauthorized.
Rovo agent to convert the storage format into HTML → works, but the output is inconsistent every time (sometimes with links, sometimes with **, different formatting on each run), so it's not reliable for a recurring email.
Hola,
You've run into a limitation in Confluence Automation. There isn't currently a supported smart value that returns the fully rendered page body for use in an email. Atlassian is tracking that exact gap in CONFCLOUD-83388, including the use case of sending full-page content via email.
Of the approaches you've tried, I'd continue with the REST API rather than Rovo. body.export_view is intended to return Confluence-rendered HTML, so it's much more deterministic than asking an AI action to translate the storage representation on every run.
The 403 you initially received makes sense because Send web request doesn't automatically make the REST call as the person who manually triggered the flow. The REST request still needs its own authentication, and that authenticated account must have permission to view the page.
The 401 after adding an API token may have a fairly specific explanation. Atlassian now has both classic and scoped API tokens, and they use different API URLs. If you created a scoped token, it won't authenticate against: https://<site>.atlassian.net/wiki/rest/api/...
Instead, scoped Confluence tokens must go through: https://api.atlassian.com/ex/confluence/<cloudId>/wiki/rest/api/...
That behavior is documented here.
So I'd first check which type of token you created. With a classic API token, your existing site-specific URL, and a Basic Authorization header containing base64(email:token), you're good to go. With a scoped token or service account token, change the URL to api.atlassian.com, ensure the token has read access to Confluence content, and ensure the account can view the page itself.
Once the request returns 200, keep the Send web request action configured to wait for the response and use the export_view value from the returned JSON in the following email action. I'd test first with a simple page containing headings, a table, links, and a task list before moving to pages with more complicated macros.
One caveat is that export_view gives you rendered Confluence HTML, not a purpose-built email representation. Most ordinary page content should translate reasonably well, but some Confluence-specific macros, embedded content, mentions, or relative resources may not render perfectly in an email client. I don't see a native Automation method today that guarantees a pixel-for-pixel email copy of an arbitrary Confluence page.
Thanks,
James
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.