Every 30 minutes
Email customers when the bug they reported is fixed
When a Jira bug is resolved, the customers who reported it get a short email from you saying it is fixed.
- Runs
- Every 30 minutes
- Apps
- Gmail, Jira
- AI
- Not needed
- Access
- Jira browse; gmail.send
Send this to your assistant
Create a ClickRuntime automation: every 30 minutes, find Jira bugs in SUP resolved since the last check that have a Customer email field, and email each customer from my Gmail that it's fixed.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
A software company's support team promises to let customers know when their bug is fixed. In practice the engineer resolves the ticket, nobody tells support, and the customer finds out weeks later, or never.
Emailing the reporter as soon as the ticket is resolved keeps that promise every time. Customers feel listened to, and support stops hunting through resolved tickets to see who needs an update.
What you get out of it
Promises are kept
Every customer who reported a bug hears when it is fixed. Trust grows with each email.
No manual follow-up
Support does not need to watch resolved tickets. The email goes out as soon as engineering closes the ticket.
Sent from your address
The email comes from your Gmail, so customers can reply directly if something is still wrong.
Each customer is told once
Tickets already handled are remembered. Nobody gets the same email twice.
How it works
What happens, step by step
Every 30 minutes, ClickRuntime looks for bugs in your Jira project that were resolved since the last check.
It reads the customer email field on each ticket.
Each customer gets a short email from your Gmail saying the bug is fixed.
It remembers when it last checked, so nobody is emailed twice.
Before it runs live
- Connect Google through your own Google app (a one-time, 10-minute setup), so it works with your own Gmail
- Connect Jira
What you get
Build your own
Need it to work differently?
Your own rules
Conditions, thresholds, filters and exceptions, written the way you'd explain them to a colleague.
Any number of apps
One automation can read from one app and update several others. Over 248 apps are ready, and anything with an API works too.
AI where it helps
Summaries, classification, extraction and drafts use ClickRuntime's built-in AI, with no extra key.
On a schedule or on each event
Runs as often as every 5 minutes, or the moment an app sends an event, and keeps track of what it already handled.
Changes you can ask for
- Act only on the items that match your own rules, and skip the rest
- Add an AI step, for example to summarize, sort or draft a reply
- Add another app, for example also send it to Slack
- Combine it with other Gmail and Jira steps into one automation
Under the hood
The code that runs this automation
import base64
from email.mime.text import MIMEText
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
from datetime import datetime, timezone
from clickruntime import on_trigger, state_initializer, credentials, http, state, report_fetched
JIRA, SITE = "https://api.atlassian.com/ex/jira/your-cloud-id", "https://acme.atlassian.net/browse/"
adf = lambda text: {"type": "doc", "version": 1, "content": [{"type": "paragraph", "content": [{"type": "text", "text": text}]}]}
def jira(method, path, **kw):
resp = http.request(method, JIRA + path, headers={"Authorization": f"Bearer {credentials.connection('jira', 'work')}", "Accept": "application/json"}, **kw)
return resp.raise_for_status() or (resp.json() if resp.content else None)
gmail = lambda: build("gmail", "v1", credentials=Credentials(credentials.connection("google", "work")), cache_discovery=False).users()
def send(to, subject, body, cc=None):
msg = MIMEText(body)
msg["To"], msg["Subject"] = to, subject
if cc: msg["Cc"] = cc
gmail().messages().send(userId="me", body={"raw": base64.urlsafe_b64encode(msg.as_bytes()).decode()}).execute()
EMAIL_FIELD = "customfield_10050"
@state_initializer
def init():
state.set("since", datetime.now(timezone.utc).strftime("%Y-%m-%d %H:%M"))
@on_trigger
def run(event):
since = state.get("since")
now = datetime.now(timezone.utc).strftime("%Y-%m-%d %H:%M")
issues = jira("POST", "/rest/api/3/search/jql", json={"jql": f'project = SUP AND issuetype = Bug AND resolved >= "{since}" AND "{EMAIL_FIELD}" is not EMPTY',
"fields": ["summary", EMAIL_FIELD], "maxResults": 100})["issues"]
report_fetched(len(issues))
if not issues:
return {"emailed": 0}
emails = [(e.strip(), i["fields"]["summary"]) for i in issues for e in (i["fields"][EMAIL_FIELD] or "").split(",")]
for email, title in emails:
send(email, f"Fixed: {title}", f"Hi,\n\nGood news: the problem you reported, \"{title}\", has been fixed. Reply here if anything still looks wrong.\n\nThe Acme team")
state.set("since", now)
return {"emailed": len(emails)}FAQ
Common questions
How does it know who reported the bug?
What if several customers reported the same bug?
Can I change the wording?
What permissions does it need?
Does it need AI?
How many runs does it use?
Can I change how it works?
Related
You might also like
Turn vendor security advisories into Jira tickets
New security advisories from the vendors you rely on become Jira tickets, and you get an email for each one.
See how it worksTurn support emails into categorised Jira tickets
Every email to your support address becomes a Jira ticket with a category, priority and summary, and the sender gets an acknowledgement with the ticket number.
See how it worksCreate Jira onboarding tasks and send a welcome email
When a new hire is confirmed, an onboarding epic with tasks appears in Jira and the new hire gets a welcome email from you, with their manager copied.
See how it worksKeep exploring
Set up “Email customers when the bug they reported is fixed” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.