Skip to main content
Use the file-import adapter when a Launcher draft is easier to prepare in a spreadsheet than as MCP tool arguments. It accepts CSV and XLSX files and creates the same account-bound draft model as launcher.draft_batch.
Import creates a PlainRouter draft only. It does not write to Meta, evaluate the final execution gate, or activate spend.

Before you begin

You need:
  • A verified Launcher Drive connection whose inventory has already synced.
  • A Write or Admin workspace execution token.
  • Numeric source Meta ad set and ad IDs from the account bound to that token.
OAuth management credentials and Read-tier workspace tokens cannot import files.

Prepare the file

The first row must contain unique supported headers. drive_link is required. Example CSV:
For XLSX, PlainRouter reads the first visible worksheet.

Limits

Duplicate or unknown headers reject the file. Rows with an empty Drive link, an invalid shape, or an oversized cell are reported as syntactic failures. Valid rows can still create a partial draft.

Send the import

Submit a multipart request to:
Supported modes are:
  • duplicate_adset
  • duplicate_adset_per_media
  • add_to_adset
folder_to_adset defaults to false; grouping_enabled defaults to true.

Read the result

The response contains the draft batch, accepted and rejected items, frozen tier and capacity limits, import provenance, and syntactic_row_failures. PlainRouter resolves every Drive link against already-synced inventory in the token workspace. Unknown, stale, failed, removed, or cross-workspace assets appear in rejected_items as drive_asset_unresolved. The import provenance stores the file’s SHA-256 identity, format, row count, and import time. The privately staged upload is deleted after parsing, including when the import fails.

Errors

For direct structured input instead of a file, use launcher.draft_batch.