Duplicating original and modified ads

20 mins to complete

In this tutorial, you will learn how to create original or modified ads from scratch via Facebook API.

Notion image

Video Tutorial

Instructions

  1. Add Select Facebook Ad Account node. Choose your Facebook ad account.
  1. Add Select Facebook Ad id node. Connect ad_account_id sockets. Choose the ad that you want to duplicate.
  1. Add Fetch Facebook Ad node. Connect ad_id sockets.
  1. Add Input Any node. Copy-paste the template of a campaign object into it:
{
    "account_id": "",
    "adset_id": "",
    "creative": {
        "object_story_id": ""
    },
    "name": "",
    "conversion_domain": "",
    "tracking_specs": ""
}
  1. Add Fetch Facebook Ad Creative node.
  1. Add Extract node. Use /creative/id pointer.
  1. Add Parse string to id node. Choose Facebook Ad Creative Id schema.
  1. Connect result (Parse string to id) to ad_creative_id (Fetch Facebook Ad Creative)
  1. Add Patch JSON node. Connect ad (Fetch Facebook Ad) to value. Connect ad_creative to value.
  1. Add 1 replace patch with the following input:
    1. path: /creative value: {{input.value}}

  1. Add Patch JSON node. Connect data (Patch JSON) to data. Connect ad (Fetch Facebook Ad) to value.
  1. Add 5 replace patches with the following input:
  • path: /account_id value: {{input.value/account_id}}
  • path: /adset_id value: {{input.value/adset}}
  • path: /name value: {{input.value/name}}
  • path: /tracking_specs value: {{input.value/tracking_specs}}
  • path: /conversion_domain value: {{input.value/conversion_domain}}
  • path: /status value: {{input.value/status}}
  • path: /creative/object_story_id value: {{input.value/creative/effective_object_story_id}}
  1. Add Create Facebook Ad node.
  1. Connect data (Patch JSON) to data (Create Facebook Ad)
  1. If you want to change something in the campaign you are copying, use an additional Patch JSON node and Input Any for the value you want to change.
Did this answer your question?
😞
😐
🤩

Last updated on August 6, 2021