🎨canva-bulk-create
- プラグイン
- canva
- ソース
- GitHub で見る ↗
説明
ブランドテンプレートのオートフィルフィールドを使用して、表形式データからCanvaデザインを一括作成し、1行につき1つのデザインを生成します。 次のような場合に使用: ユーザーが「このCSVからデザインを一括作成して」「1行ごとにデザインを生成して」「各商品のデザインを作って」「テンプレートからまとめて生成して」「スプレッドシートからテンプレートにオートフィルして」などと言ったとき。 アップロードファイル、貼り付けたテーブル、JSON、URLなど、あらゆる表形式データソースに対応しています。
原文を表示
Bulk-create Canva designs from tabular data using a brand template with autofill fields, producing one design per row. Use when users say "bulk create designs from this CSV", "generate one design per row", "create a design for each product", "batch generate from a template", or "autofill a template from a spreadsheet". Accepts any tabular data source — uploaded files, pasted tables, JSON, or URLs.
ユースケース
- ✓表形式データからCanvaデザインを一括作成する
- ✓CSVやスプレッドシートから行ごとにデザインを生成する
- ✓複数の商品デザインをテンプレートから一括作成する
- ✓オートフィルを使ってテンプレートにデータを適用する
本文(日本語訳)
Canva 一括デザイン作成
データタグを使ってブランドテンプレートに自動入力し、データの1行につき1つのCanvaデザインを作成します。
ワークフロー
ステップ1: データを取得する
ユーザーが提供するあらゆる形式のデータを受け取り、列名付きの行リストとして抽出します:
- アップロードされたファイル: ファイルを読み込み、ヘッダーと行を抽出する
- 貼り付けられたデータ: チャットから直接、Markdownテーブル・タブ区切り値・JSON配列を解析する
- URL: リソースを取得し、レスポンスを表形式データとして解析する
データがまだ提供されていない場合は、ユーザーが都合のよい形式で共有するよう案内してください。
解析後、ユーザーに以下を表示します:
- 検出された列ヘッダー
- 行数(= 作成されるデザインの数)
- 最初の数行のプレビュー
ステップ2: ブランドテンプレートを選択する
ユーザーがテンプレートを指定していない場合は、自動入力対応のテンプレートを検索します:
Canva:search-brand-templates dataset=non_empty
結果を表示し、ユーザーに選択を求めます。すでにテンプレート名や説明が指定されている場合は、その内容でクエリを実行してください。
ステップ3: テンプレートスキーマを確認する
Canva:get-brand-template-dataset template_id=<selected_id>
このAPIは、テンプレートが必要とするフィールド名とフィールドタイプ(text・image・chart)を返します。
ステップ4: CSVの列をテンプレートフィールドにマッピングする
以下のようなマッピングテーブルをユーザーに提示します:
| テンプレートフィールド | タイプ | 対応するCSV列 | 備考 |
|---|---|---|---|
product_name |
text | Product Name |
自動マッチ |
price |
text | Price |
自動マッチ |
hero_image |
image | (なし) | 一致なし — imageフィールドにはアセットIDが必要 |
マッチングルール:
- CSVヘッダーとテンプレートフィールド名の間で、大文字・小文字を区別しないファジーマッチングを行う
- textフィールドはCSVの文字列値からそのまま入力できる
- imageフィールドにはCanvaアセットIDが必要 — 詳細は以下の「imageフィールドの処理」を参照
- chartフィールドは構造化データが必要な高度な処理のため、ユーザーに確認を求める
マッピングされていないフィールドや曖昧なマッチがある場合は特に注意し、処理を進める前にユーザーにマッピング内容を確認してください。
imageフィールドの処理
CSVからimageタイプのテンプレートフィールドに画像を提供する方法は2通りあります:
パターンA — CSVにCanvaアセットID列がある場合(例: image_asset_id):
アセットIDの値を autofill-design の呼び出しで直接使用します:
{ "image": { "type": "image", "asset_id": "<CSVの列から取得した値>" } }
パターンB — CSVに画像URL列がある場合(例: image_url):
URLを autofill-design に直接渡すことはできません。
まず Canva:upload-asset-from-url を使って各URLをCanvaにアップロードし、返されたアセットIDを取得してから autofill の呼び出しで使用します。
アップロードは該当行のデザイン作成直前に行い、エラーが発生しても他の行に影響しないようにしてください。
パターンC — CSVに画像列がない場合:
imageフィールドをスキップする(テンプレートのデフォルト画像を使用する)か、処理を中断するかをユーザーに確認します。
スキップは安全な選択肢です — data ペイロードからimageキーを省略するだけでかまいません。
ステップ5: 一括作成 — 1行につき1デザインを作成する
すべてのCSV行をループし、各行に対して Canva:autofill-design を呼び出します。
API にはレート制限がある可能性があり、逐次実行の方がデバッグも容易なため、すべてを同時に呼び出すのではなく、順番に1件ずつ呼び出してください。
各行の処理手順:
- 画像URL列がある場合(パターンB)、まず
Canva:upload-asset-from-urlを呼び出してCanvaアセットIDを取得する。 - 確定済みのフィールドマッピングをもとに
dataペイロードを構築する:
{
"text_field_name": { "type": "text", "text": "<CSVの値>" },
"image_field_name": { "type": "image", "asset_id": "<アセットID>" }
}
- テンプレートID・dataペイロード・行番号または意味のある列値を使った説明的なタイトル(例:
"Bulk Design - Row 3 - <識別子>")を指定してCanva:autofill-designを呼び出す。
処理中は以下のように結果を随時記録します:
Row 1 / 50: 作成完了 — <design_url>
Row 2 / 50: 作成完了 — <design_url>
Row 3 / 50: 失敗 — <error>
ステップ6: 結果を報告する
すべての行の処理が完了したら、以下を要約します:
- 処理を試みた行の合計数
- 成功した行(リンク付き)
- 失敗した行(行番号とエラー内容)
row・status・design_url・error の列を含むサマリーCSVの保存を提案します。
注意事項
- 自動入力機能にはCanva Enterpriseプランが必要です。
- 大量のCSV(50行以上)の場合は、N回のAPI呼び出しが発生し時間がかかる旨を事前にユーザーに警告してください。全件処理を開始する前に、最初の3行でテスト実行することを提案してください。
- 一部の行が失敗しても、残りの行の処理を続行してください — バッチ全体を中断しないでください。
- マッピングされたフィールドがすべて空の行はスキップし、ユーザーに警告してください。
- 必須のテンプレートフィールドに対応するCSV列が見つからない場合は、使用する列をユーザーに確認するか、そのフィールドをスキップするかどうかを確認してください。
- テンプレートフィールド名はAPI上で大文字・小文字が区別されます —
get-brand-template-datasetから取得したキーを正確に使用してください。 - 「一括作成の取り消し」機能はありません — 大規模な実行を開始する前にユーザーに警告してください。
- この方法で作成されたデザインは、ユーザーがアカウント内でさらに編集できる通常のCanvaデザインです。
原文(English)を表示
Canva Bulk Design Creation
Create one Canva design per row of data by autofilling a brand template with data tags.
Workflow
Step 1: Get the Data
Accept data in any form the user provides and extract a list of rows with named columns:
- Uploaded file: read the file and extract headers and rows
- Pasted data: parse markdown tables, tab-separated values, or JSON arrays directly from the chat
- URL: fetch the resource and parse the response as tabular data
If no data has been provided, ask the user to share it in whatever format is convenient for them.
Once parsed, show the user:
- Column headers found
- Number of rows (= number of designs that will be created)
- A preview of the first few rows
Step 2: Select the Brand Template
If the user hasn't specified a template, search for autofill-capable ones:
Canva:search-brand-templates dataset=non_empty
Show the results and ask the user to pick one. If they already named or described a template, search with that query.
Step 3: Inspect the Template Schema
Canva:get-brand-template-dataset template_id=<selected_id>
This returns the field names and types (text, image, chart) that the template expects.
Step 4: Map CSV Columns to Template Fields
Present a mapping table to the user:
| Template Field | Type | Matched CSV Column | Notes |
|---|---|---|---|
product_name |
text | Product Name |
auto-matched |
price |
text | Price |
auto-matched |
hero_image |
image | (none) | no match — image fields need asset IDs |
Matching rules:
- Do case-insensitive, fuzzy matching between CSV headers and template field names
- Text fields can be filled directly from CSV string values
- Image fields require a Canva asset ID — see Image Field Handling below
- Chart fields require structured data — treat as advanced and ask the user for clarification
Confirm the mapping with the user before proceeding, especially if there are unmapped fields or ambiguous matches.
Image Field Handling
There are two ways a CSV can supply images for image-type template fields:
Pattern A — CSV has a Canva asset ID column (e.g. image_asset_id):
Use the asset ID value directly in the autofill-design call:
{ "image": { "type": "image", "asset_id": "<value from CSV column>" } }
Pattern B — CSV has an image URL column (e.g. image_url):
URLs cannot be passed directly to autofill-design. Upload each URL to Canva first using Canva:upload-asset-from-url, capture the returned asset ID, then use it in the autofill call. Do the upload immediately before creating that row's design so failures stay localised.
Pattern C — No image column in CSV:
Ask the user whether to skip the image field (template default image stays) or abort. Skipping is safe — just omit the image key from the data payload entirely.
Step 5: Bulk Create — One Design per Row
Loop through every CSV row and call Canva:autofill-design for each one. Call them sequentially, not all at once — the API may have rate limits and sequential calls are easier to debug.
For each row:
- If the row has an image URL column (Pattern B), first call
Canva:upload-asset-from-urlto get a Canva asset ID. - Build the
datapayload from the confirmed field mapping:
{
"text_field_name": { "type": "text", "text": "<value from CSV>" },
"image_field_name": { "type": "image", "asset_id": "<asset ID>" }
}
- Call
Canva:autofill-designwith the template ID, data payload, and a descriptive title using the row number or a meaningful column value (e.g."Bulk Design - Row 3 - <identifier>").
Track results as you go:
Row 1 / 50: Created — <design_url>
Row 2 / 50: Created — <design_url>
Row 3 / 50: Failed — <error>
Step 6: Report Results
After all rows are processed, summarise:
- Total rows attempted
- Successes (with links)
- Failures (with row number and reason)
Offer to save a summary CSV with columns: row, status, design_url, error.
Notes
- Autofill requires a Canva Enterprise plan.
- For large CSVs (50+ rows), warn the user upfront that this will make N API calls and may take a while. Offer to do a test run on the first 3 rows before proceeding with the full batch.
- If some rows fail, continue with the rest — don't abort the whole batch.
- Skip rows where all mapped fields are empty and warn the user about them.
- If no CSV column matches a required template field, ask the user to confirm which column to use or whether to skip that field.
- Template field names are case-sensitive in the API — use the exact keys from
get-brand-template-dataset. - There is no "undo bulk create" — warn the user before starting large runs.
- Designs created this way are full Canva designs the user can further edit in their account.
原文・著作権は Anthropic および各プラグイン作者に帰属します。日本語訳は Claude API による自動翻訳です。