Hi, I'm trying to use Confluence Automation for some auto-tagging. I want to tag the page when some keywords are added to the page's contents. I know I can use {{page.title} smart value to get the title of the page. Is there a way to get the body or contents of the page?
If not using smart values, do you have any other suggestions for analyzing the page's contents to determine if some keywords exist?
Hi @Dylewski,Rafal, Trevor from the Confluence automation team here.
I have seen people access the page body in an automation rule by using the Confluence REST API together with the "Send web request" action. You can access the HTTP response in later components with the {{webRequest.body}} smart value. So you could potentially use that smart value in a comparison condition to achieve your use case. Check out the other accepted answers for a link explaining how to use the REST API to get a page body.
This feels like it would be a common requirement for many users and not having access to the page body feels like it would limit the practical use-cases for confluence automations. Are there any plans for Atlassian to include {{page.body}} as a smart variable?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Dylewski,Rafal - welcome to the community,
this be done with confluence API. There was a similar post here in the community:
Best
Stefan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Dylewski,Rafal Welcome to the Atlassian community
I am not aware of a smart value for the body or content of a page. More information about available smart values can be found here: https://support.atlassian.com/cloud-automation/docs/smart-values-in-confluence-automation/
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you. I studied it carefully. If not via smart values, what other approach do you suggest to scan through the page contents? I guess we would need to create some custom Forge app..?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The smart values {{page.body}} or {{page.body.storage}} will retrieve the body or content of a page.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
OMG... those values are so well hidden that i have gave up on looking up for solution to my problem just to stumble upon it on accident :D
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The question is why the hell is there no smart value to use that we can use to send the page content in an email as an example? This is ridiculous that this is kinda the entire freaking point of Confluence, the actual crap on the page, and that we cannot access it with automation for confluence is a complete waste of the purpose of this application. So dumb.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Actually it IS possible to access the content in your automation. See the provided answeres.
Best
Stefan
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.