{
  "slug": "slim-notion-block-children-payload",
  "title": "Notion API Block Children Response Payload Slimming",
  "metaTitle": "Notion API Block Children Response - RealComposer",
  "metaDescription": "Notion api block children response payload slimming. Map only UI fields from Notion before Frontend / Web parses JSON. RealComposer edge vault and client t",
  "headline": "Field-level Notion projection at the edge",
  "category": "slimmer",
  "categoryLabel": "Payload Slimmer",
  "urgency": 8,
  "clientPlatform": "Frontend / Web",
  "upstreamServices": [
    "Notion"
  ],
  "searchIntentQuery": "notion api block children response payload slimming",
  "directAnswerSummary": "Notion responses include fields Frontend / Web never renders. Map id, status, and UI columns at the edge after calling https://api.notion.com/v1/databases/{{query.databaseId}}/query.",
  "problem": {
    "title": "Unmapped Notion fields waste bandwidth",
    "explanation": "Notion returns nested CRM, audit, and configuration objects. Frontend / Web parses them on the main thread even when the UI binds three fields.",
    "risks": [
      "Large arrays kept in memory after navigation",
      "Analytics showing poor LCP on API-heavy screens",
      "Developers shipping defensive null checks for unused paths"
    ]
  },
  "solutionSteps": [
    {
      "stepNumber": 1,
      "title": "Add vault secrets for this pipeline",
      "description": "Create NOTION_API_KEY vault entries, then bind them to this pipeline step headers with {{secrets.NAME}} placeholders."
    },
    {
      "stepNumber": 2,
      "title": "Configure upstream steps and output mapping",
      "description": "Use POST against https://api.notion.com/v1/databases/{{query.databaseId}}/query. Allowed origins on the client token should match post pipelines set cache ttl to 0 because realcomposer only stores get responses at the edge."
    },
    {
      "stepNumber": 3,
      "title": "Call from Frontend / Web",
      "description": "Allowed origins on the token should list every Frontend / Web host that calls this URL.",
      "codeSnippet": "const res = await fetch('https://realcomposer.com/v1/workspace/slim-notion-block-children-payload', {\n  headers: { Authorization: 'Bearer rc_live_your_token' }\n});"
    }
  ],
  "pipelineConfig": {
    "name": "Notion API Block Children Response Payload Slimming",
    "method": "POST",
    "cacheTtlSeconds": 0,
    "authMode": "client_token",
    "steps": [
      {
        "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": "pageId",
          "sourcePath": "results.0.id",
          "type": "string",
          "sourceStep": "notion"
        },
        {
          "targetPath": "title",
          "sourcePath": "results.0.properties.Name.title.0.plain_text",
          "type": "string",
          "sourceStep": "notion"
        }
      ]
    }
  },
  "sampleBloatedInput": {
    "requestId": "req_slim-not",
    "upstreamLatencyMs": 142,
    "audit": {
      "region": "edge",
      "trace": "slim-notion-block-children-payload"
    },
    "payload": {
      "id": "sample_id",
      "status": "active",
      "nested": {
        "tags": [
          "demo"
        ],
        "internal": true
      },
      "unused_blob": {
        "foo": "bar",
        "bar": "baz"
      }
    }
  },
  "sampleSlimmedOutput": {
    "pageId": "sample",
    "title": "sample"
  },
  "curlSnippet": "curl -X POST \"https://realcomposer.com/v1/workspace/slim-notion-block-children-payload\" \\\n  -H \"Authorization: Bearer rc_live_client_token\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"model\":\"example\"}'",
  "faqs": [
    {
      "question": "Is it safe to log Notion responses in Frontend / Web?",
      "answer": "Point Frontend / Web at /recipes/slim-notion-block-children-payload edge URL. RealComposer answers OPTIONS with Access-Control headers for allowed origins."
    },
    {
      "question": "Will Anthropic or Linear prompt bodies be rewritten?",
      "answer": "slim-notion-block-children-payload POST steps bypass caches.default even if cacheTtlSeconds is set in the dashboard."
    },
    {
      "question": "How do I rotate upstream credentials?",
      "answer": "Upstream steps in slim-notion-block-children-payload honor timeoutMs and optional fallback JSON without leaking secrets."
    }
  ],
  "relatedRecipeSlugs": [
    "secure-api-proxy-bubble-io",
    "stale-while-revalidate-third-party-api",
    "merge-plaid-accounts-and-transactions"
  ],
  "updatedAt": "2026-11-20",
  "links": {
    "page": "https://realcomposer.com/recipes/slim-notion-block-children-payload",
    "markdown": "https://realcomposer.com/recipes/slim-notion-block-children-payload.md",
    "json": "https://realcomposer.com/recipes/slim-notion-block-children-payload.json",
    "install": "https://realcomposer.com/dashboard/pipelines/new?recipe=slim-notion-block-children-payload&via=agent"
  }
}