How do I use an external table (.csv) to create new pages automatically?

I have a need to create a repository of information on international politicians for my company.

We have a whole stack of information on them (that are formatted as individual records in a .csv), including all their business cards scanned in (as fields in that .csv). Some of the fields contain structured data, some unstructured.

What I want to do is add my table of data (the .csv) to our wiki, but use each individual record as an individual child page in one of our spaces. The result I am looking for is a whole load of pages created, one on each politician, each as a result of the data I have on the .csv.

Is this possible?

I have already added a template that can be used to enter an individual contact/record, which will add a page on a specific person (I can modify those fields as necessary!), and would really like to use it's format for any records added from my .csv.

I'm running on Confluence 3.5.7

4 answers

1 accepted

2 votes
Answer accepted

The Confluence CLI is a good place to start. I'm not sure if it gets your entire use case - you might need to do a bit of extraction and parsing from the csv file.

You might need to write your own Remote API connection (the CLI is just a nicely done implementation of the Remote API that meets lots of use-cases). If you do that, you'll have full control and programatic access to parsing your csv, then uploading the content.

Specifically you can use the *runFromCsv* action provided you can make the content conform to the requirements of that action. Otherwise, a combination of scripting and that aciton or others provided by the CLI would work.

Thanks for the comments on this. I'll get some cold towels wrapped round my head and give it a go tomorrow.

Bob, your're a Jedi!

Your best bet is to probably attack this with a programming API interface to Confluence. I don't know much about SOAP and other potential mechanisms for this. If you are willing to put in the programming effort, here are some pointers to get you started:

Did you need to do this one time or will it be a recurring need?


This will be a recurring need.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Mar 12, 2019 in Confluence

Confluence Admin Certification now $150 for Community Members

More and more people are building their careers with Atlassian, and we want you to be at the front of this wave! Important Dates Start the Certification Prep Course by 2 April 2019 Take your e...

1,268 views 2 13
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