Forums

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

Inserting Warning Panel into Confluence Page with Python

Jake Brehm
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!
December 5, 2023

I'm using the Atlassian API package for Python to automate some pages in Confluence. I only started this process yesterday, so I'm still a bit unfamiliar with the API and can't find this information anywhere.

How do I add a warning panel to the body of a Confluence page using HTML? I've tried a few things, but this is the closest I've gotten:

<ac:structured-macro ac:name="panel">Test</ac:structured-macro>

That said, that snippet only makes the panel box appear--I don't know how to get the text to show or how to change its colors. In fact, I tried changing the macro name to "warning" but the API gave me an error back.

<ac:structured-macro ac:name="warning">Test</ac:structured-macro>
Is what I want possible via the API?

 

1 answer

0 votes
Brant Schroeder
Community Champion
April 16, 2024

@Jake Brehm Welcome to the Atlassian community

Just incase you have not found a fix for this I believe that the macro you want to inert is:

<ac:structured-macro ac:name="warning">
<ac:parameter ac:name="title">useful tip</ac:parameter>
<ac:parameter ac:name="body">block of text that is in the tip macro</ac:parameter>
</ac:structured-macro>
Brant Schroeder
Community Champion
September 17, 2024

@Jake Brehm can you accept the answer to help others?

 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
TAGS
AUG Leaders

Atlassian Community Events