Skip to content

Every 5 minutes

Turn 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.

Runs
Every 5 minutes
Apps
Gmail, Jira
AI
Yes, uses the built-in AI allowance
Access
gmail.modify; Jira create issues

Send this to your assistant

Create a ClickRuntime automation: every 5 minutes, take new emails to support@, have AI pick a category, priority and summary, create a Jira ticket in SUP, reply to the sender with the ticket number, and label the email as logged.

Paste it into your assistant. It tells you what it will send or change before it runs live.

First time? Adding ClickRuntime to your assistant takes about two minutes.

Why use it

Why teams use this automation

A company's IT helpdesk lives in a shared inbox. Requests are answered in the order someone happens to open them, nobody knows how many are outstanding, and people email again to ask whether their first email arrived.

Turning every email into a categorised Jira ticket, and letting the sender know straight away, gives the helpdesk a real queue. Requesters have a reference number, and the team can see workload and priorities at a glance.

What you get out of it

  • A queue instead of an inbox

    Every request becomes a ticket with a status. Nothing is lost or answered twice.

  • Senders know it arrived

    An immediate reply with the ticket number cuts follow-up emails. People can quote the number when they chase.

  • Sorted on arrival

    Category and priority are set from the email. Urgent requests rise to the top.

  • The inbox stays tidy

    Logged emails get a label in Gmail. The team can see at a glance what has been handled.

How it works

What happens, step by step

  1. Every 5 minutes, ClickRuntime looks in Gmail for new emails to your support address that have not been logged.

  2. AI reads each email and picks a category, a priority and a one-line summary.

  3. A Jira ticket is created with those details and the full email.

  4. The sender gets a short reply with the ticket number.

  5. The email is labelled as logged, so it is never handled 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

RunsEvery 5 minutes
Turn support emails into categorised Jira ticketstoday, 9:00Succeeded
Email · [SUP-882] Re: Can't log in to VPNThanks, we've logged your request as SUP-882 and will be in touch soon.

Build your own

Need it to work differently?

This template is a starting point. Copy the prompt and change it, or describe a different automation from scratch, with your own conditions, more apps or an AI step. Your assistant writes it, tests it and runs it on ClickRuntime.
  • 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
  • Change what the AI looks for, or how it writes the result
  • 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

This is the Python script that runs each time the automation starts. Your AI assistant writes it for you when you send the prompt, and you allow each step in your assistant. To change how the automation works, describe the change to your assistant and it updates the script for you. For every function it can use, see the script reference.
support_emails_turned_into_jira_tickets_by_ai.pyexample
import base64
from email.mime.text import MIMEText
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
from clickruntime import on_trigger, credentials, http, ai, 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()

LABEL_ID = "Label_123"  # your "Logged" label
SCHEMA = {"type": "object", "properties": {"category": {"type": "string", "enum": ["access", "hardware", "software", "other"]},
          "priority": {"type": "string", "enum": ["High", "Medium", "Low"]}, "summary": {"type": "string"}}}

@on_trigger
def run(event):
    g = gmail()
    msgs = g.messages().list(userId="me", q="to:support@acme.example -label:logged newer_than:2d").execute().get("messages", [])
    report_fetched(len(msgs))
    if not msgs:
        return {"created": 0}
    for m in msgs:
        msg = g.messages().get(userId="me", id=m["id"], format="metadata", metadataHeaders=["From", "Subject"]).execute()
        h = {x["name"]: x["value"] for x in msg["payload"]["headers"]}
        t = ai.generate(f"Subject: {h.get('Subject')}\n{msg['snippet']}", json_schema=SCHEMA, max_output_tokens=100, system="Triage this IT support email.").json
        issue = jira("POST", "/rest/api/3/issue", json={"fields": {"project": {"key": "SUP"}, "issuetype": {"name": "Task"}, "summary": t["summary"][:250],
                     "priority": {"name": t["priority"]}, "labels": [t["category"]], "description": adf(f"From {h['From']}\n\n{msg['snippet']}")}})
        send(h["From"], f"[{issue['key']}] Re: {h.get('Subject', '')}", f"Thanks, we've logged your request as {issue['key']} and will be in touch soon.")
        g.messages().modify(userId="me", id=m["id"], body={"addLabelIds": [LABEL_ID]}).execute()
    return {"created": len(msgs)}

FAQ

Common questions

Does it reply with the full answer?
No. The reply only confirms the ticket and its number. Your team answers through Jira or email as usual.
What categories does it use?
The ones you set, such as access, hardware, software and other. They are added as labels on the ticket.
Will replies to the acknowledgement create new tickets?
No. Emails already in a thread it has logged are skipped, so follow-ups stay in the same conversation.
What permissions does it need?
gmail.modify; Jira create issues. Nothing else in your accounts is used.
Does it need AI?
Yes. It uses ClickRuntime's built-in AI, so you don't need an OpenAI or Anthropic key. Every plan includes a monthly AI allowance.
How many runs does it use?
One run each time it checks. Checks that find nothing new and stop right away aren't counted.
Can I change how it works?
Yes. Describe the change to your AI assistant, for example a different schedule, channel or filter. It updates the automation, tests it and tells you what changed.

Set up “Turn support emails into categorised Jira tickets” from your assistant

Copy the prompt above, or connect your assistant first. Free plan, no credit card.