Upsert a Page by Title
A 5-step recipe with Confluence. We can help you get access.
Recipe · 5 steps
Upsert a Page by Title
with Confluence
Works with AI assistants
Upsert a single Confluence page into a space, keyed on the page title.
- Resolve the supplied space key to the numeric space id required to filter pages and to write.
- Search the resolved space for a current page whose title exactly matches the supplied title, returning at most one match.
- Read the matched page to capture its current version number. Confluence rejects an update that does not carry the next sequential version.
- Replace the matched page body with the supplied content, incrementing the version number by one. A 409 here means another writer moved the version first and the flow should be retried from findPage.
- Create a new page in the resolved space when no page matched the title.
What you'll need to have ready
- spaceKey: The space key to upsert the page into (e.g. "ENG").
- title: The page title used as the natural key for the match.
- body: The page body in Confluence storage format (XHTML).
- versionMessage: Optional changelog message recorded on the new version when updating.
- newVersionNumber: The version number to write on the update path, which Confluence requires to be the current version plus one. Arazzo runtime expressions have no arithmetic, so
For your developer
Arazzo workflow confluence:upsert-page-by-title, 5 operations: getSpaces → getPages → getPageById → updatePage → createPage. Specs on APIs.io.