Jira Automation rule fails to update a Confluence page
Platform Notice: Cloud - This article applies to Atlassian products on the cloud platform.
Summary
A Jira automation rule fails to update a confluence page with the following body:
{ "id": "{{createdPage.id}}", "status": "current", "title": "{{createdPage.title}}", "body": { "representation": "storage", "value": "{{issue.description}}" }, "version": { "number": 2 } }
Diagnosis
The send web request fails with the following error:
Send web request
Error publishing web request. Response HTTP status:
400
Error response HTTP body:
{"errors":[{"status":400,"code":"INVALID_MESSAGE","title":"Invalid message","detail":null}]}
Cause
The rule failed due to special characters in the description field.
Solution
To escape/encode these characters and copy the description as it is into the page, please replace the smart value for the description with the following smart value:
"{{issue.description.htmlEncode}}"
Last modified on Nov 5, 2024
Powered by Confluence and Scroll Viewport.