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 project did you transition or start on Confluence with the shift to remote work?

It’s been great to hear from fellow users over the last few weeks about the best tips and fun moments you’ve had working on Confluence since the transition to working remote. I’d love to keep the c...

227 views 3 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