We are using Jira Automation with an AI Action (Generate content) step to produce a problem analysis. The generated output is then sent to a Jira issue comment via REST API.
Endpoint used:POST /rest/api/3/issue/{issueKey}/comment
Request body example:
{
"body": "{{agentResponse}}"
}
We also tried Atlassian Document Format (ADF):
{
"body": {
"type": "doc",
"version": 1,
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "{{agentResponse}}"
}
]
}
]
}
}
In all cases, the following error is returned:
{"errorMessages":[],"errors":{"comment":"Comment body is not valid!"}}The AI Action output may contain multiline text, tables, and special characters.
Expected behavior:
AI-generated output should be successfully posted as a Jira issue comment via REST API.
Actual behavior:
The API returns "Comment body is not valid" despite valid authentication and request format.
Hello @murat_gecgel
Try encoding the smart value as a JSON string.
"text": {{agentResponse.asJsonString}}
Best,
Arkadiusz🤠
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.