Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Automate sending emails using python

Priyadarshini R
August 26, 2026

Hi friends,

 

I am writing a python script to send weekly emails in the emails I will be sending a report related to SLAs . It is a custom report. Has anyone tried sending the automatic emails using python. 

 

Priya R

2 answers

0 votes
Tomislav Tobijas
Community Champion
August 27, 2026

Hey @Priyadarshini R ,

Are you planning to do any transformations or summaries of those SLAs? Meaning, if you're pulling things directly from JSM you can use the following API endpoint: JSM Cloud / REST API / Get sla information 

GET /rest/servicedeskapi/request/<issue-key-or-id>/sla

But this will get/pull info directly from a specific work item/ticket. If you need a 'report,' you'd need to aggregate things somewhere. 👀

Alternatively, you could use Jira automation and something like this:

  1. Trigger: Go to Project settings > Automation and create a rule with a Scheduled trigger set to run weekly

  2. Fetch Data: Add a Lookup issues action and enter the JQL query for your SLA report (e.g., fetching tickets that breached their SLA)

  3. Send Email: Add a Send email action. You can format the email body using HTML and smart values like {{#lookupIssues}} to iterate through the results and build a structured table for your report

A similar concept using a JQL query might work with Python.. but that's the approach I'd maybe use or at least try 🤔

Cheers,
Tobi

0 votes
Gor Greyan
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 Champions.
August 27, 2026

Hi @Priyadarshini R
Welcome to the Atlassian Community!

One thing to clarify: where is the SLA data for your custom report coming from? If you're using native JSM SLAs, an SLA Marketplace app, or calculating the SLA yourself, the API/data retrieval part will be different.

You can query the required Jira issues using the REST API and authenticate with an API token. For sending the email, you could use your organization's SMTP server or an API such as Microsoft Graph if you're using Microsoft 365.

Suggest an answer

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

Atlassian Community Events