Auto-scaffold Confluence spec pages from new Jira epics

By General Input

The moment a new epic lands in Jira, a matching spec page appears in Confluence with the standard sections ready to go, so engineers never start from a blank page.

Integrations

  • Jira
  • Confluence

Type

Deterministic Code

Categories

  • Engineering
  • Product

Build a code workflow that scaffolds a Confluence spec page every time a new epic is created in Jira, so engineers never start from a blank page. The workflow is deterministic template-fill — no reasoning, no LLM calls — just map webhook fields onto a fixed Confluence page template.

Trigger: a Jira webhook subscribed to the jira:issue_created event. Jira Cloud emits outgoing webhooks for issue creation, so the workflow receives the full issue payload on fire. The first thing the workflow does is filter the payload: continue only if issue.fields.issuetype.name equals "Epic", or (as a configurable alternative) if the issue carries a specific label such as "needs-spec". If the issue does not match, exit without doing anything.

From the webhook payload, extract these fields for the template: the issue key (e.g. ABC-123), the summary, the description, the assignee display name (fields.assignee.displayName, or "Unassigned" if null), the target release / fix version (fields.fixVersions[0].name, or "Not set" if empty), and the browse URL back to the Jira epic (typically {issue.self host}/browse/{issue.key}, or the value already provided on the payload). If any critical field is missing from the webhook body, call jira Get Issue with the issue key to fetch it before continuing.

Then create the Confluence page using the confluence Create Page operation. Configure it with:

  • spaceId set to the configured Specs space (expose the space key or ID as a workflow input so users can point it at their own space).

  • parentId set to the configured Active Specs parent page ID, so the new page nests under the standard spot.

  • title set to "{ISSUE_KEY}: {ISSUE_SUMMARY}" — for example "ABC-123: New billing dashboard".

  • body in Confluence storage format (representation: "storage"), built from the hardcoded template below with the extracted fields interpolated in.

  • status: "current" so the page is published, not left as a draft.

The storage-format body template is fixed. It has two parts:

1) A header block at the top of the page containing:

  • An info panel (Confluence storage-format info macro, ac:name="info") with a bulleted list of metadata: Jira epic (as a link to the browse URL using the issue key as the label), Assignee, Target release, and Created (the current ISO date).

  • A paragraph or blockquote below the info panel with the epic description as plain text (strip Atlassian Document Format formatting to a plain string; if description is empty, write "No description provided in Jira.").

2) Six section headings, each an <h2> followed by an empty <p></p> placeholder so the engineer can start typing under each:

  • Problem

  • Proposed Solution

  • Requirements

  • Out of Scope

  • Rollout Plan

  • Open Questions

Section headings are hardcoded, but expose them as a configurable list at the top of the workflow so users can rename or reorder them without editing code. Same for the trigger filter (issue type vs label), the Confluence space ID, and the parent page ID — all four should be workflow inputs.

Reference for the Confluence page body: the storage format is documented at https://developer.atlassian.com/cloud/confluence/rest/v2/intro/. The Create Page endpoint accepts { spaceId, parentId, status, title, body: { representation: "storage", value: "<storage-format XHTML string>" } }.

Do not log or send anything else — no Slack ping, no comment back on the Jira epic. Just create the page. Keep it deterministic and boring.

Related prompts

Explore more prompts
One triage console for every Jira service desk queueOne inbox for every Jira Service Management approval waiting on youWork your whole Terraform approval queue from one boardInternet scanning campaign explorer for security teamsBulk IP triage queue that clears your SIEM alert backlogPatch prioritization board built on live exploitation dataAssign owners to stale Confluence pages, space by spaceSee every open Confluence action item on one boardDocumentation ownership register for your Confluence wikiMerge desk for duplicate and conflicting Confluence pages