{
  "slug": "merge-linear-with-notion-tasks",
  "title": "Merge linear issues with notion database tasks",
  "metaTitle": "Merge linear issues with notion - RealComposer",
  "metaDescription": "Merge linear issues with notion database tasks. Linear issues and Notion database rows returned as one. Merge Linear and Notion in one Frontend / Web.",
  "headline": "Engineering planner unified task feed",
  "category": "aggregation",
  "categoryLabel": "Multi-API Aggregation",
  "urgency": 9,
  "clientPlatform": "Frontend / Web",
  "upstreamServices": [
    "Linear",
    "Notion"
  ],
  "searchIntentQuery": "merge linear issues with notion database tasks",
  "directAnswerSummary": "Linear issues and Notion database rows returned as one timeline JSON. For \"merge linear issues with notion database tasks\", store LINEAR_API_KEY, NOTION_API_KEY in Secret Vault, call https://api.linear.app/graphql from a Worker, and let Frontend / Web hit only https://realcomposer.com/v1/workspace/merge-linear-with-notion-tasks with an rc_live_ client token. POST upstream calls are not stored in caches.default; clients must send JSON bodies and headers forward unchanged.",
  "problem": {
    "title": "Waterfall latency from multiple Linear and Notion requests",
    "explanation": "Frontend / Web widgets often await Linear and Notion sequentially, multiplying TLS handshakes on cellular networks and amplifying failure rates.",
    "risks": [
      "Race conditions between parallel manual fetches",
      "Higher mobile data usage from redundant JSON",
      "Timeouts when any upstream exceeds cellular RTT"
    ]
  },
  "solutionSteps": [
    {
      "stepNumber": 1,
      "title": "Bind vault keys to the Worker",
      "description": "Add LINEAR_API_KEY, NOTION_API_KEY to RealComposer Secret Vault. Values decrypt only inside the Cloudflare Worker that calls the upstream."
    },
    {
      "stepNumber": 2,
      "title": "Set headers, mapping, and cache TTL",
      "description": "Configure headersTemplate to inject vault secrets, target https://api.linear.app/graphql, and Add output mapping fields that mirror the JSON contract your screen already expects."
    },
    {
      "stepNumber": 3,
      "title": "Call from Frontend / Web",
      "description": "Authorize with Bearer rc_live_ and fetch the mapped JSON contract your UI already expects.",
      "codeSnippet": "const res = await fetch('https://realcomposer.com/v1/workspace/merge-linear-with-notion-tasks', {\n  headers: { Authorization: 'Bearer rc_live_your_token' }\n});"
    }
  ],
  "pipelineConfig": {
    "name": "Merge linear issues with notion database tasks",
    "method": "POST",
    "cacheTtlSeconds": 0,
    "authMode": "client_token",
    "steps": [
      {
        "stepKey": "linear",
        "upstreamUrlTemplate": "https://api.linear.app/graphql",
        "httpMethod": "POST",
        "headersTemplate": {
          "Authorization": "{{secrets.LINEAR_API_KEY}}",
          "Content-Type": "application/json"
        },
        "timeoutMs": 10000
      },
      {
        "stepKey": "notion",
        "upstreamUrlTemplate": "https://api.notion.com/v1/databases/{{query.databaseId}}/query",
        "httpMethod": "POST",
        "headersTemplate": {
          "Authorization": "Bearer {{secrets.NOTION_API_KEY}}",
          "Notion-Version": "2022-06-28",
          "Content-Type": "application/json"
        },
        "timeoutMs": 10000
      }
    ],
    "outputMapping": {
      "version": 1,
      "fields": [
        {
          "targetPath": "linear.issueId",
          "sourcePath": "data.issue.id",
          "type": "string",
          "sourceStep": "linear"
        },
        {
          "targetPath": "linear.title",
          "sourcePath": "data.issue.title",
          "type": "string",
          "sourceStep": "linear"
        },
        {
          "targetPath": "notion.pageId",
          "sourcePath": "results.0.id",
          "type": "string",
          "sourceStep": "notion"
        },
        {
          "targetPath": "notion.title",
          "sourcePath": "results.0.properties.Name.title.0.plain_text",
          "type": "string",
          "sourceStep": "notion"
        }
      ]
    }
  },
  "sampleBloatedInput": {
    "requestId": "req_merge-li",
    "upstreamLatencyMs": 142,
    "audit": {
      "region": "edge",
      "trace": "merge-linear-with-notion-tasks"
    },
    "payload": {
      "id": "sample_id",
      "status": "active",
      "nested": {
        "tags": [
          "demo"
        ],
        "internal": true
      },
      "unused_blob": {
        "foo": "bar",
        "bar": "baz"
      }
    }
  },
  "sampleSlimmedOutput": {
    "linear_issueId": "sample",
    "linear_title": "sample",
    "notion_pageId": "sample",
    "notion_title": "sample"
  },
  "curlSnippet": "curl -X POST \"https://realcomposer.com/v1/workspace/merge-linear-with-notion-tasks\" \\\n  -H \"Authorization: Bearer rc_live_client_token\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"model\":\"example\"}'",
  "faqs": [
    {
      "question": "Does Frontend / Web need CORS changes after adding RealComposer?",
      "answer": "Yes for merge-linear-with-notion-tasks. Ship only an rc_live_ client token in Frontend / Web; RealComposer injects LINEAR_API_KEY on https://api.linear.app/graphql."
    },
    {
      "question": "What cache key does RealComposer use?",
      "answer": "merge-linear-with-notion-tasks forwards client JSON to POST upstreams unchanged; secrets interpolate only in URLs and header templates."
    },
    {
      "question": "Can I restrict which domains call this pipeline?",
      "answer": "Rotate vault secrets for merge-linear-with-notion-tasks anytime; clients keep the same rc_live_ token."
    }
  ],
  "relatedRecipeSlugs": [
    "merge-linear-and-github-pr-api",
    "merge-notion-and-google-calendar"
  ],
  "updatedAt": "2026-11-20",
  "links": {
    "page": "https://realcomposer.com/recipes/merge-linear-with-notion-tasks",
    "markdown": "https://realcomposer.com/recipes/merge-linear-with-notion-tasks.md",
    "json": "https://realcomposer.com/recipes/merge-linear-with-notion-tasks.json",
    "install": "https://realcomposer.com/dashboard/pipelines/new?recipe=merge-linear-with-notion-tasks&via=agent"
  }
}