Forums

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

How Can I add a variable date in the "Title" section of the "Create a Page in Confluence" Automation

Austin Schaller October 6, 2023

I'm currently making an automation to make a copy of a confluence page for a weekly priority alignment meeting. They want the title of the Confluence page to include the date of the meeting for each new page, and an email to notify the participants. 
Date format mm/dd/yyyy

I've tried to use smart values, but they don't transfer to Confluence or to Gmail

Is there an alternative way to do this that I'm unaware of or a different language that will serve the purpose better?

Jiraauto1Capture.JPGjiraauto2capture.png

2 answers

1 accepted

4 votes
Answer accepted
Ste Wright
Community Champion
October 6, 2023

Hi @Austin Schaller 

You want to format the date in the page's title?

{{now.format("dd/MM/yyyy")}}

^ This should work

I do sometimes find the time converts to UTC though, so it depends on your timezone if it will have the correct date.

Instead I find setting the timezone works - eg.

{{now.convertToTimeZone("Pacific/Pago_Pago").format("dd/MM/yyyy")}}

You can see a full list of timezones options here: https://joda-time.sourceforge.net/timezones.html, as suggested on this help page

Ste

Austin Schaller October 6, 2023

@Ste Wright 

Thank you so much

Worked like a charm

Like Ste Wright likes this
Steven Gold
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 28, 2024

But if we want the date format in the title to be mm/dd/yyyy instead, can we simply adjust the macro acordingly?  

0 votes
Wouter S.
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 9, 2025

In the template itself I haven't found a way to put an automatic date in, but when you configure the button "Create from Template" (macro) you can make sure the page title has the date in it using @currentDate.

Screenshot-20250210-110810.png

 

I believe it only does yyyy-MM-dd format but to me that makes most sense (sort alphabetically = sort chronologically).

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events