Hello! Hoping someone here can help me with this automation.
Objective: I am trying to create an automation that will generate a list of Confluence pages based on a CQL query and then email the list of pages (in a single email) to me.
The Challenge: The part I'm having trouble with is getting the automation to output the CQL query results into a single list/email. Note: The email method *does work* if I use a "For Each" branch -- but then I get 100 emails, each with a page title and link. :/
The Deets: My basic automation is as follows:
This works fine outputting to the Audit Log -- but it's ugly and still requires a lot of work to make it more usable/actionable. I haven't figure out a way to get it all in a single email.
Does anyone have suggestions or know how to make this work?
Thanks in advance! :)
Hello @P. Bryan Edge-Salois
Branches do not support aggregating data for a single action like you are trying to accomplish here. However, @Bill Sheboy is correct that going with a manual web request to the Confluence API could enable you to accomplish your desired outcome.
I used the Search content by CQL endpoint to find pages by CQL query. Then I followed up in the Send email action with the Multi-user picker smart values to use the fields from a list to put together an email body with the page title and page URL. I did need to hard code the base URL value in the email action. I will attach some screenshots that I hope will help.
Hey @Dylan Soechting -
How about we make this into a feature request (NOTE to anyone discovering this page later THIS IS NOT DOCUMENTATION, this is a FEATURE REQUEST):
Lookup content
Search for up to 100 pieces of content using a CQL query. Include the results list in other actions by using the {{lookupContent}} smart value. Learn more about using smart values with issue lists.
All properties can be accessed from the lookupContent list. For example, to print the titles and links for each page in bullet point form:
{{#lookupContent}}{{title}}: {{url}}
{{/}}
(Yes, there's the question of whether content is a page or blogpost, although I think blogposts can have titles too.)
I mean, you have {{cqlResult}}, so the data is there. You just need to make it into an iterable list.
Thanks!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Darryl Lee ! You're totally right :) This is something we have in our backlog to address within Confluence, and we'll be sure to post public updates once this is supported!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes -- this is a vastly over-complicated workaround for a very simple action: Isolate content by ancestor or parent, evaluate the created/modified dates, and output a list to a log or in an email.
This is very simple functionality that should be easy to build.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Avinoam Is there a link to this feature request? Have there been any updates on this? And where can you find public updates?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@P. Bryan Edge-Salois, did you find a solution to this? I need something similar in my Confluence instance and have been wracking my brain to figure it out.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Erin Manuel Automation for Confluence has improved since this thread was started, but it is still pretty complicated and does not fit scaled content lifecycle management for everyone. On top of everything, all the good stuff is only available for Premium and up which makes it pretty costly.
Better Content Archiving and Analytics makes creating custom Confluence notification automation easy. You can control:
Watch how:
Don't overpay for Confluence Premium
If you need dedicated content lifecycle management features and automation, you are better off staying on Standard and getting Better Content Archiving and Analytics.
See an example calculation on how much $ you can save.
That is, unless you need the other stuff that's coming with Premium. Even in that case, the app is a dedicated tool for Confluence content lifecycle management, and not a general-purpose automation tool.
Start a free trial and feel free to reach out to us to discuss your use case or if you need help implementing a strategy.
(Please note that I'm part of the team at Midori, developing Better Content Archiving and Analytics since 2008.)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If you're trying to do what @P. Bryan Edge-Salois originally requested:
Objective: I am trying to create an automation that will generate a list of Confluence pages based on a CQL query and then email the list of pages (in a single email) to me.
Then I have to agree with @Levente Szabo _Midori_ that their app is the only easy way to do this. (I mean if you had a server handy you could write a script to do this with APIs and such...)
However, as much as I love Midori and their product, this bums me out, because while @Dylan Soechting mentions that the "Lookup pages" action that was added in Dec 2023 (which I requested here back in Aug 2023 ), it doesn't support CQL. Booooo.
Gah. Soooo close. :-/
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Levente Szabo _Midori_ My team already uses Better Content Archiving to archive pages, content statuses, and better analytics. It is working well for those purposes.
I have other automation actions that I'd like to notify users about, but I don't want to flood their inboxes with individual emails.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Was there ever an update on this feature request? Do we have visibility on the feature request so we can look for any updates?
Thank you!!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@P. Bryan Edge-Salois Hello! I just wanted to circle back and make sure that you're aware that we have released a new action called "Lookup pages" which should make accomplishing your goal much easier. The action is very similar to the "Page branch", except instead of doing some action for every single page found, it will aggregate all of the results in a single smart value.
You can read a bit more about the action in this post.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @P. Bryan Edge-Salois -- Welcome to the Atlassian Community!
First thing, I do not have Confluence automation rules in my site, so I am making a suggestion based on what I know of automation for Jira. With that out of the way...
Your use case is similar to using a scheduled rule on Jira issues and wanting one email communication (rather than one for each issue returned by JQL). For Jira Cloud, you could use "Lookup Issues"...there does not appear to be an equivalent for Confluence automation.
Instead I wonder: could you use a web request action to call the Confluence REST API, and then iterate over the response to list the pages in a single email?
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It's an interesting avenue to look into! Thank you!
One would think this sort of functionality would be easier to build with standard tools...
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.