Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to add nested macros in confluence page with rest api ?

Tatjana Stojcheska
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 8, 2025

Hello,

I'm developing python script which creates  more pages in confluence cloud. 
I want to add on the pages two nested macros (macro status and macro note) 
I have tried like this 


makros.jpg

and this is how i define the body of the rest api call. 

data = { 'title': subject, 'spaceId': space_key, 'body': { 'storage': { 'value': full_body, 'representation': 'storage' } }, 'metadata': { 'labels': confluence_labels } }

When i try to run the script i get error 

500 {"errors":[{"status":500,"code":"INTERNAL_SERVER_ERROR","title":"Internal Server Error","detail":null}]}

Can someone give me idea how to solve this? Just to mention If i try to add the macros one by one ( not nested) the script works ok . 

Thank you in advance

1 answer

1 vote
Aaron Pavez _ServiceRocket_
Community Champion
January 8, 2025

Hi @Tatjana Stojcheska 

Is this for cloud? Confluence Cloud doesn't support nested macros.

Which macros are you adding manually?

There is an update on this and now you can use some:

https://jira.atlassian.com/browse/CONFCLOUD-78513

But to better understand, which macros are you adding manually?

If that works, go to advanced details -> storage format.

Use the storage format code on your code.

Regards

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
atlassian, confluence whiteboards, whiteboard templates, template contest, visual collaboration, atlassian learning, confluence community, brainstorming tools, agile planning, team productivity, confluence templates, share your template

Share Your Confluence Whiteboard Template for a Chance to Be Featured in the Product! 🏆

Want to leave your mark on Confluence? One winner will have their whiteboard design added into Confluence for all users to access! This is your chance to showcase your creativity, help others, and gain recognition in the Confluence community.

Share your template today!
AUG Leaders

Atlassian Community Events