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

Add a label to a Confluence page via PowerScripts

I want to add the first letter of the page title as label to that page, using PowerScripts for Confluence.

The script I have is file setFirstCharacterPageTitleAsLabel with code:

number pageId = id;
string newLabel = substring(pageId.title,0,1);
addLabels(pageId, newLabel);
"id: " + pageId,
"title: " + pageId.title,
"label: " + newLabel;

On the page I put the 'Sil script' macro as follows:

Sil script macro.png

But as you can see I immediately get an error. What am I doing wrong?

1 answer

Hello Patrick,

I copied your script exactly as you have posted and it works perfectly according to the parameters as you described. The only way I could reproduce your error was to intentionally misspell the name of the sil script, "setFirstCharacterPageTitleAsLabel.sil". Please check the spelling of the script or copy and paste the name directly from the SIL Manager. If you would like additional help, please stop by the support chat room found anywhere in the Power Scripts for Confluence documentation.

You can also chat with me via my Drift chat profile:


Hyrum Steffensen
Product Engineer, Power Scripts

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...

323 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