The moment it happens
Open an incident ticket and archive its evidence in Drive
Each reported incident opens a Jira ticket, its report is saved to your Drive incidents folder, and the ticket links to the file.
- Runs
- The moment it happens
- Apps
- Google Drive, Jira
- AI
- Optional
- Access
- Jira create; Drive write
Send this to your assistant
Create a ClickRuntime automation: when an incident is reported at the trigger link, create a Jira ticket in INC, save the report as a file in my Incidents folder in Drive, link the file in the ticket, and post to #incidents.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
A company must keep evidence of security and operational incidents for audits. Reports arrive from different tools and people, and end up scattered across inboxes and chat threads. When the auditor asks, collecting them takes days.
Opening a ticket and saving the report to a single Drive folder for every incident builds the evidence trail as incidents happen. The ticket tracks the response, and the file is ready when the auditor asks.
What you get out of it
Evidence in one place
Every incident report is saved to the same folder, named by ticket. Audits become a matter of sharing a folder.
Ticket and file linked
The Jira ticket links to the saved report. Responders always have the original details.
The team is alerted
A Slack post makes sure someone picks up the incident straight away.
A summary if you want it
With AI turned on, a short summary of the report is added to the ticket. Responders get the gist in seconds.
How it works
What happens, step by step
When an incident is reported, the details are sent to your automation's trigger link.
ClickRuntime creates an incident ticket in Jira.
The full report is saved as a file in your Drive incidents folder, named with the ticket key.
A link to the file is added to the ticket, with a short AI summary if you turn it on.
A message is posted to your #incidents Slack channel.
Before it runs live
- Connect Google Drive
- Connect Jira
- Paste your automation's link into the other app's webhook settings
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 Slack
- Combine it with other Google Drive and Jira steps into one automation
Under the hood
The code that runs this automation
import io, json
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
from googleapiclient.http import MediaIoBaseUpload
from clickruntime import on_event, credentials, http, notify, ai
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)
FOLDER = "incidents-folder-id"
@on_event
def handle(event):
inc = event.json or {}
summary = inc.get("title", "Incident")
try:
summary = ai.generate(json.dumps(inc)[:6000], system="Summarise this incident in one sentence.", max_output_tokens=60).text.strip()
except (ai.AINotIncluded, ai.AILimitReached):
pass
key = jira("POST", "/rest/api/3/issue", json={"fields": {"project": {"key": "INC"}, "issuetype": {"name": "Task"},
"summary": f"{inc.get('title', 'Incident')}"[:250], "description": adf(summary)}})["key"]
drive = build("drive", "v3", credentials=Credentials(credentials.connection("google", "work")), cache_discovery=False)
f = drive.files().create(body={"name": f"{key} {event.received_at[:10]}.json", "parents": [FOLDER]}, fields="webViewLink",
media_body=MediaIoBaseUpload(io.BytesIO(json.dumps(inc, indent=2).encode()), mimetype="application/json")).execute()
jira("POST", f"/rest/api/3/issue/{key}/comment", json={"body": adf(f"Evidence archived: {f['webViewLink']}")})
notify.slack(f"Incident {key}: {summary}\n{SITE}{key}", channel="#incidents")
return {"issue": key}FAQ
Common questions
What format is the report saved in?
Who can see the Drive folder?
Can incidents come from several tools?
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
Set up a Drive folder and Jira tickets for each new hire
For every new hire, a Drive folder with copies of your onboarding documents is created and shared, Jira onboarding tickets are opened, and Slack gets a summary.
See how it worksTurn meeting transcripts in Drive into Jira tasks
When a meeting transcript is saved to your Drive folder, its action items become Jira tasks with owners and due dates, and Slack lists them.
See how it worksEmail new leads and alerts from your own address
When a form or tool sends a lead or error to your link, the right email goes out from your Gmail straight away.
See how it worksKeep exploring
Set up “Open an incident ticket and archive its evidence in Drive” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.