Confluence · Arazzo Workflow

Confluence Publish a Blog Post and Read It Back

Version 1.0.0

Resolve a space by key, publish a blog post into it, and read the stored post back.

1 workflow 1 source API 1 provider
View Spec View on GitHub CollaborationContent ManagementDocumentationKnowledge BaseWikiArazzoWorkflows

Provider

confluence

Workflows

publish-blog-post
Publish a Confluence blog post into a space identified by key.
Looks up the space id for the supplied space key, creates a blog post there, and reads the created post back to confirm it persisted.
3 steps inputs: body, spaceKey, status, title outputs: blogPostId, spaceId, versionNumber, webui
1
resolveSpace
getSpaces
Resolve the supplied space key to the numeric space id required to create a blog post, confirming the space exists and is current.
2
createBlogPost
createBlogPost
Create the blog post in the resolved space. Creating with status draft stages it for review; status current publishes it immediately.
3
readBackBlogPost
getBlogPostById
Read the created blog post back in storage format to confirm it persisted and to capture the authoritative version for any later revision.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: Confluence Publish a Blog Post and Read It Back
  summary: Resolve a space by key, publish a blog post into it, and read the stored post back.
  description: >-
    Team announcements pushed into Confluence from a release pipeline or an
    internal comms tool land as blog posts rather than pages. Confluence v2
    addresses spaces by numeric id, so the flow resolves the space key first,
    creates the blog post with a storage-format body, and reads it back to
    capture the id, version, and web UI link worth publishing onward into chat
    or email. Every step spells out its request inline so the flow can be read
    and executed without opening the underlying OpenAPI description.
  version: 1.0.0
sourceDescriptions:
- name: confluenceCloudV2
  url: ../openapi/confluence-cloud-v2.yml
  type: openapi
workflows:
- workflowId: publish-blog-post
  summary: Publish a Confluence blog post into a space identified by key.
  description: >-
    Looks up the space id for the supplied space key, creates a blog post there,
    and reads the created post back to confirm it persisted.
  inputs:
    type: object
    required:
    - spaceKey
    - title
    - body
    properties:
      spaceKey:
        type: string
        description: The space key to publish the blog post into (e.g. "NEWS").
      title:
        type: string
        description: The title of the blog post.
      body:
        type: string
        description: The blog post body in Confluence storage format (XHTML).
      status:
        type: string
        description: Either "draft" to stage the post or "current" to publish it immediately.
  steps:
  - stepId: resolveSpace
    description: >-
      Resolve the supplied space key to the numeric space id required to create
      a blog post, confirming the space exists and is current.
    operationId: getSpaces
    parameters:
    - name: keys
      in: query
      value: $inputs.spaceKey
    - name: status
      in: query
      value: current
    - name: limit
      in: query
      value: 1
    successCriteria:
    - condition: $statusCode == 200
    - context: $response.body
      condition: $.results.length > 0
      type: jsonpath
    outputs:
      spaceId: $response.body#/results/0/id
      spaceName: $response.body#/results/0/name
  - stepId: createBlogPost
    description: >-
      Create the blog post in the resolved space. Creating with status draft
      stages it for review; status current publishes it immediately.
    operationId: createBlogPost
    requestBody:
      contentType: application/json
      payload:
        spaceId: $steps.resolveSpace.outputs.spaceId
        status: $inputs.status
        title: $inputs.title
        body:
          representation: storage
          value: $inputs.body
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      blogPostId: $response.body#/id
      blogPostStatus: $response.body#/status
      versionNumber: $response.body#/version/number
      webui: $response.body#/_links/webui
  - stepId: readBackBlogPost
    description: >-
      Read the created blog post back in storage format to confirm it persisted
      and to capture the authoritative version for any later revision.
    operationId: getBlogPostById
    parameters:
    - name: id
      in: path
      value: $steps.createBlogPost.outputs.blogPostId
    - name: body-format
      in: query
      value: storage
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      blogPostId: $response.body#/id
      title: $response.body#/title
      spaceId: $response.body#/spaceId
      authorId: $response.body#/authorId
      versionNumber: $response.body#/version/number
      createdAt: $response.body#/createdAt
  outputs:
    spaceId: $steps.resolveSpace.outputs.spaceId
    blogPostId: $steps.readBackBlogPost.outputs.blogPostId
    versionNumber: $steps.readBackBlogPost.outputs.versionNumber
    webui: $steps.createBlogPost.outputs.webui