Skip to content

Dynamic Adset Creation

Create ads that automatically find or create the right adset for you. Perfect for batch creative testing, A/B testing workflows, and building multiple ads into organized adsets without manual setup.

What Is Dynamic Adset Creation?

Instead of manually creating adsets in Meta Ads Manager before building your ads, you can specify an adset name and let Pablo handle the rest. Pablo will:

  1. Search for an existing adset with that name
  2. Reuse it if found
  3. Create a new one from a template if not found

This is especially powerful when building multiple ads that should be grouped together - the first ad creates the adset, and subsequent ads automatically find and use it.

Quick Setup

Instead of providing destination_adset_id, use these two fields:

Field Value Required
destination_adset_name Name of the adset to find/create Yes
destination_template_adset_id Adset ID to copy settings from Yes

Example:

{
  "ad_name": "Hero Image A - Testing",
  "ad_headline": "50% Off Everything",
  "ad_body": "Limited time offer...",
  "destination_ad_account_id": "123456789",
  "destination_adset_name": "Testing Batch 2025-W08",
  "destination_template_adset_id": "987654321",
  "destination_template_ad_id": "555666777",
  "..."
}

See Field Schema for full field details.

How It Works

First Ad in the Batch

When Pablo processes your first ad:

  1. Searches Meta for an adset named "Testing Batch 2025-W08" in account 123456789 — the match is exact (a name differing by case or stray whitespace counts as a different adset)
  2. Finds nothing (adset doesn't exist yet)
  3. Since the adset doesn't exist, Pablo creates it:
    1. Fetches properties from template adset 987654321:
      • Campaign ID
      • Targeting settings (audience, locations, demographics)
      • Budget (daily or lifetime)
      • Optimization goal and billing event
      • Status (usually PAUSED)
    2. Creates a new adset with name "Testing Batch 2025-W08" and the copied properties
    3. Builds your ad into the newly created adset

Subsequent Ads in the Batch

When Pablo processes additional ads with the same destination_adset_name:

  1. Searches Meta for "Testing Batch 2025-W08"
  2. Finds the adset created by the first ad
  3. Builds the ad directly into the existing adset
  4. No duplicate adsets created

This works even if multiple ads are submitted simultaneously - Pablo uses workflow-level locking to ensure only one adset is created.

Creative Testing

Build multiple ads organized into batches for testing different variations:

  • Separate batches across weeks or testing periods
  • Different angles or hooks for the same product or message
  • Different creators or partnership collaborations
  • Different geographies or language variants

Example:

ad_name destination_adset_name destination_template_adset_id
Founder Story - Variant 1 Founder Story 987654321
Founder Story - Variant 2 Founder Story 987654321
Founder Story - Variant 3 Founder Story 987654321
Founder Story - Variant 4 Founder Story 987654321
Founder Story - Variant 5 Founder Story 987654321
Ugly Ads - Variant 1 Ugly Ads 987654321
Ugly Ads - Variant 2 Ugly Ads 987654321
Ugly Ads - Variant 3 Ugly Ads 987654321
Ugly Ads - Variant 4 Ugly Ads 987654321
Ugly Ads - Variant 5 Ugly Ads 987654321

Result: 2 adsets created - "Founder Story" with 5 ads - "Ugly Ads" with 5 ads

Template Adset Requirements

The template adset must:

  • Exist in the same ad account
  • Be accessible to your Meta connection
  • Have the settings you want (targeting, budget, optimization goal)

Choose your template carefully. The template adset's settings are copied to every new adset created. Make sure the template has the right:

  • Campaign (new adsets stay in the same campaign)
  • Targeting (audience, locations, demographics, interests)
  • Budget (daily or lifetime budget amount)
  • Optimization goal (e.g., link clicks, conversions, reach)

Not copied: Start/end dates (avoids "end time in the past" errors)

Properties Copied from Template

When creating a new adset, Pablo copies these properties:

Property Description
campaign_id Keeps the adset in the same campaign
optimization_goal What Meta optimizes for (clicks, conversions, etc.)
billing_event What you're charged for (impressions, clicks, etc.)
bid_strategy Lowest cost, cost cap, bid cap, etc.
bid_amount Bid amount if using bid cap/cost cap
daily_budget Daily budget (if template uses daily)
lifetime_budget Lifetime budget (if template uses lifetime)
targeting Complete targeting spec (audiences, locations, interests, etc.)
promoted_object Pixel ID, app ID, or other promoted object
attribution_spec Attribution window settings
destination_type Website, app, messenger, etc.
is_dynamic_creative Whether the adset is a Dynamic Creative adset
status Adset status (usually PAUSED)

Note on Dynamic Creative templates: because is_dynamic_creative is copied, cloning a Dynamic Creative template adset produces a Dynamic Creative adset — which constrains what creatives can live in it. Use a standard template adset unless you specifically want DCO.

Intentionally excluded:

  • start_time / end_time - Avoids "end time in the past" errors
  • name - Uses your specified destination_adset_name instead

Fallback to Direct ID

If you provide both destination_adset_id AND destination_adset_name, the ID takes precedence and the name is not used for resolution.

One validation caveat: whenever destination_adset_name is filled in, destination_template_adset_id is still required — even if the direct ID wins. So when using one database for both workflows, either keep the template ID column populated, or clear the name when providing a direct ID.

  • Leave ID empty → Uses dynamic creation with name + template
  • Fill in ID (name cleared, or template still present) → Uses the direct ID

Concurrent Builds

Dynamic adset creation is designed for simultaneous submissions. If you submit a batch of ads at once with the same destination_adset_name:

  • No duplicate adsets are created — resolution goes through a single deterministic workflow per adset name
  • Ads that lose the race retry automatically (up to 5 attempts with backoff) and then join the created adset

Under extreme contention a build can exhaust its retries and fail with a "Failed to resolve adset after 5 attempts" error rather than joining — re-run it and it will find the (by then existing) adset. This is handled with Temporal workflow-level locking — you don't need to do anything special.

Troubleshooting

"Failed to resolve adset ... after 5 attempts"

Cause: Contention — many simultaneous builds competed for the same adset name and this one exhausted its retries. (A bad or inaccessible template adset fails immediately with a different error, e.g. "Template adset has no campaign_id".)

Fix: Re-run the failed build — the adset exists by now and it will be found. If it recurs, stagger very large batches.

"Template adset has no campaign_id" or immediate template errors

Cause: The template adset ID doesn't exist or your Meta connection can't access it.

Fix: Verify the template adset ID exists in the specified ad account and is accessible to your Meta connection.

Multiple adsets created with the same name

Cause: This should never happen with dynamic adset creation. If you see duplicates, they were likely created outside of Pablo (e.g., manually in Ads Manager).

Fix: Use direct destination_adset_id for ads targeting existing manually-created adsets, or delete the duplicates and let Pablo recreate from scratch.

Ads going into wrong campaign

Cause: The template adset is in a different campaign than you expected. New adsets inherit the template's campaign.

Fix: Use a template adset from the campaign you want, or manually move the adset after creation.