Implementation
HubSpot and Linear – customer requests from the company record to the product team
How we built a custom integration that lets CSMs and support send feature requests and bugs to Linear from the HubSpot company record, with revenue attached.
By Viktor Olsson, founder and RevOps consultant
Implementation · Customer success· 8 min read
HubSpot and Linear can be connected so that CSMs, support and reps send feature requests and bugs to the product team straight from the company record. We built it as a custom app in HubSpot for a B2B subscription company. The app shows the company's Linear issues with their status, creates the customer in Linear with revenue from HubSpot, and suggests existing issues before a new one is created. There are also ready-made apps in the HubSpot Marketplace that connect HubSpot tickets to Linear. A custom integration makes sense when you want to control how customers are matched and what leaves HubSpot.
Why feature requests get lost
Customer success and support talk to customers every day. The product team decides what gets built. In many companies, the requests sit somewhere in between, in Slack threads and spreadsheets.
That causes the same problems everywhere:
- The product team can't see which customers asked for something, or how much they pay.
- The same request is written down three times, in different words, by three different people.
- The CSM doesn't know whether the request was built, so they can't tell the customer.
At the client in this project, the customer-facing teams worked in HubSpot and the product team in Linear. The goal was for the teams to send requests without switching tools, and for the product team to see the revenue behind every request.
What the app on the company record does
The app is an app card in the middle column of the company record. It has three parts.
The company's Linear issues. A list of the company's most recently updated Linear issues, with status, assignee and a link. The app finds them two ways: issues with the HubSpot record attached, and issues with a customer request from the company's Linear customer.
A customer request. Whoever talked to the customer writes the request in the customer's own words and picks how much it matters to them: nice to have, important or dealbreaker. Then they choose whether it belongs to an existing issue or should become a new one. A new issue goes to Triage, the inbox for requests, in the product team's team in Linear.
Another issue. A bug, a data problem or something else for a chosen team, with a type, a priority and the HubSpot record attached.
Linear has Customers, with revenue, and customer requests linked to issues. The app uses both. When someone sends a request, the app finds the company's customer in Linear or creates it. A new customer gets the company's account ID (a custom ID field in HubSpot, such as the customer number), its domain and its annual revenue, calculated from the revenue field in HubSpot. Then the request is added to the issue. The product team can sort issues by how much revenue is behind them.
1 · HubSpot
Company record
The CSM writes the request and picks how much it matters to the customer.
2 · Serverless function
Matching and suggestions
Finds the right Linear customer and asks the AI service for similar issues.
3 · Linear
Issue with customer and revenue
The request lands on the issue, linked to the customer and its annual revenue.
The flow above: the CSM fills in the request on the company record. A serverless function in HubSpot finds the customer in Linear, fetches suggestions for similar issues and creates the request. In Linear, the request shows on the issue together with the customer and the revenue.
How the app avoids duplicate requests
Before creating a new issue, the user can click "Suggest matching issues". The app sends the request text to a small service outside HubSpot. The service reads the open issues in the product team's Triage and asks Google's Gemini model to pick the ones that cover the same need. If none fit, it suggests a title for the new issue.
Two things mattered here:
- Only the text leaves HubSpot. No fields from the company record are sent to the AI service. Every call is signed, so the service only answers requests from HubSpot.
- The form works without the suggestions. If the service doesn't answer, the button says suggestions aren't available right now, and the rest of the app works as usual.
The right Linear customer, even when a domain is shared
The hardest part of the integration was matching the HubSpot company to the right customer in Linear. The domain isn't enough, because two accounts can share a domain. For example, two divisions of the same group can be separate customers with separate contracts.
So the rules are strict:
- The company's account ID decides. It is stored as the customer's external ID in Linear.
- A customer with the same domain counts only if it has no external ID.
- If the domain already belongs to a customer with another ID, the request is blocked until the HubSpot company has its account ID.
- The app never changes an existing customer in Linear.
Blocking a request with a clear explanation is better than logging it on the wrong customer. The wrong customer means the wrong revenue, and then the product team prioritises on the wrong numbers. The same idea is behind One customer, one place in HubSpot: every customer exists once, with one ID that decides.
Built to handle failure
An integration the teams use every day has to work when something goes wrong. This is what we built in:
- No personal API keys. The app signs in to Linear through an OAuth app that belongs to the workspace. New tokens are fetched automatically before the old ones expire. Linear still shows the name of the HubSpot user who created the issue.
- Within HubSpot's time limit. HubSpot stops a serverless function after 15 seconds. All calls to Linear share one time budget, and failed calls are retried after a short pause, within that budget.
- No duplicates on retry. Every submitted form gets its own ID. If someone submits the same form again after a timeout, the app finds what was already created instead of creating a new issue.
- The list can fail without taking the forms with it. If Linear is slow, the forms still show, with a warning that the list couldn't be read.
- The function decides. Teams, labels and which company fields are sent are set by the serverless function, not by the form in the browser.
The code lives in Git. Every change is tested automatically and checked with HubSpot's tools before it goes live.
What you need to build it
- HubSpot Enterprise, for the HubSpot serverless functions the app uses. HubSpot's newer developer platform lets an app call its own server instead, with different requirements.
- A developer app in HubSpot, built on HubSpot's developer platform, with read access to companies. The app writes nothing to HubSpot.
- An OAuth app in Linear, created by a Linear admin.
- An account ID on the companies in HubSpot, if you want the strict matching. Without an ID, matching falls back to the domain.
- An AI service for the suggestions, if you want them. Everything else works without it.
A ready-made app from the Marketplace is cheaper to start with. A custom integration pays off when you have rules for how customers are matched, want revenue in Linear, or want to control exactly what leaves HubSpot. There is more on ready-made apps versus custom integrations in Quote to invoice in HubSpot.
More integrations we have built around HubSpot: translating the knowledge base with Phrase and linking companies to their parent company automatically.
Common questions
Does Linear have a native HubSpot integration? No. Linear builds its own integrations with tools such as Zendesk, Intercom and Salesforce, but not with HubSpot. Ready-made apps from other vendors in the HubSpot Marketplace connect HubSpot tickets to Linear issues, and Zapier can create a Linear issue when a HubSpot ticket is created. Check what each app supports before you choose.
How do you send feature requests from HubSpot to Linear? For requests that start as HubSpot tickets, a ready-made Marketplace app is often enough. For requests logged on the company, with the customer's revenue attached in Linear, you need a custom app card like the one described here.
Can you see the revenue behind a feature request in Linear? Yes. Linear has customers with revenue, and customer requests are linked to issues. With an integration that takes the revenue from HubSpot, the product team can sort issues by how much revenue is behind them.
How do you avoid duplicate feature requests in Linear? By comparing a new request with the open issues before a new one is created. We let an AI model suggest existing issues that cover the same need, so the CSM adds the request to the right issue.
Which HubSpot licence do you need for an app with serverless functions? HubSpot serverless functions need an Enterprise licence. Our app uses them to call Linear with a secret key. Check the requirements in HubSpot's developer documentation before you start, since they change.
Is customer data sent to the AI model? In our integration, only the request text is sent. No fields from the company record go with it. The text is what the CSM wrote, so it shouldn't contain sensitive details.
How long does it take to build a HubSpot and Linear integration? It depends on how much the app should do. A list of issues and a simple form are the quick part. Matching rules, error handling and AI suggestions take longer.
About the author
Viktor Olsson, founder and RevOps consultant
Viktor has worked with HubSpot for six years, with teams from 3 people to organisations with 30 sales reps across the Nordics. He also works in RevOps at an international SaaS company.