Programatiically add a page to confluence using CLI and macro

I am trying to migrate our mediawiki to confluence. We tried usin Universal Wiki Converter, but the it exports HTML content, for which we have to manually use HTML macro inside the conflence. Obviously we can't do that manually for each page in our wiki. I used conflunec cli's function:

confluence --action convertToStorageFormat --space "ITWP" --title "test001" --content "{html}bodytext{html}" --server --user --password

it spits out something like this:

<ac:structured-macro ac:name="html"><ac:plain-text-body><![CDATA[bodytext]]></ac:plain-text-body></ac:structured-macro>

Which is again not recognized by confluence.

Is there any way I can just send HTML content to Confluence and it uses HTML macro to parse and display like a standard page like it was before? But please keep in mind I have around 1000 pages in my wiki.

1 answer

Hi Nitin

You can try using the Universal Wiki Converter plugin:

Besides, you can see different methods to import content to confluence here:

For non-wiki markup take a look at WeDav: Confluence WebDav Plugin  


Rafael Pereira.


Suggest an answer

Log in or Sign up to answer
Community showcase
Published Dec 18, 2018 in Confluence Cloud

Happy holidays from our team to yours!

Hi Community!  2018 was filled with changes for our team, both big and small, and we've taken a lot of time to both celebrate our wins and recognize areas of improvement. One thing that we're a...

473 views 3 18
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you