Confluence Publish
Publish, create, and update Confluence pages from HTML content.
What this skill does
This skill upserts Confluence pages through the Confluence REST API:
- - If a page with the same title exists in the target space, it updates the page.
- If no page exists, it creates a new page.
It supports credentials from config, env file, or process environment variables.
Actions
publish_page
Create or update a Confluence page.
Expected input:
- -
input: HTML content, optionally with metadata JSON in the first HTML comment. - INLINECODE2 : runtime options and credentials.
Metadata comment format:
CODEBLOCK0
Alternative config keys:
- - INLINECODE3
- INLINECODE4
- INLINECODE5 (optional)
- INLINECODE6
- INLINECODE7 (path to a file in the current workspace containing metadata comment + body)
Credential options:
- -
config.credentials.EMAIL, config.credentials.DOMAIN, INLINECODE10 - INLINECODE11 pointing to a
.env style file in the current workspace - Environment vars:
EMAIL, DOMAIN, INLINECODE15
Security constraints:
- -
config.env_file and config.page_path must resolve to files under the current workspace directory. - INLINECODE18 and optional
base_url must target Atlassian Cloud (https://<tenant>.atlassian.net/wiki).
Success output includes:
- - INLINECODE21
- INLINECODE22
- INLINECODE23
- INLINECODE24
- INLINECODE25
- INLINECODE26
test_connection
Checks Confluence authentication and returns user identity info.
Example call payload
CODEBLOCK1
Confluence 发布
通过HTML内容发布、创建和更新Confluence页面。
技能功能
该技能通过Confluence REST API对Confluence页面进行更新或创建操作:
- - 如果目标空间中存在相同标题的页面,则更新该页面。
- 如果不存在该页面,则创建新页面。
支持通过配置文件、环境变量文件或进程环境变量提供凭证信息。
操作
publish_page
创建或更新Confluence页面。
预期输入:
- - input:HTML内容,可选的元数据JSON位于第一个HTML注释中。
- config:运行时选项和凭证信息。
元数据注释格式:
html
正文内容
替代配置键:
- - spacekey
- pagetitle
- parentpageid(可选)
- bodyhtml
- pagepath(当前工作空间中包含元数据注释和正文的文件路径)
凭证选项:
- - config.credentials.EMAIL、config.credentials.DOMAIN、config.credentials.APITOKEN
- config.envfile指向当前工作空间中的.env格式文件
- 环境变量:EMAIL、DOMAIN、API_TOKEN
安全限制:
- - config.envfile和config.pagepath必须解析为当前工作空间目录下的文件。
- DOMAIN和可选的base_url必须指向Atlassian Cloud(https://<租户>.atlassian.net/wiki)。
成功输出包括:
- - status: success
- operation: created | updated
- pageid
- title
- url
- spacekey
test_connection
检查Confluence身份验证并返回用户身份信息。
示例调用负载
json
{
action: publish_page,
input:
你好
,
config: {
credentials: {
EMAIL: user@example.com,
DOMAIN: exampletenant,
API_TOKEN: your-token
}
}
}