Duplicating simple image ads, but changing an image

15 mins to complete

In this tutorial, you will learn how to create single-image ads from scratch via Facebook API but change the image. Complete this tutorial before starting.

Notion image

Video Tutorial

Instructions

  1. Complete this tutorial before starting.
  1. Add Select Google File ID node. Choose a parent_folder_id in which your image is located. Choose jpeg as mimes_type. Choose the file_id which you want to use for your new ad.
  1. Add Extract node. Connect file_id to data. Insert /id pointer.
  1. Add Replace String node. Choose Any schema. Input {id} regex. Connect data (Extract) to value. Insert the following string into data:
https://drive.google.com/uc?export=download&id={id}
  1. Add Create Facebook Ad Image V3 node. Connect ad_account_id sockets. Connect data (Replace String) to url. Insert the name of the file.
  1. Add Extract node. Connect ad_creative (Fetch Facebook Ad Creative) to data. Insert /object_story_spec as a pointer.
  1. Add Patch JSON node. Connect data (Extract) to data. Connect ad_image_id to value.
  1. Add 1 replace patch with the following value:
  • path: /link_data/image_hash value: {{input.value/context/image/hash}}
  1. Add Input Any node. Insert the following JSON template:
{
    "account_id": "",
    "adset_id": "",
    "creative": {
        "object_story_spec": ""
    },
    "name": "",
    "conversion_domain": "",
    "tracking_specs": ""
}
  1. Add Patch JSON node. Connect any to data. Connect data (Patch JSON) to value.
  1. Add 1 replace patch with the following value:
  • path: /creative/object_story_spec value: {{input.value}}
  1. Add Patch JSON node. Connect data 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}}
  1. Add Create Facebook Ad node. Connect data sockets.
Did this answer your question?
😞
😐
🤩

Last updated on August 6, 2021