Confluence Automation: how to create a task in Confluence?

Verena Gisler
Contributor
March 4, 2025

Hi all

I would like to create task in Confluence, triggered by the change of the status of a page.

For example, as soon as the status of a page is changed to "TO BE REVIEWED", a new task to review that page for a specific person should be created. It can be created on the same page or in a separate task page, whatever.

I could not find how to do this so far. In the meantime, I managed to make automation create a task in Jira, and then I can create a page in Confluence showing all these Jira tasks. But as the tasks need to be finished within Confluence, I do not see the point why I need to make the long way via Jira.

Is there any possibility to create a task directly in Confluence?

I know that Confluence tasks are more like done/not done while Jira has a lot more possibilities of tracking tasks. But done/not done would be enough in this case.

Thanks!

Verena

2 answers

0 votes
Yulia Lenina _AppFox_
Atlassian Partner
March 5, 2025

Hi @Verena Gisler and welcome to the Community! 

While there is no an easy way to do so in Confluence, would you be open to consider a dedicated app for this? For example, with Workflows for Confluence app you will be able to create a multi-stage and complex approval process with setting up reviewers, actions on content edit or expiration, official versioning, cross-space publishing, document controls and so on. To set this process correctly is especially important if you're operating within a regulated industry.

Please feel free to book a demo here, if this is something you could be interested in.

Verena Gisler
Contributor
March 5, 2025

@Yulia Lenina _AppFox_ 
Hi Yulia
thanks for your quick reply!

Is it also possible in your app to add a workflow to each new page that is created out of a template? Means that the template already has a workflow added as soon as it is used?

I will have a look at the app, and maybe get back to you.
Thank you!

Verena

Like Yulia Lenina _AppFox_ likes this
Yulia Lenina _AppFox_
Atlassian Partner
March 5, 2025

Yes, it is possible to enforce applying workflow to a newly created page, based on a space it's in, or label assigned (via using a template). You can read more here.

0 votes
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 4, 2025

Hi @Verena Gisler 

There is no automation rule action to add a task to a page.

A complicated workaround is using the REST API with the Send Web Request action:

  • use the REST API to GET the content for the page, including the task list within the HTML <ac:task-list> your task list </ac:task-list>
  • identify the last task ID in the list; this is needed to increment it later
  • use the REST API to GET the current page version; this is needed to increment later
  • use text functions to add your new task to the end of the list, before the ending tag, constructed in the correct format
  • use the REST API to PUT the updated page content, remembering to increment the page version number

 

Kind regards,
Bill

Verena Gisler
Contributor
March 5, 2025

@Bill Sheboy 

Hi Bill

thanks a lot for your answer!
I musts admit that I have no clue what you are writing about :-(  I am not from the IT dept. so I am not up to date to APIs. But I will check your answer with our IT dept. Manager, maybe he can help me here.

But if I read your instructions above. You mention in step 1 

  • use the REST API to GET the content for the page, including the task list within the HTML <ac:task-list> your task list </ac:task-list>

Which task list do you mean? As there are no tasks yet, how can we use one then?

Thanks for your patience...

Verena

 

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 5, 2025

Yes, I agree that is a complicated approach.  Here are a few more details to help your engineering staff if you try it...

Tasks can be added / edited on a Confluence page by changing the page content's HTML with the REST API.  I recommend looking at the source for an example page to see the layout, particularly if you want to mention someone.

When there is no Task List on the current page, that could be added as a new one, enclosing it withing the task-list tags I noted earlier.

Here is a how-to article for calling a REST API endpoint from a rule: https://community.atlassian.com/t5/Jira-articles/Automation-for-Jira-Send-web-request-using-Jira-REST-API/ba-p/1443828

And here is the documentation for the endpoints I noted, and some other references:

 

FYI -- I did a quick test with some hardcoded tasks in a rule so I know this approach works, even though it may be challenging to initially set it up.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events