I have a table which shows the end and start dates of the certifications.
I want to send an email 2 days before the end date. I used this smart value condition but it does not work. And even I do it this way I do not know how it would work for multiple end dated certifications.
{{ page.body.match("\\d{1,2} \\w{3} \\d{4}").last.toDate.minusDays(2).format("yyyy-MM-dd") }}
equals
{{today().format("yyyy-MM-dd") }}
Hi @İclal Aslan ,
I believe this will be a bit tricky. 😕
You'll have to parse the content body storage to find that date and in which format it is stored, and then compare it to the second smart value.
Anyway, you'll have to play around with it, but maybe this discussion will help to find the format of that End date: https://community.atlassian.com/forums/Confluence-questions/Email-recipients-based-on-Page-properties-smart-values/qaa-p/2903295#M330368
Cheers,
Tobi
Thank you! It seems a little impossible with multiple certificates :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @İclal Aslan
First of all - what returns both smart values?
2nd - to compare 2 dates I would use this - https://support.atlassian.com/cloud-automation/docs/jira-smart-values-date-and-time/#Date-compare---
3rd - my logic would be like below:
- run rule every day (schedule)
- add to current day 2 days
- compare date after calculations with date from column
Regards,
Seba
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Second date returns 2025-12-4 which is today;
First date returns nothing not even null it is blank.
I did exacly like yours but because it is blank and there will be more thank 1 certificaitons and their end date will be different i do not know how it can ready the end date.
Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If you can create a separate page for each certification, then you can set their expiration dates precisely:
You can send notifications as you requested:
You can list them and show their status with a macro:
You can even have a status report on them:
.... and there are so much more easy to use functionality, related to the lifecycle of Confluence pages, offered by the Better Content Archiving app.
(Discl. this paid and supported app is developed by our team. Free for 10 user!)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @İclal Aslan
If you can reorganise your content in a different way, you will be able to implement your usecase.
Let me explain how it could work.
Parsing Confluence XHTML is not easy at all, but you can have qualified content in your page, with the page properties.
The first step is to create a page template with properties content in a table, for those page template you can set a label like 'certification'
Create one page per certification.
In your automation rule you can now filtre all the page with the label "certification" and make an "If" statement on a page properties : {{page.properties.End Date}} compared to the current date minus day 2 (something like : {{now.minusDays(2).jiraDate}} )
Then you should be able to send an email.
Regards
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.