Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal


  • Give kudos
  • Received
  • Given


  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Ongoing serial number


i'm new to confluence and node.js so please excuse my lack of knowledge.

So my question is, is it possible (with a selfmade macro for example) to automatically give every new site an ongoing number in the title / in the content area? We use Confluence as Cloud service.

So it looks like this:  Example 


Best regards,


1 answer

0 votes

I could use the page id as a serial number - it's unique and can be used to construct a url to view or edit the page.  Or the string in the "short url" link.

On server you can write a user macro that exposes either of these in the page, but on Cloud you can't write user macros.  You'll just have to read the "page information" to get them (the page id is in the url, the tiny macro in a field)

Okay but this tutorial is for creating macros / addons for the cloud isn't it?


Refering to this tutorial, how can i show the page id instead of "Hello World".

I have tried to access the URL  in JS with "document.locaion.href" but this cannot work because the node app creates a whole new HTML document in the Host Document. I really don't know how to solve this.

Sorry for the delay, bit behind at the moment.

Yes, the doc you have found is for writing apps for Cloud, which should be able to do this.  I mentioned "user macros" which Cloud users cannot write for themselves.

I'm afraid I don't know about coding for Cloud like this, I've only ever written for Server Confluence and only a very light touch Jira Cloud.

Like Lukas_Biedermann likes this

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted in Confluence

What do you think is the most *delightful* Confluence feature? Comment for a prize!

- Create your own custom emoji 🔥 - "Shake for Feedback" on mobile 📱 - An endless supply of GIFs via GIPHY 🤩 Is there anything quite as nice as a pleasant surprise? Comment below with what...

402 views 23 8
Join discussion

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you