{"id":802,"date":"2025-12-14T19:56:08","date_gmt":"2025-12-14T10:56:08","guid":{"rendered":"https:\/\/cg-method.com\/figma\/?p=802"},"modified":"2026-10-03T18:29:45","modified_gmt":"2026-10-03T09:29:45","slug":"figma-sheet","status":"publish","type":"post","link":"https:\/\/cg-method.com\/figma\/figma-sheet\/","title":{"rendered":"Figma\u306e\u60c5\u5831\u3092Google\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u306b\u51fa\u529b\u3059\u308b\u65b9\u6cd5\uff5cGAS\u30fbREST API\u30fb\u30bb\u30af\u30b7\u30e7\u30f3\u6307\u5b9a"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Figma\u306e\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3084\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u4e00\u89a7\u306b\u3059\u308b\u306b\u306f\u3001REST API\u3067\u30d5\u30a1\u30a4\u30eb\u306e\u30ce\u30fc\u30c9\u3092\u53d6\u5f97\u3057\u3001Google Apps Script\uff08GAS\uff09\u3067\u884c\u30c7\u30fc\u30bf\u3078\u5909\u63db\u3057\u307e\u3059\u3002\u540d\u524d\u3001node ID\u3001\u90e8\u54c1\u306e\u30ad\u30fc\u3001\u6587\u5b57\u60c5\u5831\u3092\u4e26\u3079\u308c\u3070\u3001\u30c7\u30b6\u30a4\u30f3\u306e\u68da\u5378\u3057\u306b\u4f7f\u3048\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u6700\u521d\u306f\u5c0f\u3055\u306a\u30d5\u30a1\u30a4\u30eb\u304b\u3001\u7279\u5b9a\u306e\u30bb\u30af\u30b7\u30e7\u30f3\u3092\u5bfe\u8c61\u306b\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u30d5\u30a1\u30a4\u30eb\u5168\u4f53\u306e\u53d6\u5f97\u306f\u30c7\u30fc\u30bf\u91cf\u3068API\u306e\u5236\u9650\u306b\u5f71\u97ff\u3055\u308c\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3067\u306f\u3001\u5916\u90e8\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u4f7f\u308f\u305a\u306b\u53d6\u5f97\u3059\u308b\u4f8b\u3068\u3001\u5f93\u6765\u306eFigmaSheet\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u4f7f\u3046\u4f8b\u3092\u5206\u3051\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u7528\u610f\u3059\u308b\u3082\u306e\u3068\u53d6\u5f97\u3067\u304d\u308b\u7bc4\u56f2<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th scope=\"col\">\u7528\u610f\u3059\u308b\u3082\u306e<\/th><th scope=\"col\">\u7528\u9014<\/th><\/tr><\/thead><tbody><tr><td>Google\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u3068\u7de8\u96c6\u6a29\u9650<\/td><td>\u4e00\u89a7\u306e\u51fa\u529b\u5148<\/td><\/tr><tr><td>\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u306b\u7d10\u3065\u304fGAS<\/td><td>API\u306e\u547c\u3073\u51fa\u3057\u3068\u884c\u306e\u751f\u6210<\/td><\/tr><tr><td>Figma\u306ePAT<\/td><td><code>file_content:read<\/code>\u3067\u30d5\u30a1\u30a4\u30eb\u5185\u5bb9\u3092\u53d6\u5f97<\/td><\/tr><tr><td>\u30d5\u30a1\u30a4\u30eb\u30ad\u30fc<\/td><td><code>\/design\/\u30d5\u30a1\u30a4\u30eb\u30ad\u30fc\/<\/code>\u306e\u90e8\u5206<\/td><\/tr><tr><td>\u30bb\u30af\u30b7\u30e7\u30f3\u7b49\u306enode ID\uff08\u4efb\u610f\uff09<\/td><td>\u53d6\u5f97\u7bc4\u56f2\u3092\u7d5e\u308b<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">REST API\u306e\u30ce\u30fc\u30c9\u60c5\u5831\u306f\u3001\u30c7\u30b6\u30a4\u30f3\u306e\u898b\u305f\u76ee\u3092\u305d\u306e\u307e\u307e\u8868\u3078\u79fb\u3059\u6a5f\u80fd\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u30ed\u30fc\u30ab\u30eb\u306ePlugin API\u3068\u53d6\u5f97\u3067\u304d\u308b\u60c5\u5831\u304c\u7570\u306a\u308a\u3001\u53c2\u7167\u5148\u90e8\u54c1\u306e\u60c5\u5831\u304c\u5e38\u306b\u3059\u3079\u3066\u5165\u308b\u3068\u3082\u9650\u308a\u307e\u305b\u3093\u3002<a href=\"https:\/\/cg-method.com\/figma\/figma-rest-api-plugin-api-data-list\/\">REST API\u3068Plugin API\u306e\u9055\u3044<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u6b21\u306e\u753b\u50cf\u306f\u65e7FigmaSheet\u5b9f\u88c5\u306b\u3088\u308b2025\u5e7412\u6708\u306e\u51fa\u529b\u4f8b\u3067\u3059\u3002\u5f8c\u8ff0\u306e\u72ec\u7acb\u3057\u305fGAS\u4f8b\u3092\u65b0\u305f\u306b\u5b9f\u884c\u3057\u305f\u753b\u9762\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-style-border\"><img decoding=\"async\" width=\"1013\" height=\"420\" src=\"https:\/\/cg-method.com\/figma\/wp-content\/uploads\/2025\/12\/2025-12-14_18h48_35.png\" alt=\"\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u5b9f\u884c\u3057\u3066\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u306b\u51fa\u529b\u3055\u308c\u305fFigma\u306e\u60c5\u5831\u4e00\u89a7\u3002\" class=\"wp-image-808\" srcset=\"https:\/\/cg-method.com\/figma\/wp-content\/uploads\/2025\/12\/2025-12-14_18h48_35.png 1013w, https:\/\/cg-method.com\/figma\/wp-content\/uploads\/2025\/12\/2025-12-14_18h48_35-300x124.png 300w, https:\/\/cg-method.com\/figma\/wp-content\/uploads\/2025\/12\/2025-12-14_18h48_35-768x318.png 768w\" sizes=\"(max-width: 1013px) 100vw, 1013px\" \/><figcaption class=\"wp-element-caption\">2025\u5e7412\u6708\u306e\u65e7\u753b\u9762\u30fb\u65e7\u7248\u306e\u53c2\u8003\u753b\u50cf\u3002\u73fe\u5728\u306eUI\u3084\u6539\u7a3f\u30b3\u30fc\u30c9\u306e\u5b9f\u884c\u7d50\u679c\u3068\u306f\u533a\u5225\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">PAT\u3068\u30d5\u30a1\u30a4\u30eb\u30ad\u30fc\u3092\u8a2d\u5b9a\u3059\u308b<\/h2>\n\n\n\n<ol><li>\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u306e\u62e1\u5f35\u6a5f\u80fd \u2192 Apps Script\u3092\u958b\u304d\u307e\u3059\u3002<\/li><li>\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u8a2d\u5b9a\u3067\u30b9\u30af\u30ea\u30d7\u30c8\u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002<\/li><li><code>FIGMA_TOKEN<\/code>\u306bPAT\u3001<code>FIGMA_FILE_KEY<\/code>\u306b\u30d5\u30a1\u30a4\u30eb\u30ad\u30fc\u3092\u4fdd\u5b58\u3057\u307e\u3059\u3002<\/li><li>\u7bc4\u56f2\u3092\u7d5e\u308b\u5834\u5408\u306f<code>FIGMA_NODE_IDS<\/code>\u306b<code>123:456,789:1011<\/code>\u306e\u3088\u3046\u306anode ID\u3092\u4fdd\u5b58\u3057\u307e\u3059\u3002<\/li><\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">PAT\u306e\u4f5c\u6210\u306f<a href=\"https:\/\/cg-method.com\/figma\/figma-personal-access-token\/\">\u500b\u4eba\u30a2\u30af\u30bb\u30b9\u30c8\u30fc\u30af\u30f3\u306e\u53d6\u5f97\u3068\u30b9\u30b3\u30fc\u30d7<\/a>\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u30d7\u30ed\u30d1\u30c6\u30a3\u306b\u306f\u30c8\u30fc\u30af\u30f3\u3092\u7f6e\u304d\u3001\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u3084\u5b9f\u884c\u30ed\u30b0\u3078\u5024\u3092\u8a18\u8f09\u3057\u307e\u305b\u3093\u3002\u30b9\u30af\u30ea\u30d7\u30c8\u30d7\u30ed\u30d1\u30c6\u30a3\u306f\u540c\u3058\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u30b3\u30fc\u30c9\u304b\u3089\u8aad\u307f\u53d6\u308c\u308b\u305f\u3081\u3001\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u7de8\u96c6\u3067\u304d\u308b\u4eba\u3082\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">node ID\u306fAPI\u7528\u306e<code>123:456<\/code>\u5f62\u5f0f\u3092\u4f7f\u3044\u307e\u3059\u3002\u753b\u9762\u306e\u30ea\u30f3\u30af\u306b<code>node-id=123-456<\/code>\u3068\u3042\u308b\u5834\u5408\u306f\u533a\u5207\u308a\u3092\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u30b7\u30fc\u30c8\u3067\u6570\u5b57\u306e\u81ea\u52d5\u5909\u63db\u3092\u9632\u3050\u305f\u3081\u306e\u5148\u982d\u30a2\u30dd\u30b9\u30c8\u30ed\u30d5\u30a3\u306f\u3001API\u3078\u6e21\u3059ID\u306b\u306f\u4ed8\u3051\u307e\u305b\u3093\u3002<a href=\"https:\/\/developers.figma.com\/docs\/rest-api\/file-endpoints\/\">\u30d5\u30a1\u30a4\u30eb\u3068\u30ce\u30fc\u30c9\u306e\u53d6\u5f97\u4ed5\u69d8<\/a><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" width=\"836\" height=\"641\" alt=\"Google Apps Script\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u30d7\u30ed\u30d1\u30c6\u30a3\u306bFIGMA_TOKEN\u3092\u4fdd\u5b58\u3057\u305f\u65e7\u753b\u9762\u3002\u5024\u306f\u4f0f\u305b\u3089\u308c\u3066\u3044\u307e\u3059\u3002\" class=\"wp-image-812\" src=\"https:\/\/cg-method.com\/figma\/wp-content\/uploads\/2025\/12\/2025-12-14_19h40_23.png\" srcset=\"https:\/\/cg-method.com\/figma\/wp-content\/uploads\/2025\/12\/2025-12-14_19h40_23.png 836w, https:\/\/cg-method.com\/figma\/wp-content\/uploads\/2025\/12\/2025-12-14_19h40_23-300x230.png 300w, https:\/\/cg-method.com\/figma\/wp-content\/uploads\/2025\/12\/2025-12-14_19h40_23-768x589.png 768w\" sizes=\"(max-width: 836px) 100vw, 836px\" \/><figcaption class=\"wp-element-caption\">2025\u5e7412\u6708\u306eGAS\u8a2d\u5b9a\u753b\u9762\u3002\u6539\u7a3f\u3057\u305f\u30b3\u30fc\u30c9\u306e\u5b9f\u884c\u7d50\u679c\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">\u5916\u90e8\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u4f7f\u308f\u306a\u3044GAS\u306e\u6700\u5c0f\u4f8b<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u65b0\u3057\u3044\u30b7\u30fc\u30c8\u540d<code>Figma\u53d6\u5f97\u7d50\u679c<\/code>\u3078\u3001\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u30fb\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u30bb\u30c3\u30c8\u30fb\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u30fb\u30c6\u30ad\u30b9\u30c8\u3092\u51fa\u529b\u3057\u307e\u3059\u3002\u540c\u540d\u30b7\u30fc\u30c8\u304c\u3042\u308b\u5834\u5408\u306f\u3001\u53d6\u5f97\u3068\u89e3\u6790\u304c\u7d42\u308f\u3063\u3066\u304b\u3089\u5185\u5bb9\u3092\u66f4\u65b0\u3057\u307e\u3059\u3002\u65e2\u5b58\u306e\u696d\u52d9\u8868\u3068\u306f\u5225\u306e\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u3067\u8a66\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-js\" data-lang=\"JavaScript\"><code>function exportFigmaNodes() {\n  const props = PropertiesService.getScriptProperties();\n  const token = props.getProperty(&#x27;FIGMA_TOKEN&#x27;);\n  const fileKey = props.getProperty(&#x27;FIGMA_FILE_KEY&#x27;);\n  const ids = (props.getProperty(&#x27;FIGMA_NODE_IDS&#x27;) || &#x27;&#x27;)\n    .split(&#x27;,&#x27;).map(s =&gt; s.trim()).filter(Boolean);\n  if (!token || !fileKey) throw new Error(&#x27;\u30c8\u30fc\u30af\u30f3\u3068\u30d5\u30a1\u30a4\u30eb\u30ad\u30fc\u3092\u8a2d\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044&#x27;);\n  if (ids.some(id =&gt; !\/^\\d+:\\d+$\/.test(id))) {\n    throw new Error(&#x27;node ID\u306f123:456\u5f62\u5f0f\u3067\u6307\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044&#x27;);\n  }\n  const base = &#x27;https:\/\/api.figma.com\/v1\/files\/&#x27; + encodeURIComponent(fileKey);\n  const url = ids.length ? base + &#x27;\/nodes?ids=&#x27; +\n    encodeURIComponent(ids.join(&#x27;,&#x27;)) : base;\n  const response = UrlFetchApp.fetch(url, {\n    headers: { &#x27;X-Figma-Token&#x27;: token }, muteHttpExceptions: true\n  });\n  const status = response.getResponseCode();\n  if (status !== 200) {\n    throw new Error(&#x27;Figma API HTTP &#x27; + status + &#x27;\u3002\u6a29\u9650\u30fb\u671f\u9650\u30fb\u5236\u9650\u3092\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044&#x27;);\n  }\n  const data = JSON.parse(response.getContentText());\n  const types = new Set([&#x27;INSTANCE&#x27;, &#x27;COMPONENT&#x27;, &#x27;COMPONENT_SET&#x27;, &#x27;TEXT&#x27;]);\n  const rows = [];\n  const seen = new Set();\n  const safeCell = value =&gt; {\n    const text = value == null ? &#x27;&#x27; : String(value);\n    return \/^[=+@\\-\\t\\r\\n]\/.test(text) ? &quot;&#x27;&quot; + text : text;\n  };\n  function walk(node, path, components) {\n    if (!node || seen.has(node.id)) return;\n    seen.add(node.id);\n    const nextPath = path.concat(node.name || node.id);\n    if (types.has(node.type)) {\n      const component = components[node.componentId || node.id] || {};\n      const bounds = node.absoluteBoundingBox || {};\n      rows.push([node.id, node.type, node.name, nextPath.join(&#x27; \/ &#x27;),\n        node.componentId || &#x27;&#x27;, component.key || &#x27;&#x27;, node.characters || &#x27;&#x27;,\n        bounds.width == null ? &#x27;&#x27; : bounds.width,\n        bounds.height == null ? &#x27;&#x27; : bounds.height].map(safeCell));\n    }\n    (node.children || []).forEach(child =&gt; walk(child, nextPath, components));\n  }\n  if (ids.length) {\n    ids.forEach(id =&gt; {\n      const item = data.nodes &amp;&amp; data.nodes[id];\n      if (!item || !item.document) throw new Error(&#x27;\u5bfe\u8c61node ID\u3092\u53d6\u5f97\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f&#x27;);\n      walk(item.document, [], item.components || {});\n    });\n  } else {\n    if (!data.document) throw new Error(&#x27;\u30d5\u30a1\u30a4\u30eb\u306edocument\u304c\u3042\u308a\u307e\u305b\u3093&#x27;);\n    walk(data.document, [], data.components || {});\n  }\n  const headers = [&#x27;nodeId&#x27;, &#x27;type&#x27;, &#x27;name&#x27;, &#x27;layerPath&#x27;, &#x27;componentId&#x27;,\n    &#x27;componentKey&#x27;, &#x27;characters&#x27;, &#x27;width&#x27;, &#x27;height&#x27;];\n  const sheetName = &#x27;Figma\u53d6\u5f97\u7d50\u679c&#x27;;\n  const book = SpreadsheetApp.getActiveSpreadsheet();\n  const sheet = book.getSheetByName(sheetName) || book.insertSheet(sheetName);\n  const values = [headers].concat(rows);\n  if (sheet.getMaxRows() &lt; values.length) {\n    sheet.insertRowsAfter(sheet.getMaxRows(), values.length - sheet.getMaxRows());\n  }\n  if (sheet.getMaxColumns() &lt; headers.length) {\n    sheet.insertColumnsAfter(sheet.getMaxColumns(), headers.length - sheet.getMaxColumns());\n  }\n  sheet.clearContents();\n  sheet.getRange(1, 1, values.length, headers.length).setValues(values);\n  sheet.setFrozenRows(1);\n  console.log(&#x27;\u51fa\u529b\u884c\u6570: &#x27; + rows.length);\n}<\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\"><code>exportFigmaNodes<\/code>\u3092\u5b9f\u884c\u3057\u3001\u521d\u56de\u306eGoogle\u5074\u306e\u627f\u8a8d\u3067\u30a2\u30af\u30bb\u30b9\u5185\u5bb9\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002\u51fa\u529b\u5148\u3001node ID\u3001\u5bfe\u8c61\u6570\u3092Figma\u5074\u3068\u7167\u5408\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u3053\u306e\u30b3\u30fc\u30c9\u306f\u516c\u5f0f\u306e\u5fdc\u7b54\u69cb\u9020\u306b\u57fa\u3065\u304f\u4f8b\u3067\u3059\u30022026\u5e7410\u67083\u65e5\u306eNode.js\u4e0a\u306e\u6a21\u64ec\u30c7\u30fc\u30bf\u3067\u3001\u90e8\u54c1\u306e\u30ad\u30fc\u3068\u5217\u306e\u751f\u6210\u3001\u6570\u5f0f\u3068\u3057\u3066\u6271\u308f\u308c\u308b\u6587\u5b57\u5217\u3078\u306e\u5bfe\u51e6\u3001429\u6642\u306b\u30b7\u30fc\u30c8\u3092\u66f8\u304d\u63db\u3048\u306a\u3044\u51e6\u7406\u3092\u78ba\u8a8d\u3057\u307e\u3057\u305f\u3002\u5b9fPAT\u3092\u4f7f\u3046\u63a5\u7d9a\u3084GAS\u4e0a\u306e\u5b9f\u884c\u306f\u672a\u691c\u8a3c\u3067\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u7279\u5b9a\u30bb\u30af\u30b7\u30e7\u30f3\u3092\u53d6\u5f97\u3057\u305f\u65e7\u5b9f\u88c5\u306e\u4f8b\u3067\u3059\u3002\u7bc4\u56f2\u6307\u5b9a\u306f\u3001\u30d5\u30a1\u30a4\u30eb\u5168\u4f53\u306e\u53d6\u5f97\u3088\u308a\u30c7\u30fc\u30bf\u91cf\u3092\u6291\u3048\u308b\u305f\u3081\u306b\u3082\u4f7f\u3048\u307e\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-style-border\"><img decoding=\"async\" width=\"1024\" height=\"231\" src=\"https:\/\/cg-method.com\/figma\/wp-content\/uploads\/2025\/12\/2025-12-14_18h48_22-1024x231.png\" alt=\"\u7279\u5b9a\u306e\u30bb\u30af\u30b7\u30e7\u30f3\u3092\u6307\u5b9a\u3057\u3066\u51fa\u529b\u3057\u305f\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u306e\u5b9f\u884c\u7d50\u679c\u3002\" class=\"wp-image-807\" srcset=\"https:\/\/cg-method.com\/figma\/wp-content\/uploads\/2025\/12\/2025-12-14_18h48_22-1024x231.png 1024w, https:\/\/cg-method.com\/figma\/wp-content\/uploads\/2025\/12\/2025-12-14_18h48_22-300x68.png 300w, https:\/\/cg-method.com\/figma\/wp-content\/uploads\/2025\/12\/2025-12-14_18h48_22-768x173.png 768w, https:\/\/cg-method.com\/figma\/wp-content\/uploads\/2025\/12\/2025-12-14_18h48_22.png 1154w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">2025\u5e7412\u6708\u306e\u65e7\u753b\u9762\u30fb\u65e7\u7248\u306e\u53c2\u8003\u753b\u50cf\u3002\u73fe\u5728\u306eUI\u3084\u6539\u7a3f\u30b3\u30fc\u30c9\u306e\u5b9f\u884c\u7d50\u679c\u3068\u306f\u533a\u5225\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">\u65e2\u5b58\u306eFigmaSheet\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u5229\u7528\u3059\u308b\u5834\u5408<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u5f93\u6765\u306e\u516c\u958b\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u4f7f\u3046\u5834\u5408\u306f\u3001Apps Script\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u8ffd\u52a0\u3067\u6b21\u306e\u30b9\u30af\u30ea\u30d7\u30c8ID\u3092\u6307\u5b9a\u3057\u3001\u8b58\u5225\u5b50\u3092<code>FigmaSheet<\/code>\u306b\u3057\u307e\u3059\u3002<code>FIGMA_TOKEN<\/code>\u306f\u8a8d\u8a3c\u60c5\u5831\u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u540d\u3067\u3042\u308a\u3001\u3053\u306e\u30e9\u30a4\u30d6\u30e9\u30eaID\u3068\u306f\u5225\u3067\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-text\" data-lang=\"text\"><code>1KjcblxtHtWAzr20-1Voztr0RTh-blaHx_BdLxsFuO0nT9CDdpGgsYCxF<\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u8ffd\u52a0\u753b\u9762\u3067\u5229\u7528\u3067\u304d\u308b\u7248\u3068\u95a2\u6570\u3092\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u73fe\u5728\u306e\u516c\u958b\u6a29\u9650\u30fb\u5229\u7528\u53ef\u80fd\u306a\u7248\u30fb\u5b9f\u88c5\u5168\u4f53\u306e\u6319\u52d5\u306f\u4eca\u56de\u518d\u691c\u8a3c\u3067\u304d\u3066\u3044\u307e\u305b\u3093\u3002\u30e9\u30a4\u30d6\u30e9\u30ea\u304c\u8868\u793a\u3055\u308c\u306a\u3044\u5834\u5408\u306f\u3001\u4e0a\u8a18\u306e\u72ec\u7acb\u3057\u305fGAS\u4f8b\u3067\u8a66\u305b\u307e\u3059\u3002<a href=\"https:\/\/developers.google.com\/apps-script\/guides\/libraries\">Google\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u8ffd\u52a0\u624b\u9806<\/a><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"416\" src=\"https:\/\/cg-method.com\/figma\/wp-content\/uploads\/2025\/12\/2025-12-14_18h59_25-1024x416.png\" alt=\"\u30b9\u30af\u30ea\u30d7\u30c8\u30a8\u30c7\u30a3\u30bf\u3067\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u8ffd\u52a0\u3057\u30b9\u30af\u30ea\u30d7\u30c8ID\u3084\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u8a2d\u5b9a\u3059\u308b\u753b\u9762\u3002\" class=\"wp-image-810\" srcset=\"https:\/\/cg-method.com\/figma\/wp-content\/uploads\/2025\/12\/2025-12-14_18h59_25-1024x416.png 1024w, https:\/\/cg-method.com\/figma\/wp-content\/uploads\/2025\/12\/2025-12-14_18h59_25-300x122.png 300w, https:\/\/cg-method.com\/figma\/wp-content\/uploads\/2025\/12\/2025-12-14_18h59_25-768x312.png 768w, https:\/\/cg-method.com\/figma\/wp-content\/uploads\/2025\/12\/2025-12-14_18h59_25.png 1201w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">2025\u5e7412\u6708\u306e\u65e7\u753b\u9762\u30fb\u65e7\u7248\u306e\u53c2\u8003\u753b\u50cf\u3002\u73fe\u5728\u306eUI\u3084\u6539\u7a3f\u30b3\u30fc\u30c9\u306e\u5b9f\u884c\u7d50\u679c\u3068\u306f\u533a\u5225\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u5f93\u6765\u306e\u547c\u3073\u51fa\u3057\u3067\u306f\u3001\u5168\u4f53\u53d6\u5f97\u3092<code>FigmaSheet.exportToSheet<\/code>\u3001\u7bc4\u56f2\u6307\u5b9a\u3092<code>FigmaSheet.exportSectionToSheet<\/code>\u3078\u6e21\u3057\u307e\u3059\u3002\u4ee5\u4e0b\u306f\u7bc4\u56f2\u6307\u5b9a\u306e\u5f62\u3067\u3059\u3002\u30d5\u30a1\u30a4\u30eb\u30ad\u30fc\u3068ID\u306f\u5229\u7528\u3059\u308b\u30d5\u30a1\u30a4\u30eb\u306e\u5024\u3078\u5909\u66f4\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-js\" data-lang=\"JavaScript\"><code>function runExportSection() {\n  const props = PropertiesService.getScriptProperties();\n  const token = props.getProperty(&#x27;FIGMA_TOKEN&#x27;);\n  const fileKey = props.getProperty(&#x27;FIGMA_FILE_KEY&#x27;);\n  const sectionIds = [&#x27;123:456&#x27;];\n  const result = FigmaSheet.exportSectionToSheet(fileKey, sectionIds, {\n    token: token,\n    sheetName: &#x27;Figma\u60c5\u5831\u4e00\u89a7&#x27;,\n    fields: [&#x27;nodeId&#x27;, &#x27;layerPath&#x27;, &#x27;componentKey&#x27;, &#x27;pageName&#x27;,\n      &#x27;instanceName&#x27;, &#x27;componentSetName&#x27;, &#x27;characters&#x27;],\n    nodeTypes: [&#x27;INSTANCE&#x27;, &#x27;COMPONENT&#x27;, &#x27;COMPONENT_SET&#x27;, &#x27;TEXT&#x27;]\n  });\n  console.log(result);\n}<\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u65e7\u5b9f\u88c5\u3067\u306f<code>mainComponent<\/code>\u3001\u30d0\u30ea\u30a2\u30f3\u30c8\u3001\u4f4d\u7f6e\u30fb\u5bf8\u6cd5\u3001\u5857\u308a\u3001\u7dda\u3001\u6587\u5b57\u30b9\u30bf\u30a4\u30eb\u306a\u3069\u306e\u5217\u3082\u6271\u3063\u3066\u3044\u307e\u3057\u305f\u3002\u3053\u308c\u306fFigmaSheet\u5074\u3067\u89e3\u6790\u3057\u3066\u3044\u308b\u9805\u76ee\u3067\u3001REST API\u306e\u540c\u540d\u30d7\u30ed\u30d1\u30c6\u30a3\u304c\u5fc5\u305a\u76f4\u63a5\u8fd4\u308b\u3068\u3044\u3046\u610f\u5473\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u4f7f\u3046\u7248\u306e\u5b9f\u88c5\u3068\u5bfe\u8c61\u30d5\u30a1\u30a4\u30eb\u3067\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-style-border\"><img decoding=\"async\" width=\"1024\" height=\"199\" src=\"https:\/\/cg-method.com\/figma\/wp-content\/uploads\/2025\/12\/2025-12-14_18h56_57-1024x199.png\" alt=\"\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u306e\u7a2e\u985e\u3084\u9805\u76ee\u306a\u3069\u306e\u6761\u4ef6\u3092\u7d30\u304b\u304f\u6307\u5b9a\u3057\u3066\u51fa\u529b\u3057\u305f\u4e00\u89a7\u3002\" class=\"wp-image-809\" srcset=\"https:\/\/cg-method.com\/figma\/wp-content\/uploads\/2025\/12\/2025-12-14_18h56_57-1024x199.png 1024w, https:\/\/cg-method.com\/figma\/wp-content\/uploads\/2025\/12\/2025-12-14_18h56_57-300x58.png 300w, https:\/\/cg-method.com\/figma\/wp-content\/uploads\/2025\/12\/2025-12-14_18h56_57-768x149.png 768w, https:\/\/cg-method.com\/figma\/wp-content\/uploads\/2025\/12\/2025-12-14_18h56_57.png 1426w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">2025\u5e7412\u6708\u306e\u65e7\u753b\u9762\u30fb\u65e7\u7248\u306e\u53c2\u8003\u753b\u50cf\u3002\u73fe\u5728\u306eUI\u3084\u6539\u7a3f\u30b3\u30fc\u30c9\u306e\u5b9f\u884c\u7d50\u679c\u3068\u306f\u533a\u5225\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">\u5927\u304d\u306a\u30d5\u30a1\u30a4\u30eb\u30fb\u30a8\u30e9\u30fc\u30fb\u5217\u306e\u4e0d\u8db3\u3078\u306e\u5bfe\u5fdc<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th scope=\"col\">\u72b6\u6cc1<\/th><th scope=\"col\">\u5bfe\u5fdc<\/th><\/tr><\/thead><tbody><tr><td>401\u30fb403<\/td><td>PAT\u306e\u671f\u9650\u3001Required scopes\u3001\u30d5\u30a1\u30a4\u30eb\u6a29\u9650\u3092\u78ba\u8a8d<\/td><\/tr><tr><td>429<\/td><td>\u518d\u5b9f\u884c\u3092\u6b62\u3081\u3001<code>Retry-After<\/code>\u3068Figma\u306e\u5236\u9650\u3092\u78ba\u8a8d<\/td><\/tr><tr><td>\u5fdc\u7b54\u304c\u5927\u304d\u3044\u30fb\u5b9f\u884c\u6642\u9593\u3092\u8d85\u3048\u308b<\/td><td>\u30bb\u30af\u30b7\u30e7\u30f3\u3092\u6307\u5b9a\u3057\u3001\u8907\u6570\u56de\u306b\u5206\u3051\u308b<\/td><\/tr><tr><td>\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u306e\u30ad\u30fc\u304c\u7a7a\u6b04<\/td><td>\u5fdc\u7b54\u306ecomponents\u60c5\u5831\u3068\u53c2\u7167\u5148\u306e\u6761\u4ef6\u3092\u78ba\u8a8d<\/td><\/tr><tr><td>\u4e00\u90e8\u306e\u6587\u5b57\u60c5\u5831\u304c\u4e0d\u8db3<\/td><td>REST\u3067\u53d6\u5f97\u3057\u305f\u6587\u5b57\u3068\u30b9\u30bf\u30a4\u30eb\u306e\u8868\u73fe\u3092\u78ba\u8a8d<\/td><\/tr><tr><td>Library\u306e\u95a2\u6570\u304c\u898b\u3064\u304b\u3089\u306a\u3044<\/td><td>\u8b58\u5225\u5b50\u3001\u5229\u7528\u7248\u3001\u516c\u958b\u6a29\u9650\u3092\u78ba\u8a8d<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">GAS\u306eURL Fetch\u306b\u306f\u5fdc\u7b54\u30b5\u30a4\u30ba\u3001\u5b9f\u884c\u6642\u9593\u3001\u65e5\u6b21\u547c\u3073\u51fa\u3057\u6570\u306a\u3069\u306e\u5236\u9650\u304c\u3042\u308a\u307e\u3059\u3002\u73fe\u5728\u306e\u516c\u5f0f\u8868\u3067\u306f\u5fdc\u7b54\u30b5\u30a4\u30ba\u306f1\u56de50MB\u3001\u901a\u5e38\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u5b9f\u884c\u306f1\u56de6\u5206\u3067\u3059\u3002Figma\u5074\u306e\u30ec\u30fc\u30c8\u5236\u9650\u3082\u4f75\u305b\u3066\u8a2d\u8a08\u3057\u3001\u518d\u53d6\u5f97\u524d\u306b\u30ad\u30e3\u30c3\u30b7\u30e5\u3084\u5909\u66f4\u6709\u7121\u3092\u691c\u8a0e\u3057\u3066\u304f\u3060\u3055\u3044\u3002<a href=\"https:\/\/developers.google.com\/apps-script\/guides\/services\/quotas\">GAS\u306e\u5236\u9650<\/a>\u3001<a href=\"https:\/\/developers.figma.com\/docs\/rest-api\/rate-limits\/\">Figma\u306e\u5236\u9650<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u65e7\u30e9\u30a4\u30d6\u30e9\u30ea\u306e\u8a2d\u8a08\u306f\u3001\u516c\u958b\u95a2\u6570\u3067\u8a8d\u8a3c\u30fb\u53d6\u5f97\u65b9\u6cd5\u30fb\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u7ba1\u7406\u3057\u3001API\u901a\u4fe1\u3001JSON\u89e3\u6790\u3001\u30b7\u30fc\u30c8\u66f8\u304d\u8fbc\u307f\u3092\u5206\u3051\u308b\u69cb\u6210\u3067\u3057\u305f\u3002<a href=\"https:\/\/github.com\/MOTOKI-LLC\/cg-method-code\/tree\/main\/figma\/figma-sheet\">\u65e2\u5b58\u306e\u547c\u3073\u51fa\u3057\u4f8b<\/a>\u3082\u6b8b\u3057\u3066\u3044\u307e\u3059\u3002GitHub\u306e\u30d5\u30a9\u30eb\u30c0\u30fc\u306f\u547c\u3073\u51fa\u3057\u4f8b\u3092\u63b2\u8f09\u3057\u305f\u3082\u306e\u3067\u3001\u516c\u958b\u30e9\u30a4\u30d6\u30e9\u30ea\u306e\u5b9f\u88c5\u5168\u4f53\u304c\u542b\u307e\u308c\u3066\u3044\u308b\u3068\u306f\u9650\u308a\u307e\u305b\u3093\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Figma\u4e0a\u3067\u5916\u90e8\u30b9\u30bf\u30a4\u30eb\u3092\u8abf\u3079\u308b\u5834\u5408\u306f<a href=\"https:\/\/cg-method.com\/figma\/figma-plugin-external-style-audit-csv\/\">Plugin API\u306b\u3088\u308bCSV\u62bd\u51fa<\/a>\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Figma\u306e\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3084\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u4e00\u89a7\u306b\u3059\u308b\u306b\u306f\u3001REST API\u3067\u30d5\u30a1\u30a4\u30eb\u306e\u30ce\u30fc\u30c9\u3092\u53d6\u5f97\u3057\u3001Google Apps Script\uff08GAS\uff09\u3067\u884c\u30c7\u30fc\u30bf\u3078\u5909\u63db\u3057\u307e\u3059\u3002\u540d\u524d\u3001node ID\u3001\u90e8\u54c1\u306e\u30ad\u30fc\u3001\u6587\u5b57\u60c5\u5831\u3092\u4e26\u3079 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":813,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"swell_btn_cv_data":"","book_review_data":"","footnotes":"","ssp_meta_title":"Figma\u306e\u60c5\u5831\u3092Google\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u306b\u51fa\u529b\u3059\u308b\u65b9\u6cd5\uff5cGAS\u30fbREST API\u30fb\u30bb\u30af\u30b7\u30e7\u30f3\u6307\u5b9a","ssp_meta_description":"Figma\u306e\u30ce\u30fc\u30c9\u60c5\u5831\u3092Google\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u306b\u51fa\u529b\u3059\u308bGAS\u4f8b\u3002PAT\u30fb\u30d5\u30a1\u30a4\u30eb\u30ad\u30fc\u30fbnode ID\u306e\u8a2d\u5b9a\u3001\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u306e\u5217\u3001\u7bc4\u56f2\u6307\u5b9a\u3001\u65e2\u5b58FigmaSheet\u30e9\u30a4\u30d6\u30e9\u30ea\u3068API\u5236\u9650\u3092\u89e3\u8aac\u3057\u307e\u3059\u3002"},"categories":[145],"tags":[],"class_list":["post-802","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-figma-tools"],"_links":{"self":[{"href":"https:\/\/cg-method.com\/figma\/wp-json\/wp\/v2\/posts\/802","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cg-method.com\/figma\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cg-method.com\/figma\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cg-method.com\/figma\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cg-method.com\/figma\/wp-json\/wp\/v2\/comments?post=802"}],"version-history":[{"count":14,"href":"https:\/\/cg-method.com\/figma\/wp-json\/wp\/v2\/posts\/802\/revisions"}],"predecessor-version":[{"id":22606,"href":"https:\/\/cg-method.com\/figma\/wp-json\/wp\/v2\/posts\/802\/revisions\/22606"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/cg-method.com\/figma\/wp-json\/wp\/v2\/media\/813"}],"wp:attachment":[{"href":"https:\/\/cg-method.com\/figma\/wp-json\/wp\/v2\/media?parent=802"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cg-method.com\/figma\/wp-json\/wp\/v2\/categories?post=802"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cg-method.com\/figma\/wp-json\/wp\/v2\/tags?post=802"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}