Every 5 minutes
Turn support emails into Linear issues
Each support or feedback email becomes a clear Linear issue with a priority, or a comment on the matching issue if one is already open.
- Runs
- Every 5 minutes
- Apps
- Gmail, Linear
- AI
- Yes, uses the built-in AI allowance
- Access
- Gmail modify; Linear write
Send this to your assistant
Create a ClickRuntime automation: every 5 minutes, read new Gmail messages labelled Support. Have AI write a title, description and priority, check Linear for a similar open issue, and either create the issue or comment on the existing one.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
A two-person SaaS team gets bug reports and feature requests by email. The founder reads them between calls, means to copy the good ones into Linear, and often doesn't. Three customers report the same broken export over a week, and each email sits in a different thread. When the engineer finally hears about it, nobody can say how many people were affected or who to tell when it is fixed.
Turning each labelled email into a tidy Linear issue, or a comment on the one that already exists, means customer reports reach the people who fix things the same hour they arrive, and duplicate reports add weight instead of noise.
What you get out of it
Reports reach engineering the same hour
Nobody has to forward or retype an email. The issue appears in Linear minutes after the customer hits send, while the details are fresh.
Duplicates become evidence
When a second customer reports the same problem, it is added as a comment on the existing issue. You can see at a glance how many people a bug affects, which makes prioritising easier.
Clean titles from messy emails
Customers write long, friendly emails with the actual problem in the third paragraph. The issue gets a short title and a focused description, with the original sender noted so you can follow up.
A priority to start from
Each issue arrives with a suggested priority based on what the customer describes. Data loss and outages rise to the top, while wording tweaks wait their turn.
Every customer gets an answer
Because each issue records who reported it, closing the issue tells you exactly who to email back. Customers who reported a bug hear when it is fixed.
How it works
What happens, step by step
Every 5 minutes, ClickRuntime looks for new Gmail messages with your Support label.
AI reads each one and writes a short title, a clear description and a suggested priority.
It searches Linear for a similar open issue and adds a comment there, or creates a new issue if none matches.
The email is then marked as done in Gmail, so the same message is never turned into an issue 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 Linear
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 Gmail and Linear steps into one automation
Under the hood
The code that runs this automation
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
from clickruntime import on_trigger, credentials, http, ai, report_fetched
TEAM_ID, DONE_LABEL = "your-linear-team-id", "your-processed-label-id"
SCHEMA = {"type": "object", "properties": {"title": {"type": "string"}, "description": {"type": "string"}, "priority": {"type": "integer"}}, "required": ["title", "description", "priority"]}
def linear(query, variables):
return http.post("https://api.linear.app/graphql", headers={"Authorization": credentials.secret("LINEAR_API_KEY")}, json={"query": query, "variables": variables}).json()["data"]
@on_trigger
def run(event):
gmail = build("gmail", "v1", credentials=Credentials(credentials.connection("google", "work")), cache_discovery=False)
msgs = gmail.users().messages().list(userId="me", q="label:support -label:linear-done").execute().get("messages", [])
report_fetched(len(msgs))
if not msgs: return {"summary": "Nothing new"}
for m in msgs:
msg = gmail.users().messages().get(userId="me", id=m["id"], format="full").execute()
sender = next(h["value"] for h in msg["payload"]["headers"] if h["name"] == "From")
try:
d = ai.generate(f"Support email from {sender}:\n{msg['snippet'][:2000]}", system="Write a Linear issue. Priority 1 urgent to 4 low.", json_schema=SCHEMA).json
except ai.AIError:
d = {"title": msg["snippet"][:80], "description": msg["snippet"], "priority": 3}
found = linear("query($t: String!) { issueSearch(query: $t, first: 1, filter: {state: {type: {nin: [\"completed\", \"canceled\"]}}}) { nodes { id } } }", {"t": d["title"]})["issueSearch"]["nodes"]
body = f"{d['description']}\n\nReported by {sender}"
if found:
linear("mutation($i: CommentCreateInput!) { commentCreate(input: $i) { success } }", {"i": {"issueId": found[0]["id"], "body": body}})
else:
linear("mutation($i: IssueCreateInput!) { issueCreate(input: $i) { success } }", {"i": {"teamId": TEAM_ID, "title": d["title"], "description": body, "priority": d["priority"]}})
gmail.users().messages().modify(userId="me", id=m["id"], body={"addLabelIds": [DONE_LABEL]}).execute()
return {"summary": f"{len(msgs)} emails handled"}FAQ
Common questions
Which emails does it pick up?
How does it decide an issue already exists?
Does the customer's email address end up in Linear?
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 meeting transcripts into Linear issues and a recap email
Send a meeting transcript and get a Linear issue for each action item, plus a recap email to everyone who attended.
See how it worksLabel new emails automatically
New mail is sorted into labels like Inquiry, Invoice and Newsletter within minutes of arriving.
See how it worksGet draft replies to emails that need an answer
Emails that need a reply get a draft in the same thread, ready for you to edit and send.
See how it worksKeep exploring
Set up “Turn support emails into Linear issues” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.