I try to have a trigger performed if a page is published on the basis of the content of the label. However, the page is created using a page template. It seems that the label does not yet exist when publishing, because I get an empty variable back. This should actually be filled with the label that I was added to the page template.
Can I make a script in a different way that will run automatically when saving a page made using a template?
@Ruud Ravensbergen I have found that labels added to a template do not get transferred to the pages created from it.
You could add placeholder text to the template instructing the creator/writer of the page to add the specific label to the page. (You can add a label to a page while in Edit mode; this command is available even before you publish the page the first time.)
You can also set up a rule to add the label to the page—see this post: https://community.atlassian.com/t5/Confluence-questions/Automation-Query/qaq-p/2593156
Note that the publish page trigger is only triggered the first time the page is published. If you want the trigger to fire every time the page is published, I think you need to use the page update action, instead of publish—I've seen recent posts describing this, but can't find any at the moment to point you to.
Thank you for your answer @Barbara Szczesniak
But it is precisely the intention that the template arranges everything for those who use the template. Adding and label can easily be forgotten and then the trigger does not work.
I really need a trigger to send a e-mail from this specific template at the first time it is published. And only at the first time
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You might be able to use the automation rule to add the label that is described in the question I linked to above. This would just require that the pages created from the template all contain specific text (that is not used on other pages, I guess). I think that text could be multiple words to make it more unique.
I'm not sure if WHEN: Page edit includes the first edit when creating the page. I'm on the free plan, so I don't have the Automation feature.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.