Forums

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

How to use Confluence Automation to create a page & send a notification to Google Chat

My team meets once a week to share what we’re working on, important news or updates, and discuss projects that need input from other team members. To encourage active participation in the meeting, the moderator is set on a round robin basis. For several months, either that week’s moderator or myself would generate the notes page a day or two in advance of the meeting, and then post a message in our Google chat to share the link.

But then I started exploring Confluence Automation, and realized I could set up a rule to do all this for us. So here’s the story of what I created and some of the difficulties I ran into along the way.

My page template

Our weekly team sync uses a template. One of the recent modifications I made to the template was to embed a Confluence Calendar that displays the dates for upcoming emails, events, and content publication. Here’s what it looks like when the template is used to generate a page (the Calendar isn’t visible in the template and only populates when you create a page)

Team-sync-page.png

I do have to manually update the template every 6-8 weeks to adjust the dates and the person listed as the moderator, but maybe in the future I can figure out how to use a Rovo agent to do that.

Confluence Automation rule at a glance

My rule just has 3 parts:

Trigger: Scheduled for every Tuesday at 9 am

Action: create page

2nd action: send web request

There are native Automation actions to send an email, send a notification to Slack or Microsoft Teams, but for Google Chat, you have to make it yourself with a web request.

Confluence Automation rule.png

Creating a page with the date in the title in the format I want

So first action in my Automation was creating a page: easy. I used the drop down options to select the space and parent page (actually a folder), and the template I wanted used.

Confluence-Automation-rule detail.png

BUT, I wanted the page title to include the date, and I wanted the date in a specific format and I struggled a bit to figure out how to get it to work.

I started with using {{now.shortDate}}

Since my goal is to create a meeting notes page 2 days before the weekly meeting takes place, I needed to add 2 days.

So I wrote 

{{now.shortDate.plusDays(2)}}

following the pattern given here 

https://support.atlassian.com/cloud-automation/docs/jira-smart-values-date-and-time/

But it got ignored when I trigger the rule, and no date was included in the page title.

After some experimenting, I realized shortDate needs to go after the plusDays. And in the end I didn’t use shortDate because I wanted a slightly different date format.

Here is the final smart value set up: {{now.plusDays(2).format("dd-MM-yyyy")}}

If you’re looking for more details on date time formatting, here’s the Java documentation https://docs.oracle.com/javase/8/docs/api/java/time/format/DateTimeFormatter.html

Sending a notification to Google Chat

Next step, I wanted a notification to be sent to a specific Google Chat space.

This required configuring a web request.

Step 1: Go to the Google Chat space settings, under Apps and integrations. Add a new webhook and copy the URL

Google chat webhook.png

 

Step 2: Configure the web request

Paste that URL in the Web request URL

Select Post for the HTTP method

I configured custom data for the Web request body

{
"text": " '{{page.title}}' {{page.url}} has been published."
}

 

Webrequest custom data.png

 

And here’s what it looks like in Google Chat!

Google Chat notification.png

Hope this helps anyone else looking to customize page titles with dates when creating with Automation, or anyone looking for how to send notifications to Google Chat.

2 comments

Rustem Shiriiazdanov _Actonic_
Atlassian Partner
May 7, 2025

Wow, that looks cool! 

Steffen Burzlaff _K15t_
Community Champion
May 8, 2025

Great article @Laura Campbell
Love the advanced webhook integration in this one.

We explore a similar automation with a Slack integration in our article. We also dive into other Confluence automations like creating a page once a week from a Confluence page template.

Cheers,
Steffen

Comment

Log in or Sign up to comment
TAGS
AUG Leaders

Atlassian Community Events