Custom email notification body

Hello. My objective is to call external REST api, get the response and then send it via EMAIL notification after issue creation .What is the most convinient way to do this ?

I want to create some sort of auto-replies on JIRA ticket.
Scenario:

1) User have created issue

2) I catch subject and then make rest call to my api which will generate a response

3) send this response via email to the reporter 

2 answers

0 vote

There are two approaches in your question.  You open with a call to REST, which implies something externally polling JIRA for data, but then the auto-reply stuff all implies JIRA triggering something in a remote system.

The second option is probably better, as it's reacting to user activity, not relying on a scrape or cycling process.

However, the most simple way to do this is actually "use JIRA".  Set up a notification scheme that emails the reporter on the "issue created" event.  That's all you need really, as they'll get an issue created email.  You could also amend the templates to make that type of email more suited to your organisation/process
 
However, if you still need external processing, then I'd write something that could read incoming email, process it, and send mail back to the user independently.  For the incoming data, you do much the same as the "mail reporter" I mentioned above, but have it mail your external box so your service can read, process and send on the mail you want.

You could also amend the templates to make that type of email more suited to your organisation/process


Is there a way to call external API from Velocity template ? I mean we need data from external API actually before rendering so we could insert response into template as a plain text

Is there a way to call external API from Velocity template ? I mean we need data from external API actually before rendering so we could insert response into template as a plain text

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Thursday in Stride

Get Started in Stride in 3 Easy Steps

Get started on Stride in 3 easy steps   If you’re new to Stride, welcome! We’re super excited to have you aboard. Stride is easy to use and set up, so don’t worry about reading tons of borin...

53 views 0 2
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you