Linear, GitHub8 min read
Create Linear or GitHub issues from form submissions
Open a Linear issue or a GitHub issue for every bug report or feature request sent through an Ikiform form, with a relay that verifies the signature.
A bug report form is more useful when each report lands where the work happens. This guide turns each Ikiform submission into an issue, in Linear or in a GitHub repository. Pick one; the steps are the same apart from the API call.
- A visitor submits your form, and it posts to Ikiform.
- Ikiform stores the submission and sends a signed webhook to your relay.
- The relay checks the signature, builds an issue title and body and creates the issue with the tracker's API.
- Linear or GitHub answers the relay, and the relay answers Ikiform.
Why there's a relay
Linear and GitHub create issues through authenticated API calls, each with its own body. Ikiform can't add an API key or reshape its body, so a relay makes the call. Your API key stays in the relay, never in Ikiform.
Before you start
- An Ikiform form that already receives submissions. A
subjectfield makes good issue titles; without one, the relay usesname, then the submission id. - For Linear, a workspace where you can create API keys. For GitHub, a repository where you can create issues.
- Somewhere to run the relay: a Cloudflare account with a domain on it, or a Next.js app on Vercel or any other host.
What Ikiform sends
Every delivery is a POST with a JSON body. The body has the same shape for every endpoint, and you can't change it. A submission looks like this:
{
"id": "dlv_01k7v2d4n8r2p6s0w3y5b7c9e1",
"type": "submission.created",
"timestamp": "2026-10-23T12:00:00.000Z",
"api_version": "2026-10-17",
"data": {
"submission_id": "sub_01k7v2c9t3e8m5q4x6z0a1b2c3",
"form": { "id": "frm_xxxxxxxxxxxxxxxx", "name": "Contact" },
"fields": { "name": "Ada", "email": "ada@example.com", "message": "Hello" },
"meta": {
"user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7)",
"origin": "https://example.com",
"referrer": "https://example.com/contact",
"country": "GB",
"subject": null,
"reply_to": "ada@example.com"
},
"created_at": "2026-10-23T12:00:00.000Z",
"truncated": false
}
}The form's values are in data.fields, keyed by the input name. A test from the dashboard sends an endpoint.test event instead, with data.endpoint_id and data.message and no fields. The full reference is on Webhooks.
What the issue looks like
The title is the form name and the subject field, like Bug report: Export button does nothing. The body has one section per field. Each value sits in a code block, so a visitor can't @-mention your team, add images or break the layout:
- form.name + fields.subject becomes title: Bug report: Export button does nothing.
- fields.name becomes body: name, value in a code block.
- fields.email becomes body: email, value in a code block.
- fields.message becomes body: message, value in a code block.
- submission_id + delivery id becomes body: last line with both ids.
**name**
```text
Ada
```
**email**
```text
ada@example.com
```
**message**
```text
Hello
```
Ikiform submission `sub_01k7v2c9t3e8m5q4x6z0a1b2c3`, delivery `dlv_01k7v2d4n8r2p6s0w3y5b7c9e1`Linear
Create an API key
In Linear, open Settings → Security & access and create a personal API key. Linear expects it in the
Authorizationheader as is, withoutBearer.Find the team ID
Terminal curl https://api.linear.app/graphql \ -H "Authorization: $LINEAR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"query":"{ teams { nodes { id name } } }"}'Response { "data": { "teams": { "nodes": [{ "id": "9cfb482a-0000-0000-0000-000000000000", "name": "Support" }] } } }Write the relay
src/index.tsimport { verifyWebhook, type WebhookEvent, WebhookVerificationError } from "@ikiform/sdk/webhooks"; interface Env { IKIFORM_WEBHOOK_SECRET: string; LINEAR_API_KEY: string; LINEAR_TEAM_ID: string; } function valueText(value: unknown): string { if (value === null || value === undefined || value === "") return "(empty)"; if (Array.isArray(value)) return value.map(valueText).join(", "); if (typeof value === "object") return JSON.stringify(value); return String(value); } const TITLE_FIELD = "subject"; function fence(text: string) { const longest = Math.max(2, ...Array.from(text.matchAll(/`+/g), (match) => match[0].length)); const marker = "`".repeat(longest + 1); return `${marker}text\n${text}\n${marker}`; } function issueContent(event: Extract<WebhookEvent, { type: "submission.created" }>) { const { form, fields, submission_id, truncated } = event.data; const subject = fields[TITLE_FIELD] ?? fields.name ?? submission_id; const title = `${form.name}: ${valueText(subject)}`.replace(/\s+/g, " ").slice(0, 200); const sections: string[] = []; let length = 0; for (const [name, value] of Object.entries(fields)) { const section = `**${name.replace(/[^\w .-]/g, "")}**\n\n${fence(valueText(value))}`; length += section.length + 2; if (length > 60000) { sections.push("More fields didn't fit. Open the submission in Ikiform."); break; } sections.push(section); } if (truncated) sections.push("The submission was too large to include. Open it in Ikiform."); sections.push(`Ikiform submission \`${submission_id}\`, delivery \`${event.id}\``); return { title, body: sections.join("\n\n") }; } const ISSUE_CREATE = `mutation IssueCreate($input: IssueCreateInput!) { issueCreate(input: $input) { success issue { identifier url } } }`; interface LinearResult { data?: { issueCreate?: { success: boolean } }; errors?: { message: string; extensions?: { code?: string } }[]; } async function createIssue(event: WebhookEvent, apiKey: string, teamId: string) { if (event.type !== "submission.created") return new Response(null, { status: 204 }); const { title, body } = issueContent(event); const response = await fetch("https://api.linear.app/graphql", { method: "POST", headers: { authorization: apiKey, "content-type": "application/json" }, body: JSON.stringify({ query: ISSUE_CREATE, variables: { input: { teamId, title, description: body } } }), }); const result = (await response.json().catch(() => null)) as LinearResult | null; if (result?.errors?.some((error) => error.extensions?.code === "RATELIMITED")) { return new Response(null, { status: 429, headers: { "retry-after": "60" } }); } if (!response.ok) return new Response(null, { status: response.status, headers: response.headers }); if (!result?.data?.issueCreate?.success) return new Response(null, { status: 500 }); return new Response(null, { status: 201 }); } export default { async fetch(request: Request, env: Env) { if (request.method !== "POST") return new Response(null, { status: 405 }); const payload = await request.text(); let event: WebhookEvent; try { event = await verifyWebhook({ payload, headers: request.headers, secret: env.IKIFORM_WEBHOOK_SECRET }); } catch (error) { if (error instanceof WebhookVerificationError) return new Response(error.reason, { status: 400 }); throw error; } const response = await createIssue(event, env.LINEAR_API_KEY, env.LINEAR_TEAM_ID); if (response.status === 429) { const retryAfter = response.headers.get("retry-after") ?? "30"; return new Response("Linear rate limit", { status: 503, headers: { "retry-after": retryAfter } }); } if (!response.ok) return new Response(`Linear answered ${response.status}`, { status: 502 }); return new Response(null, { status: 204 }); }, };- Linear reports rate limits as HTTP
400withRATELIMITEDinerrors[].extensions.code, not as429. The relay turns that into a503withRetry-After: 60, so Ikiform waits and tries again. - GraphQL can answer
200with errors. The relay only answers2xxwhenissueCreate.successistrue. endpoint.testevents return204and create nothing.
- Linear reports rate limits as HTTP
Deploy it
Terminal mkdir ikiform-issues && cd ikiform-issues npm init -y npm install @ikiform/sdk npm install -D wranglerSave the Worker code as
src/index.ts, then set the route inwrangler.jsonc:wrangler.jsonc { "$schema": "node_modules/wrangler/config-schema.json", "name": "ikiform-issues", "main": "src/index.ts", "compatibility_date": "2026-10-01", "routes": [{ "pattern": "hooks.example.com", "custom_domain": true }] }Ikiform refusesworkers.devURLs, so the Worker needs a hostname on a domain you have on Cloudflare, likehooks.example.com. Thecustom_domainroute creates the DNS record and certificate for you on deploy.Terminal npx wrangler secret put IKIFORM_WEBHOOK_SECRET npx wrangler secret put LINEAR_API_KEY npx wrangler secret put LINEAR_TEAM_ID npx wrangler deployOn Next.js, add
@ikiform/sdk, save the route handler, and setIKIFORM_WEBHOOK_SECRET,LINEAR_API_KEYandLINEAR_TEAM_IDin your host's environment variables.
GitHub Issues
Create a fine-grained token
- In GitHub, open Settings → Developer settings → Personal access tokens → Fine-grained tokens and generate a new token.
- Under repository access, pick only the repository that should get the issues.
- Under repository permissions, set Issues to Read and write.
Set
GITHUB_REPOtoowner/repo, for exampleacme/website.Write the relay
src/index.tsimport { verifyWebhook, type WebhookEvent, WebhookVerificationError } from "@ikiform/sdk/webhooks"; interface Env { IKIFORM_WEBHOOK_SECRET: string; GITHUB_TOKEN: string; GITHUB_REPO: string; } function valueText(value: unknown): string { if (value === null || value === undefined || value === "") return "(empty)"; if (Array.isArray(value)) return value.map(valueText).join(", "); if (typeof value === "object") return JSON.stringify(value); return String(value); } const TITLE_FIELD = "subject"; function fence(text: string) { const longest = Math.max(2, ...Array.from(text.matchAll(/`+/g), (match) => match[0].length)); const marker = "`".repeat(longest + 1); return `${marker}text\n${text}\n${marker}`; } function issueContent(event: Extract<WebhookEvent, { type: "submission.created" }>) { const { form, fields, submission_id, truncated } = event.data; const subject = fields[TITLE_FIELD] ?? fields.name ?? submission_id; const title = `${form.name}: ${valueText(subject)}`.replace(/\s+/g, " ").slice(0, 200); const sections: string[] = []; let length = 0; for (const [name, value] of Object.entries(fields)) { const section = `**${name.replace(/[^\w .-]/g, "")}**\n\n${fence(valueText(value))}`; length += section.length + 2; if (length > 60000) { sections.push("More fields didn't fit. Open the submission in Ikiform."); break; } sections.push(section); } if (truncated) sections.push("The submission was too large to include. Open it in Ikiform."); sections.push(`Ikiform submission \`${submission_id}\`, delivery \`${event.id}\``); return { title, body: sections.join("\n\n") }; } async function createIssue(event: WebhookEvent, token: string, repo: string) { if (event.type !== "submission.created") return new Response(null, { status: 204 }); const { title, body } = issueContent(event); return fetch(`https://api.github.com/repos/${repo}/issues`, { method: "POST", headers: { authorization: `Bearer ${token}`, accept: "application/vnd.github+json", "content-type": "application/json", "user-agent": "ikiform-issues-relay", "x-github-api-version": "2026-03-10", }, body: JSON.stringify({ title, body }), }); } export default { async fetch(request: Request, env: Env) { if (request.method !== "POST") return new Response(null, { status: 405 }); const payload = await request.text(); let event: WebhookEvent; try { event = await verifyWebhook({ payload, headers: request.headers, secret: env.IKIFORM_WEBHOOK_SECRET }); } catch (error) { if (error instanceof WebhookVerificationError) return new Response(error.reason, { status: 400 }); throw error; } const response = await createIssue(event, env.GITHUB_TOKEN, env.GITHUB_REPO); if (response.status === 429) { const retryAfter = response.headers.get("retry-after") ?? "30"; return new Response("GitHub rate limit", { status: 503, headers: { "retry-after": retryAfter } }); } if (!response.ok) return new Response(`GitHub answered ${response.status}`, { status: 502 }); return new Response(null, { status: 204 }); }, };- GitHub rejects requests without a
User-Agentheader, so the relay always sends one. - A new issue answers
201. A410means issues are turned off for the repository, and a422means GitHub refused the content. - Labels and assignees need push access, and GitHub drops them silently without it. That's why this relay sends only a title and a body. Add
labelsonce the token's account can push.
- GitHub rejects requests without a
Deploy it
Use the same project setup as for Linear, with GitHub's secrets:
Terminal npx wrangler secret put IKIFORM_WEBHOOK_SECRET npx wrangler secret put GITHUB_TOKEN npx wrangler secret put GITHUB_REPO npx wrangler deployOn Next.js, set
IKIFORM_WEBHOOK_SECRET,GITHUB_TOKENandGITHUB_REPOin your host's environment variables.
Connect Ikiform
Add the endpoint in Ikiform
- In the Ikiform dashboard, open Webhooks and choose Add endpoint.
- Paste your relay URL into URL.
- Under Forms, pick one form, or All forms in the workspace.
- Add a Description if you like, such as "Bug reports to Linear", then choose Add endpoint.
- Copy the signing secret. It starts with
whsec_and is shown in full only once.
There's no event picker. An endpoint gets
submission.createdfor every accepted submission on the forms you chose, andendpoint.testwhen you send a test. A workspace on Pro can have up to 3 endpoints.Add the secret to the relay
Set
IKIFORM_WEBHOOK_SECRETto thewhsec_secret. On Cloudflare runnpx wrangler secret put IKIFORM_WEBHOOK_SECRETagain. On other hosts, update the variable and redeploy.
Ikiform only delivers to public https:// URLs on port 443. IP addresses, localhost, internal hostnames, workers.dev and pages.dev are refused when you save the endpoint.
Test it
Open the endpoint in Ikiform and choose Send test. Ikiform sends one endpoint.test event with no retries, and the result shows up in the endpoint's delivery log within a few seconds. Then send a real submission from your form, or from a terminal:
curl https://ikiform.com/f/frm_xxxxxxxxxxxxxxxx \
-H "Content-Type: application/json" \
-d '{"name":"Ada","email":"ada@example.com","message":"Hello from curl"}'A 201 with "ok": true means Ikiform stored it. The delivery appears on the endpoint page, and the message lands in Linear or GitHub as a new issue.
The test event returns 204 from the relay and creates nothing.
How delivery works
| The receiver answers | Ikiform |
|---|---|
Any 2xx within 15 seconds | Marks the delivery succeeded |
| A redirect | Doesn't follow it, and counts a failure |
429 or 503 with Retry-After | Waits that long, up to the next step of the schedule |
410 Gone | Fails the delivery and disables the endpoint |
| Anything else, or no answer in 15 seconds | Retries |
Failed deliveries are retried 8 times over about 3 d 6 h, with the same webhook-id each time. If every delivery to an endpoint fails for 5 days, Ikiform disables it and emails the workspace owners.
- Linear accepts the request: the relay answers 204, and Ikiform marks the delivery succeeded.
- Linear is rate limited (400): the relay answers 503 with Retry-After (retry-after: 60), and Ikiform waits that long before it tries again.
- Linear answers with any other error: the relay answers 502, and Ikiform retries, 8 retries over about 3 d 6 h.
Duplicate issues
Ikiform retries when the relay doesn't answer 2xx in time. If the tracker created the issue but answered slowly, the retry creates a second one. It's rare, and every issue ends with the delivery id, so duplicates are easy to spot and close.
webhook-id before calling the API, for example in Workers KV, and answer 204 straight away when you've seen it. Receiving webhooks shows the pattern.Troubleshooting
| Problem | What to do |
|---|---|
400 no_matching_signature | The secret is wrong, or the body was parsed and re-serialized before verifying. Use the whsec_ secret of this endpoint and the raw body exactly as received. After Roll secret, update it within 24 hours. |
502 with Linear answered 400 | The API key or team ID is wrong. Personal keys go in Authorization without Bearer. Run the teams query above with the same key. |
502 with Linear answered 500 | Linear answered but issueCreate.success wasn't true. Log result.errors in the relay to see why. |
502 with GitHub answered 403 or 404 | The token can't write issues on this repository, or GITHUB_REPO is misspelled. Fine-grained tokens only see the repositories you picked. |
502 with GitHub answered 410 | Issues are turned off in the repository's settings. |
Delivery log shows timeout | Nothing answered within 15 seconds. Answer first and do slow work after, or make sure the tool responds right away. |
| Endpoint is disabled | Every delivery failed for 5 days, the URL answered 410, or its hostname started resolving to a private address. Fix the cause, then turn Enabled back on and Retry now the failed deliveries. |
| No delivery at all | Check that the endpoint covers this form, that it's enabled, and that the submission wasn't marked as spam or held because the workspace is over its monthly limit. |
Next steps
- Add a label or a priority: Linear's
issueCreatetakeslabelIdsandpriority, and GitHub takeslabels. - Send bug reports and feature requests to different teams with one endpoint per form.
- Tell the team in chat as well: see Send form submissions to Slack.
| Reference | Link |
|---|---|
| Linear GraphQL API | linear.app/developers |
| Linear rate limits | linear.app/developers |
| GitHub: create an issue | docs.github.com |
| GitHub: token permissions | docs.github.com |
| GitHub: API versions | docs.github.com |
Stuck on a step, or want a guide for another tool? Email hello@ikiform.com.