Every 5 minutes
Turn Slack requests into Jira issues
Each request posted in your requests channel becomes a Jira issue, and the link is posted back in the thread.
- Runs
- Every 5 minutes
- Apps
- Jira, Slack
- AI
- Optional
- Access
- Slack channels:history, chat:write; Jira create
Send this to your assistant
Create a ClickRuntime automation: every 5 minutes, check #it-requests for new messages, create a Jira issue in IT for each with a title and priority, attach any files, and reply in the thread with the link.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
An IT team asks colleagues to raise tickets in Jira, but everyone posts in the #it-requests channel instead. Someone in IT copies each message into Jira by hand, and requests made late on Friday wait until Monday to be logged.
Creating the ticket straight from the Slack message, and replying with the link, lets people keep asking the way they prefer while IT keeps a proper queue. The requester can follow the ticket, and nothing is lost in the channel's scroll.
What you get out of it
People ask where they already are
Colleagues post in Slack as they always have. No need to learn the Jira portal.
Every request is logged
Each message becomes a ticket within minutes. Nothing depends on someone copying it.
Requesters can follow progress
A thread reply with the link lets the requester check the ticket. Fewer 'any update?' messages.
Screenshots come along
Files attached to the message are added to the ticket. The engineer has the full picture.
How it works
What happens, step by step
Every 5 minutes, ClickRuntime reads new messages in your #it-requests Slack channel.
It skips thread replies and messages it has already handled.
If you turn on AI, it writes a short title and priority from each message.
A Jira issue is created for each request, with any attached files.
A reply with the ticket link is posted in the message's thread.
Before it runs live
- Connect Jira
- Connect Slack, then invite the app to the channel (type /invite @ClickRuntime there)
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
- Change what the AI looks for, or how it writes the result
- Add another app, for example also send it to Google Sheets
- Combine it with other Jira and Slack steps into one automation
Under the hood
The code that runs this automation
from slack_sdk import WebClient
from clickruntime import on_trigger, credentials, http, state, 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)
CHANNEL = "C0123ITREQ"
@on_trigger
def run(event):
token = credentials.connection("slack", "work")
slack = WebClient(token=token)
oldest = state.get("oldest") or "0"
msgs = [m for m in slack.conversations_history(channel=CHANNEL, oldest=oldest, limit=100)["messages"] if not m.get("thread_ts") and not m.get("bot_id")]
report_fetched(len(msgs))
if not msgs:
return {"created": 0}
for m in sorted(msgs, key=lambda m: m["ts"]):
title = m["text"].splitlines()[0][:120]
try:
title = ai.generate(m["text"][:3000], system="Write a short, specific IT ticket title.", max_output_tokens=30).text.strip()
except (ai.AINotIncluded, ai.AILimitReached):
pass
issue = jira("POST", "/rest/api/3/issue", json={"fields": {"project": {"key": "IT"}, "issuetype": {"name": "Task"}, "summary": title, "description": adf(m["text"])}})
for f in m.get("files", []):
data = http.get(f["url_private"], headers={"Authorization": f"Bearer {token}"}).content
http.post(f"{JIRA}/rest/api/3/issue/{issue['key']}/attachments", files={"file": (f["name"], data)},
headers={"Authorization": f"Bearer {credentials.connection('jira', 'work')}", "X-Atlassian-Token": "no-check"})
slack.chat_postMessage(channel=CHANNEL, thread_ts=m["ts"], text=f"Logged as <{SITE}{issue['key']}|{issue['key']}>. We'll update you there.")
state.set("oldest", max(m["ts"] for m in msgs))
return {"created": len(msgs)}FAQ
Common questions
Are thread replies turned into tickets?
How is the ticket title chosen?
Can it ignore messages from the IT team?
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
Update Jira and post release notes to Slack when you tag a release
When a release is tagged, the Jira tickets mentioned in its commits get a fix version and move to Done, and Slack gets the release notes.
See how it worksPost a daily Jira digest in Slack
Each weekday morning Slack shows yesterday's Jira progress grouped by status, plus blockers and what is due soon.
See how it worksAlert Slack on production errors with one Jira bug per error
Production errors are posted to Slack straight away, and each distinct error opens exactly one Jira bug, with repeats added as comments.
See how it worksKeep exploring
Set up “Turn Slack requests into Jira issues” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.