Describe the problem/error/question
On the final node in the flow listed above, update confluence, its a http node using the following in the body:
{ "id": "{{ $json.resolvedPayload.id }}", "type": "{{ $json.resolvedPayload.type }}", "title": "{{ $json.resolvedPayload.title }}", "space": { "key": "{{ $json.resolvedPayload.space.key }}" }, "version": { "number": "{{ $json.incrementFields.newVersion }}" }, "body": { "storage": { "value": "{{ $('Format Data').item.json.confluenceBody }} {{ $json.incrementFields.newVersion }}", "representation": "storage" } } }
What is the error message (if any)?
Everything works great, except for {{ $('Format Data').item.json.confluenceBody }}
when I include that expression I get { "id": "680716237", "type": "page", "title": "Test Title", "space": { "key": "~ValidData" }, "version": { "number": "29" }, "body": { "storage": { "value": "[object Object] 29", "representation": "storage" } } }
barn4k
April 3, 2025, 8:01am
2
Hello @n8n.6h82t
"[object Object] 29"
means your value for $('Format Data').item.json.confluenceBody
is an Object and not a string. So you should convert it to string or extract the field your need
Thanks for your feedback! When I do that in the previous function node that leads to the following error in the ‘update contluence’ node
> Can not instantiate value of type [simple type, class com.atlassian.confluence.api.model.content.Content] from JSON String; no single-String constructor/factory method```
barn4k
April 3, 2025, 7:45pm
4
Can you provide the content of the $('Format Data').item.json.confluenceBody
variable?
I had to edit out the data, but hopefully this is enough for you
“formatData”: {
“confluenceBody”: “{"storage":{"value":"\n
Jira Issues Report \n\n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \nKey Summary Status Updated Last Comment valid valid In Progress valid valid
\n","representation":"storage"}}”
}
The portal here is transforming the html markup that is inside the value
barn4k
April 4, 2025, 6:25pm
8
replace the evaluation with { "id": "{{ $json.resolvedPayload.id }}", "type": "{{ $json.resolvedPayload.type }}", "title": "{{ $json.resolvedPayload.title }}", "space": { "key": "{{ $json.resolvedPayload.space.key }}" }, "version": { "number": "{{ $json.incrementFields.newVersion }}" }, "body": { "storage": { "value": {{ JSON.stringify($('Format Data').item.json.confluenceBody.storage.value + String($json.incrementFields.newVersion)) }}, "representation": "storage" } } }
Sorry, I am not sure I understand. This results in
Bad request - please check your parameters
Can not instantiate value of type [simple type, class com.atlassian.confluence.api.model.content.Content] from JSON String; no single-String constructor/factory method
barn4k
April 9, 2025, 4:20pm
10
Please, share the workflow.
You can select all nodes with ctrl+a , copy it with ctrl+c . Then past the content here after pressing button </>
with ctrl+v .
system
Closed
July 8, 2025, 5:38pm
12
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.