Metaobjects guide
How to import metaobject entries into Shopify from a CSV
What you need
A metaobject definition already set up in Settings > Custom data > Metaobjects, and a spreadsheet with one row per entry.
- A handle column. The handle is how Shopify finds an entry: if it exists it is updated, if not it is created.
- One column per field, named with the field’s key (for example name or brand_color).
- Optional: a status column (ACTIVE or DRAFT) if your definition uses Active/Draft status.
Steps
- In the CSV bridge, copy the definitions query, run it in GraphiQL, and paste the result. The tool now knows every field and its type.
- Download the CSV template, fill it in, and drop it into the tool.
- Fix anything marked as an error. Each message names the line and column.
- Export your current entries first as a backup.
- Copy each batch into GraphiQL and run it, or download the script and run it with Shopify CLI.
- Paste the results back. Rows Shopify rejected are listed with the reason, and you can re-run just those.
What the mutation looks like
Each row becomes one aliased metaobjectUpsert. The alias (row2) is the CSV line number, so results map back to your spreadsheet. The tool uses the metaobject argument, which only changes the fields you send. Empty cells are left out, so they keep their current value.
mutation UpsertEntriesBatch1 {
row2: metaobjectUpsert(
handle: { type: "designer", handle: "gio-ponti" }
metaobject: {
fields: [
{ key: "name", value: "Gio Ponti" },
{ key: "materials", value: "[\"Wood\",\"Brass\"]" }
]
}
) {
metaobject { id handle }
userErrors { field message code }
}
}Limits to know
Batches hold 25 entries by default, well under Shopify’s per-request cost limit. File, product and metaobject reference fields need Shopify IDs; the tool can look them up from a handle, SKU or file name if you paste lookup data. Definitions owned by another app can’t be changed from the GraphiQL app.
More metaobject guides
- How to export Shopify metaobject entries to a CSV
- How to bulk edit metaobject entries in Shopify
- Metaobject field value formats: what to put in each CSV cell
- How to run metaobject queries and mutations in Shopify’s GraphiQL app
Based on Shopify’s metaobjectUpsert and data types docs (Admin API 2026-10). Not affiliated with, endorsed by, or sponsored by Shopify Inc. Shopify is a trademark of Shopify Inc.