Confluence Data Center/Server: Page created via HTTP Request (POST) from a template – view is ok, but the content is empty in edit mode

Hi everyone,
I’m having an issue with automatically creating Confluence pages based on a custom Confluence template (Confluence Data Center/Server, not Cloud) and I’m hoping you can help.

The created page renders correctly in view mode. But as soon as you click Edit, the editor shows the content as completely empty (as if the page body wasn’t stored).

Workflow (simplified)

  1. HTTP Request (GET): Fetch Confluence template
    GET /rest/experimental/template/{{templateId}}?expand=body.storage,version

  2. Code: Replace template variables + insert macros (incl. jiraIssueMacro and jiraFilterMacro)

  3. HTTP Request (POST): Create Confluence page
    POST /rest/api/content

Error message

No error message. The POST request succeeds, the page is created and displays correctly in view mode, but in edit mode the editor is empty.

Question

Does anyone have an idea what could cause this, or how the body needs to be sent so that the content is also available in edit mode?

If needed, I can share more details in an anonymized form.

Thanks!

Information on your n8n setup

  • n8n version: 2.8.3 self-hosted

welcome to the n8n community @JK-Flowlab
This usually happens when the body.storage you’re sending is valid for rendering, but not valid for editing.

Confluence can display the content in view mode, but if the storage format isn’t fully compatible (especially with macros or content coming from the experimental template API), the editor won’t be able to reconstruct it and shows it as empty.

I’d focus on validating the storage markup: try creating a page with simple content first, then add your macros step by step. In most cases, the issue comes from how the storage body is generated, not from the POST request itself.

This is a known Confluence thing, the REST API updates the published page but not the draft so when you hit Edit it loads the empty draft. Try adding "editor": { "value": "v2" } to your metadata properties in the POST body or do a second API call to update the draft after creating the page.