Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Automation on editPage not showing the user results

Christian Humer
Contributor
June 21, 2023

Hello 
I added a integration with webhook. And if someone edits a page I want to show the user who edited the page on a company channel. But the smart tags mentioned in confluence Automation smart tags don't work.

Here is the string I want to build:

*Hey Team:* There is a new update at space *{{space.name}}*, on the page *{{page.title}}*! You can open the page here: {{page.url}} ! Variables to test: {{user.publicName}} {{user.fullName}} {{user.emailAddress}}

The first part is working but all smartvalues with user.* are not shown in the output and they are empty

Hey Team: There is a new update at space Atlassian Cloud Space, on the page Education! You can open the page here: URL
Variables to test:

It would be great id someone finds out why this is not working

1 answer

1 accepted

0 votes
Answer accepted
Stefan Salzl
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 22, 2023

Hi @Christian Humer 

Mainly the context of the smart valur refers to the trigger of an automation. Incase of „edit page“ this would be {{page}}. In case of eg. „user mentioned“ it would be {{user}}.
It seems the user is not in the context/information of the trigger event (if it is native „page edit“ trigger).

 

You mentioned that you added a webhook. Whwre does your webhook come from? Furthermore could you show your automation rule for further details? 

In case you are using a webhook trigger could you please add a „log action“ and log the ouput of {{webhookData}} ? We could then see the payload/data that is sent by the webhook and find out if it contains user information.

Best
Stefan

Christian Humer
Contributor
June 23, 2023

Hello Stefan
The webhook is comming from Slack. The audit log function is allready added and the values are empty. 

Christian Humer
Contributor
June 23, 2023

Screenshot 2023-06-23 111010.png

Stefan Salzl
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 23, 2023

Hi @Christian Humer 

I can see you are using a slack action/sending a slack message but I can‘t see that there is an incoming webhook that triggers the rule and contains of any further information regarding the event.

As far as mentioned in my previous post and as I understand the documentation the „actor“ (user that edited the page) is not contained in the event/trigger object.

(similar to other triggers eg. in jira there is the „issue transition“ trigger - the context/scope is the transitioned issue {{issue}} but as far as I know it doesn‘t contain the user who did the transition).

Guess that would need further actions calling the RestAPI to eg. find out who did the last change.

Best
Stefan

Like Christian Humer likes this
Christian Humer
Contributor
June 23, 2023

Hi Stefan
I think it's like you say. Attached you can see the incomming webhook config

Screenshot 2023-06-23 124434.png

Like Stefan Salzl likes this
Stefan Salzl
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 24, 2023

Hi @Christian Humer 

got it. The term "incoming webhook" was a bit confusing for me. What you show is the webhook for slack. So in context of slack it´s incoming but from the perspective of jira/automation rule it´s an outgoing webrequest. The incoming webhook in Automation4Jira is a trigger. This could fetch requests/events from other 3rd party apps/apis to trigger an automation rule. So this request won´t deliver any needed information (user). 

Please let me/the community know if you have any further questions. In case you question has been answered already please consider to hit the accept button in order to mark this question as solved. This will make it easier for other users to find an appropriate solution when faced with similar problems.

Best
Stefan

Trevor Angle
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 27, 2023

Hi @Christian Humer if you would like to access info about the page author you can do so with the {{page.author}} smart value. For example, {{page.author.publicName}}.

Like @Stefan Salzl said, the {{user}} smart value is only available in rules with the "User mentioned" trigger.

Like Stefan Salzl likes this
Christian Humer
Contributor
June 28, 2023

Hi thanks for the answer. But this smart value shows me the value for the original creator of the page and not the value from the user who edited this page

Like Stefan Salzl likes this
Stefan Salzl
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 29, 2023

Hi @Christian Humer 

so it seems not that straight forward. What I could imagine is to send a webrequest agains confluence REST API with the pageID you get from your trigger with the smart value {{page.id}} against the following endpoint:

https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-page/#api-pages-id-get

and then check/filter the response. 

Unfortunately I can´t test this as I don´t have premium version of confluence and the aclsandbox doens´t grant permission to call the RestAPI.

Nevertheless I hope I could give some inspiration to move forward with this problem.

Best
'Stefan

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events