Duplicating simple video ads, but changing a video

20 mins to complete

In this tutorial, you will learn how to create single-video ads from scratch via Facebook API but change the video. 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 video is located. Choose mp4 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 Video 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_video_id to value.
  1. Add 2 replace patches with the following value:
  • path: /video_data/video_id value: {{input.value/id}}
  • path: /video_data/image_url value: {{input.value/context/thumbnail/uri}}
  1. Add 1 remove patch with the following value:
  • path: /video_data/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