Creating a custom rule that will only be triggered when a specific request type is created
Asked by Don Roberts:

I am trying to create a custom rule or notification where when a specific request type is created in a specific JSM project that will send a notification to s specific email address that is not a member of JSM. An example is i have a request type "Part order" in a project i call FUAV. When a logged in user creates the "Part Order" request an email will get sent to a specific non JSM email address.


Answers:
author: Tobias H
body: Hi Don!

If I understand your question correctly, it should be possible to achieve with an automation like this:

![reqtype-email.png](https://community.atlassian.com/t5/image/serverpage/image-id/240685i43CB2AFAE4883F25/image-size/large?v=v2&px=999 "reqtype-email.png")

1. When Issue is created
2. IF Request type equals "Part Order"
3. THEN Send email to email@goes.here with Subject ABC and Content XYZ.

comments: author: Don Roberts
body: Thank you so much Tobias. I will try this and let you know.


author: Don Roberts
body: Hello Tobias. When running thru the steps you show above i'm not seeing the component of "Request Type" equals. See screenshot. We are set up on a cloud based Atlassian environment. I do not see an option to add a component.


author: Don Roberts
body: ![2023-02-16 12_51_07-Window.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/240718i2BA7BB3C9AC833B7/image-size/large?v=v2&px=999 "2023-02-16 12_51_07-Window.jpg")


author: Tobias H
body: After you selected When Issue created do these steps:

1. New Component
2. New Condition
3. Select the Issue fields condition (should be recommended on the top)
4. Change "Field" to *Request Type* , change "Condition" to *equals* and "Value" to your request type *Part Order* and press **Save**
5. Select New Action
6. Search for Email (or scroll down) and Select *Send Email*
7. Fill in To, Subject and Content as you would a normal email. (Remember that this will be the same email over and over again, whenever the automation runs.)

![reqtype-email-guide.png](https://community.atlassian.com/t5/image/serverpage/image-id/240719i5EF7BC4A3CD6EC08/image-size/large?v=v2&px=999 "reqtype-email-guide.png")

Hope that helps! ?


author: Don Roberts
body: Thank you so much Tobias. That worked. The only difference in your options and mine were that i had to use "Customer Request Type: as "Request Type" was not an option. Now i just need to customize the email to included all the information from the ticket. :-)


author: Tobias H
body: Happy to hear that you managed to solve it ?

(If you didn't know about it previously, I heavily recommend this [cheat sheet with Jira smart values](https://support.atlassian.com/cloud-automation/docs/jira-smart-values-issues/) to automatically add info from the tickets to your email!)


author: Don Roberts
body: Hi Tobias,

This may sound crazy but i'm totally confused on why i'm not getting the results i thought i would when trying to add information to the body of the sending email. Screenshots are below. As you can see I have all the issu parts set up in the Content section with issue field names but the only data that is coming out right is the "Part Number" Can you tell me what i might be doing wrong?![AutomationScreen.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/240760i868F1F8E7C00FCA0/image-size/large?v=v2&px=999 "AutomationScreen.jpg")![FormsBuildScreen.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/240761iFC5EE25A8FAC2F2D/image-size/large?v=v2&px=999 "FormsBuildScreen.jpg")![EmailResultScreen.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/240762iC5ADC4148C887E3A/image-size/large?v=v2&px=999 "EmailResultScreen.jpg")


author: Tobias H
body: I'm not super knowledgable regarding custom smart values, but my initial thought is that it would need to have some addtional property after the custom fields name. Then again, the part number was visible with nothing extra ?

I would try to add .value after the CF names, like {{issue.Adress1.value}}.  
That should make sure to display the filled in info for the field.

Let me know if that works ?


author: Don Roberts
body: Darn. I was hoping that was the fix but adding .value did not fix it. I'll keep digging around to see if i find anything. Its totally mind-boggling. :-(


Tags: notification