automation to send email with the email address from a custom field.

Emily Fuller June 4, 2020

Hi, 

I want to use Jira automation to send out an email to our agents once we have loaded their details on our system. 

I am using a JSD form and have a custom field 'Store Email Address' 

I am trying to set up the automation that when an issue is transitioned to 'Loaded' that the automation rule should action an email to send to the address of the value in the 'Store Email Address' custom field. 

I am doing this using a smart value {{issue.StoreEmailAddress.defaultvalue}} in the To: field in the automation rule. When the issue transitions the rule is giving me an error 'Could not send email, the 'To' address field is empty. If you have referenced a field it may be empty.' 

The field is not empty, could this be because it is just a text custom field or am i using the wrong smart value? 

Please help!

Thanks

1 answer

0 votes
Raynard Rhodes
Contributor
June 4, 2020

I'm not exactly sure, but I feel defaultvalue may cause the issue. If the field doesn't come preloaded with a value then I would imagine it being empty. Is .value valid?

Emily Fuller June 4, 2020

Hi Raynard, Thanks for coming back to me, I was thinking the same thing, there is no default value for this custom field as we need each different agent to enter a unique email address. Would you know what smart value i would need to enter that would retrieve the value that is entered in the form? 

Thanks for your help

Raynard Rhodes
Contributor
June 4, 2020

Try {{issue.StoreEmailAddress.value}}

Emily Fuller June 4, 2020

Hi Raynard, 

I had hope that was going to work but alas no. It is still returning with the same error message. I have a feeling its because the text isnt populating as an email properly, but there is no custom field called email.. 

I feel like this must be a popular thing that many people must want to do so there must be some functionality for it. 

Raynard Rhodes
Contributor
June 4, 2020
David Meyer
Contributor
September 11, 2020

I get that same message when using a Custom - User Picker field (for a JSD User) in my automation audit log. I also have the Notification Scheme set to include sending that custom field value a notification, and still do not get the email.  I thought User Picker fields were specifically to link a user to it's email.  Do I need to do smart-value also?  Notification Helper (which is separate from automation) does not show a fail... 

bem.petr September 18, 2020

Hello.

I have had nearly the same issue.

Automation does not send the email: 

Action details: Send email Could not send email, the 'To' address field is empty. If you have referenced a field it may be empty.

Could you please confirm, that CF could be Type : Text Field (single line) ?

 

My smart value look like this: {{issue.MailtoCustomer.value}}

CF: "Mail to Customer" (text field)

 

Thank you for your answer

Petr

bem.petr September 18, 2020

The Debug messageLog returned value "." instead of text or email address. 

David Meyer
Contributor
September 28, 2020

My issue was that I am using an app to extend the forms presented in the portal.

When the ticket is created, the form generates the data in the field not on create, but as an update. My automation was built to run from Create, so Jira does not yet see the value. I changed the automation to run on Update, and that started working.

One note: I have 2 fields built with automation, and I have only been successful in getting the second one in the form to work. I never got them both even though I rebuilt the request, custom fields, and automation. Working with Apps doesn't always work...  

Suggest an answer

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

Atlassian Community Events