Comala workflows - send email to page author/person who edited the page

Hi All, 

I am a new user of Comala workflows and trying to author my own workflow.

I want to be able to send an email to the page author or user who last edited the page when a page is rejected by a reviewer. 

Is there a way to read the user name of the person who created/updated the page? I able to send email to the Reviewers group (see towards the end), but not to the author.

Please help.

My workflow so far is as follows:

{workflow:name=MyWorkflow}
{description}
The Publishing Workflow has four states.
Draft: Edited by Staff.
In Review: Reviewed by Managers and Tech writers.
Published: Approved by reviewers and available for users.
Obsolete: Expired after due date that is defined in the workflow parameter.
{description}
{workflowparameter:Reviewers|description=Reviewers group|type=user}
Reviewer1, Reviewer2
{workflowparameter}
{workflowparameter:SetExpiry|description=Sets the date for page expiry|type=duration}
PT1M
{workflowparameter}
{state:Draft|submit=In Review}
{state}
{state:In Review|approved=Published|rejected=Draft}
{approval:Review|selectedapprovers=@Reviewers@}
{state}
{state:Published|final=true|updated=Draft|expired=Obsolete|taskable=true|duedate=@SetExpiry@}
{state}
{state:Obsolete}
{state}
{trigger:pageapproved|approval=Review}
{send-email:user=@Reviewers@|subject=Page ready for your review and approval}
The page @page@ has been drafted by [~@user@] and is waiting for your review and approval.
{pageactivity}
{send-email}
{trigger}

{workflow}

4 answers

Received this answer from Comalatech:

 

We don't have a direct value reference to the last user who edited the page, however if you add a trigger like below it will save the last editor to metadata after every edit. To clarify, Confluence only notifies us of a page modification when its saved, so if multiple users edit the page with collaborative editing before saving, this will only store the user who saved it.

{trigger:pageupdated}
{set-metadata:Last Editor}@user@{set-metadata}
{trigger}

Then use as a value reference like this: "@Last Editor@".

 

Tried it and it worked for me.

worked for me too. Thank you Travis

Thanks Travis. 

This worked for me too. 

Here is my code:

{trigger:pagecreated}
{set-metadata:Document Author}@user@{set-metadata}
{trigger}
{trigger:pageupdated}
{set-metadata:Document Updater}@user@{set-metadata}
{trigger}

Hi,

You should be able to use @author@ or @creator@ user references to send an email.

Please have a look at the documentation for more information:

https://wiki.comalatech.com/display/CWL/User+references

 

Thanks

author and creator refer only to the person who first created the page, not to an editor of that page.  I haven't been able to find a user reference for that.  Any Ideas?

Same problem here. Does anyone have an idee? Please help.

Same problem. 'author' and/or 'creator' are not the problem, but the one who edited the page.

Here is my code:

{trigger:pagecreated}
{set-metadata:Document Author}@user@{set-metadata}
{trigger}
{trigger:pageupdated}
{set-metadata:Document Updater}@user@{set-metadata}
{trigger} 

I set two separate metadata tags for author and updater - so I could use them separately as needed. 

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Wednesday in Marketplace Apps

Marketplace Spotlight: Marketing apps for Confluence to keep your teams working on the same page

                                                      &nbsp...

125 views 0 3
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