When someone asks for help in your Slack channel, opens a Linear ticket with a written summary and replies in the thread with the link.
Uses
ClaudeLinear
Slack
Turn Slack support requests into Linear tickets
Whenever someone posts in the Slack channel you choose, the message is read and the AI decides whether it is actually a request for help rather than a greeting, a thank you or a reply about something already raised. Only the real requests go further; a close call is left alone, because a tracker with a ticket for every message is no better than no tracker at all. A request where someone is blocked right now is opened at high priority instead of medium.
For each request you get a Linear ticket with a short title and a body saying what is being asked for, what is affected and what is still unknown, with the gaps listed as gaps rather than guessed at. The reporter's own message is added as the first comment, word for word, so the summary can always be checked against what was said. A reply then goes into the Slack thread with the ticket reference and link, so the person who asked can see it was picked up. If no summary comes back, the ticket still opens carrying the original message.
request.When someone posts in a channel. Save it as request.linearTeamName to blank.Set linearTeamName to blank.requestText to blank.Set requestText to blank.textErrorIf a step below fails, save the error as textErrorrequest.text and save it as requestText.Trim request.text and save it as requestText.requestText is emptyIf requestText is emptylinearTeams.List all active Linear teams. Save it as linearTeams.linearTeamId to blank.Set linearTeamId to blank.teamsSeen to an empty list.Set teamsSeen to an empty list.team in linearTeams.teams:For each team in linearTeams.teams:teamErrorIf a step below fails, save the error as teamErrorteam.name and save it as teamName.Trim team.name and save it as teamName.team.key and save it as teamKey.Trim team.key and save it as teamKey.teamName (teamKey) to the end of teamsSeen and save it as teamsSeen.Add teamName (teamKey) to the end of teamsSeen and save it as teamsSeen.linearTeamId is empty and teamName in lowercase is linearTeamName in…If linearTeamId is empty and teamName in lowercase is linearTeamName in…team.id and save it as linearTeamId.Trim team.id and save it as linearTeamId.teamError as text.Show in the output: Skipped a Linear team that was missing its name, key or id: teamError as text.linearTeamId is emptyIf linearTeamId is emptyteamsSeen joined by , .Stop and report a problem: No Linear team is called '@linearTeamName'. Set 'linearTeamName' to a team name or key exactly as Linear spells it. Teams this connection can see: teamsSeen joined by , .requestText'. Save it as triageResponse.
Maximum response length: 8verdict to blank.Set verdict to blank.verdictErrorIf a step below fails, save the error as verdictErrortriageResponse.response_text and save it as verdict.Trim triageResponse.response_text and save it as verdict.verdictError as text.Show in the output: Could not read the triage answer, so no ticket was opened: verdictError as text.verdict starts with urgent (ignoring case) and save it as isUrgent.Check whether verdict starts with urgent (ignoring case) and save it as isUrgent.opensTicket to isUrgent or verdict starts with request (ignoring case).Set opensTicket to isUrgent or verdict starts with request (ignoring case).opensTicket is noIf opensTicket is noticketPriority to 3.Set ticketPriority to 3.isUrgent is yesIf isUrgent is yesticketPriority to 2.Change ticketPriority to 2.requestText'. Save it as titleResponse.
Maximum response length: 60ticketTitle to Support request from Slack.Set ticketTitle to Support request from Slack.titleErrorIf a step below fails, save the error as titleErrortitleResponse.response_text and save it as draftTitle.Trim titleResponse.response_text and save it as draftTitle.draftTitle isn't emptyIf draftTitle isn't emptydraftTitle to 120 characters and save it as ticketTitle.Shorten draftTitle to 120 characters and save it as ticketTitle.titleError as text.Show in the output: Could not read the ticket title, so a default one was used: titleError as text.requestText'. Save it as bodyResponse.
Maximum response length: 600ticketBody to requestText.Set ticketBody to requestText.bodyErrorIf a step below fails, save the error as bodyErrorbodyResponse.response_text and save it as draftBody.Trim bodyResponse.response_text and save it as draftBody.draftBody isn't emptyIf draftBody isn't emptyticketBody to draftBody.Change ticketBody to draftBody.bodyError as text.Show in the output: Could not read the ticket summary, so the original message was used instead: bodyError as text.reporterName to a teammate.Set reporterName to a teammate.reporterErrorIf a step below fails, save the error as reporterErrorrequest.user_id. Save it as reporterProfile.Get the details of request.user_id. Save it as reporterProfile.reporterProfile.user.real_name and save it as reporterRealName.Trim reporterProfile.user.real_name and save it as reporterRealName.reporterRealName isn't emptyIf reporterRealName isn't emptyreporterName to reporterRealName.Change reporterName to reporterRealName.reporterError as text.Show in the output: Could not look up who posted the message: reporterError as text.linearTeamId in team ticketTitle. Save it as ticket.Create an issue titled linearTeamId in team ticketTitle. Save it as ticket.
Priority: ticketPriorityticketBody
---
Reported in Slack by reporterName. Their message is quoted word for word in the first comment on this ticket.commentErrorIf a step below fails, save the error as commentErrorticket.issue.id.Add a comment to Linear issue ticket.issue.id.Posted in Slack by reporterName:
requestTextcommentError as text.Show in the output: The ticket was created but the original message could not be added as a comment: commentError as text.ticketRef to blank.Set ticketRef to blank.ticketUrl to blank.Set ticketUrl to blank.ticketReadErrorIf a step below fails, save the error as ticketReadErrorticket.issue.identifier and save it as ticketRef.Trim ticket.issue.identifier and save it as ticketRef.ticket.issue.url and save it as ticketUrl.Trim ticket.issue.url and save it as ticketUrl.ticketReadError as text.Show in the output: The ticket was created but its reference could not be read: ticketReadError as text.request.channel_id.Reply in a thread in request.channel_id.
Reply To: request.message_tsThanks - this is now tracked as ticketRef.
ticketTitle
ticketUrl
This reply was posted automatically. Anything else that would help is best added to the ticket, because replies in this thread do not reach it on their own.