Jira Automation to send multiple emails in time

Eric Guichaoua September 28, 2023

Hi,

I try to create an automation based on a manual trigger. I want to create some "validation" process for a document, but I can't use the workflow for that.

Basically, the automation gather some informations (the user which will validate the version X of the document ; the version number (1, 2 or final) ; the date when the validation is expected). Then the automation add a lable to the issue (Validation_Pending). Then an email is send to the user who should validate with the informations in the body.

In a perfect scenario, I would like the automation process to be able to check that "if the issue still have the "Validation_Pending" label, then send an email reminder (with the same info) at date-2day, date-1day and at the date provided in the initial prompt.

 

So what I've tried : I've set up this manual trigger with a prompt for thoses user's input, like :

  • a single text field where I ask to write the email of the user who validate ; here I want to select a specific user by typping his name (but it could be someone different from the assignee, the watchers or the creator of the issue). I then use a variable {{userInputs.automationValidatorEmail}} to store the info and reuse it in the email action.
    Question 2 : I don't find any way to get a single user picker to gather this info, and then retrieved the email adress for the "send email" action).
  • a single text field where I ask to write a date (default value DD/MM/YYYY). I then use a variable {{userInputs.automationValidationDate}} to store the info and use it in the email action.
    Question 3 : is there a way to get a date picker ?
  • a multiple choice picker, where I've specified the 3 options for the versions of the document ("version 1", "version 2" or "final version"). I then use a variable {{userInputs.automationValidationState}} to store the info and use it in the email action.

 

Then I have an action to add the label "Validation_Pending" to the issue. No problem here.

 

Lastly I set an "Send email" action.
The To field use the {{userInputs.automationValidatorEmail}} variable.
Other variables are used in the body of the email. 

Question 4 : the issue has a weblink to the document version (stored outside of JIRA). Is there a way to get this link for the issue and pass it to the email body ? Sometimes we have multiple links attached to an issue, so a prompt asking the personn who trigger the automation, asking him to select a link between the multiple should be perfect. Is that possible ?

 

At this point of my experiment, I can't figure how to set other automation (in another branch of the same automation, or in another automation) to watch the ticket, check if the label is still here, and if so, send email reminder based on the date provided in the first prompt.

Thanks for your help. (sorry for my english, and best regards from France).

1 answer

1 accepted

0 votes
Answer accepted
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.
September 28, 2023

Hi @Eric Guichaoua 

Regarding your questions...

Question 2 : I don't find any way to get a single user picker to gather this info, and then retrieved the email adress for the "send email" action).

There is no user picker yet for the user inputs for the manual trigger.  Here is a suggestion to add sources/ways to populate those questions: https://jira.atlassian.com/browse/AUTO-744

Question 3 : is there a way to get a date picker ?

Same answer as for question 2: this is not possible yet.

Question 4 : the issue has a weblink to the document version (stored outside of JIRA). Is there a way to get this link for the issue and pass it to the email body ? Sometimes we have multiple links attached to an issue, so a prompt asking the personn who trigger the automation, asking him to select a link between the multiple should be perfect. Is that possible ?

Depending on where that information is stored, perhaps you could use a web request to call a REST API function (to some external system) to get the data.  Please look here to learn about that technique: https://community.atlassian.com/t5/Jira-articles/Automation-for-Jira-Send-web-request-using-Jira-REST-API/ba-p/1443828

Regarding selecting from the links already attached to the issue, this would be the same answer as for question 2.

 

At this point of my experiment, I can't figure how to set other automation (in another branch of the same automation, or in another automation) to watch the ticket, check if the label is still here, and if so, send email reminder based on the date provided in the first prompt.

For this last idea, you could use a scheduled trigger to periodically check that label for your value and then take action.

 

Kind regards,
Bill

Eric Guichaoua September 29, 2023

Hi @Bill Sheboy 
Thanks for your answers, and the link provided. I will watch the progress.

 

For the last answer, regarding the sheduled trigger, I guess that, as the date is only provided inside the first automation input prompt, I can't base my second automation on it, right ?
Maybe if I fisrt put this date inside a default or custom field of the issue, then I could recall it ?
But how to use some value like dd/MM/YYY, put by the user in a simple text field (inside the prompt) and copy it in a real date field (like the dafault due date) ? 

Thanks for your help.

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.
September 30, 2023

I will try to answer the different questions you asked there...Please let me know if I miss any of them :^)

A scheduled trigger rule runs on its schedule.  It cannot have a dynamic schedule based on issue data.  This trigger can use JQL to gather issues on that schedule, helping to manage executions.  (For example, create a rule that runs once per day and which only proceeds if there are open issues that have not been updated in the last day.)

You also asked about having the users of a manually triggered rule enter a date value, and then store that in a date field.  That is definitely possible using the date conversion functions.  And, as often is the case for text fields, the challenge is: will the user enter the date in a valid format?  If they do, the value can be converted and captured.

Eric Guichaoua October 3, 2023

Thanks a lot @Bill Sheboy to take time to answer me.
I will think again of my workflow with all those rules in mind.

Best regards, Eric.

Like Bill Sheboy likes this

Suggest an answer

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

Atlassian Community Events