Confluence · Arazzo Workflow

Confluence Moderate a Page Comment

Version 1.0.0

Review a page's comments, read one, then branch to redact it in place or delete it outright.

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

Provider

confluence

Workflows

moderate-comment
Redact or delete a footer comment on a Confluence page.
Lists a page's comments, reads the flagged one, and either updates its body with redacted text or deletes it, depending on the requested action.
4 steps inputs: action, commentId, newVersionNumber, pageId, redactedBody, versionMessage outputs: deletedCommentId, originalAuthorId, redactedCommentId
1
listComments
getFooterComments
List the page's footer comments in storage format to establish the moderation context around the flagged comment.
2
readComment
getCommentById
Read the flagged comment to capture its author, resolution status, and the current version number that a redaction must supersede.
3
redactComment
updateComment
Rewrite the comment body in place with the redacted text, incrementing the version so the moderation action is recorded in the comment's history.
4
removeComment
deleteComment
Delete the comment outright. This removes the thread entry, so it is only taken when redaction is not sufficient.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: Confluence Moderate a Page Comment
  summary: Review a page's comments, read one, then branch to redact it in place or delete it outright.
  description: >-
    A moderation flow for teams that have to act on a reported comment. It lists
    the footer comments on the page, reads the flagged comment to capture the
    version that any edit must supersede, and then branches on the caller's
    intent: a redact action rewrites the body in place and leaves an auditable
    version record behind, while a remove action deletes the comment entirely.
    Editing is preferred where the thread must stay readable. 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: moderate-comment
  summary: Redact or delete a footer comment on a Confluence page.
  description: >-
    Lists a page's comments, reads the flagged one, and either updates its body
    with redacted text or deletes it, depending on the requested action.
  inputs:
    type: object
    required:
    - pageId
    - commentId
    - action
    properties:
      pageId:
        type: string
        description: The id of the page carrying the comment under review.
      commentId:
        type: string
        description: The id of the comment to moderate.
      action:
        type: string
        description: Either "redact" to rewrite the comment body, or "remove" to delete it.
      redactedBody:
        type: string
        description: >-
          Replacement body in storage format, used on the redact path (e.g. a
          note that the content was removed by a moderator).
      newVersionNumber:
        type: integer
        description: >-
          The version number to write on the redact path, which Confluence
          requires to be the current version plus one. Arazzo runtime
          expressions have no arithmetic, so the caller supplies this value;
          readComment returns currentVersion to compute it from.
      versionMessage:
        type: string
        description: Optional moderation note recorded on the new comment version.
  steps:
  - stepId: listComments
    description: >-
      List the page's footer comments in storage format to establish the
      moderation context around the flagged comment.
    operationId: getFooterComments
    parameters:
    - name: id
      in: path
      value: $inputs.pageId
    - name: body-format
      in: query
      value: storage
    - name: limit
      in: query
      value: 250
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      comments: $response.body#/results
  - stepId: readComment
    description: >-
      Read the flagged comment to capture its author, resolution status, and the
      current version number that a redaction must supersede.
    operationId: getCommentById
    parameters:
    - name: id
      in: path
      value: $inputs.commentId
    - name: body-format
      in: query
      value: storage
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      authorId: $response.body#/authorId
      currentVersion: $response.body#/version/number
      originalBody: $response.body#/body
      resolutionStatus: $response.body#/resolutionStatus
    onSuccess:
    - name: redactRequested
      type: goto
      stepId: redactComment
      criteria:
      - condition: $inputs.action == 'redact'
    - name: removeRequested
      type: goto
      stepId: removeComment
      criteria:
      - condition: $inputs.action == 'remove'
  - stepId: redactComment
    description: >-
      Rewrite the comment body in place with the redacted text, incrementing the
      version so the moderation action is recorded in the comment's history.
    operationId: updateComment
    parameters:
    - name: id
      in: path
      value: $inputs.commentId
    requestBody:
      contentType: application/json
      payload:
        body:
          representation: storage
          value: $inputs.redactedBody
        version:
          number: $inputs.newVersionNumber
          message: $inputs.versionMessage
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      commentId: $response.body#/id
      versionNumber: $response.body#/version/number
      webui: $response.body#/_links/webui
    onSuccess:
    - name: done
      type: end
  - stepId: removeComment
    description: >-
      Delete the comment outright. This removes the thread entry, so it is only
      taken when redaction is not sufficient.
    operationId: deleteComment
    parameters:
    - name: id
      in: path
      value: $inputs.commentId
    successCriteria:
    - condition: $statusCode == 204
    outputs:
      deletedCommentId: $inputs.commentId
  outputs:
    redactedCommentId: $steps.redactComment.outputs.commentId
    deletedCommentId: $steps.removeComment.outputs.deletedCommentId
    originalAuthorId: $steps.readComment.outputs.authorId