🔨

Convert regular ad into ad with post id

15 mins to complete

In this tutorial, you will learn how to create an ad from a post id. It’s helpful when you want to create a new ad, but keep the existing engagement of the creative.

image

Video Tutorial

Instructions

  1. Add Select Facebook Ad Id node.
  2. Add Select Facebook Ad Account Id node. Select your preferred Facebook Ad Account. Connect ad_account_id sockets. Select an ad_id which you want to transform into a post.
  3. Add Fetch Facebook Ad node. Connect ad_id sockets.
  4. Add Extract node. Connect ad (Fetch Facebook Ad) to data (Extract). Select /creative/id pointer.
  5. Add Parse string to id node. Connect data to value. Choose Ad Creative Id schema.
  6. Add Fetch Facebook Ad Creative node. Connect result to ad_creative. Take a look at the ad_creative socket. We would need effective_object_story_id to proceed with automation.
  7. Add Patch JSON node. Copy the following JSON into the data socket:
{
	"object_story_id": "",
	"url_tags": ""
}

This is the schema that we need to create an ad from a post id. Add 2 REPLACE patches with /object_story_id, /url_tags path and {{input.value/effective_story_object_id}}, {{input.value/url_tags}} values respectively.

  1. Add another Patch JSON node. Connect data (Patch JSON 1) to value (Patch JSON 2). Connect ad_id (Select Facebook Ad Id) to data (Patch JSON 2). Add 1 ADD patch with a path /creative and {{input.value}} as a value.
  2. Add Update Facebook Ad node. Connect data to ad.