Facebook Bulk Ad Uploading
This set of recipes helps you to launch campaigns, adsets and ads from Google Sheets and Google Drive.
JSON Recipe
Import all automation recipes into your own account. Don’t know how? Learn here.
- Create ads from sheet: This is the main automation that will actually create campaigns, adsets and ads in your account.
{"name":"Upload Campaigns, Adsets, and Ads (incl. all ad formats available)","description":"bulk_create_ads_20230927","nodes":{"start_1":{"type":"start","title":"Start","description":"Starts an automation","logging_enabled":true,"error_rules":[],"x":41,"y":432},"stop_1":{"type":"stop","title":"Stop","description":"Stops an automation","logging_enabled":true,"error_rules":[],"x":1229,"y":933},"for_each_v2_1":{"type":"for_each_v2","title":"For Each","description":"Loops over elements in a list","logging_enabled":false,"error_rules":[],"x":509,"y":326,"inputs":{"next":{"title":"next","description":"Starts the next iteration"},"start":{"title":" start","description":"Starts the first iteration"}},"outputs":{"do":{"title":"do","description":"Triggers when there is a new item"},"item":{"title":"ad_row","description":"The current item of the iteration"}}},"patch_json_v2_1":{"type":"patch_json_v2","logging_enabled":false,"error_rules":[],"x":1429,"y":399,"group":"group_1","inputs":{"patches":{"export_enabled":true,"data":[{"op":"add","path":"/0","value":"{{input.value}}"}]},"data":{"title":"data","description":"The data the patches are applied to","export_enabled":true,"data":[]}}},"patch_json_v2_2":{"type":"patch_json_v2","logging_enabled":false,"error_rules":[],"x":1129,"y":392,"group":"group_1","inputs":{"patches":{"export_enabled":true,"data":[{"op":"remove","path":"/data"},{"op":"add","path":"/data/output","value":"{{input.value}}"},{"op":"add","path":"/data/config/ad_action","value":"{{input.value/status}}"}]}}},"unmap_table_rows_1":{"type":"unmap_table_rows","logging_enabled":false,"error_rules":[],"x":1734,"y":416,"group":"group_1","inputs":{"schema":{"export_enabled":true,"data":"any"}},"outputs":{"unmapped":{"title":"unmapped","description":"Triggered when mapped"}}},"data_relay_1":{"type":"data_relay","logging_enabled":false,"error_rules":[],"x":337,"y":685,"group":"group_2","inputs":{"data":{"title":"adset","description":"Data to relay"}}},"parse_string_to_id_1":{"type":"parse_string_to_id","logging_enabled":false,"error_rules":[],"x":1227,"y":249,"group":"group_3","inputs":{"schema":{"export_enabled":true,"data":"fb_adset_id"}}},"google_sheets_update_table_rows_v2_1":{"type":"google_sheets_update_table_rows_v2","logging_enabled":false,"error_rules":[],"x":2042,"y":437,"group":"group_1"},"data_relay_2":{"type":"data_relay","logging_enabled":false,"error_rules":[],"x":800,"y":155,"group":"group_1","inputs":{"data":{"title":"ad_row","description":"Data to relay"}}},"converge_1":{"type":"converge","logging_enabled":false,"error_rules":[],"x":789,"y":412,"group":"group_1"},"patch_json_v2_3":{"type":"patch_json_v2","logging_enabled":false,"error_rules":[],"x":456,"y":451,"group":"group_1","inputs":{"patch":{"title":"if_ad_error","description":"Starts the patching"},"value":{"title":"ad_error","description":"A value that can be used in patches"},"patches":{"export_enabled":true,"data":[{"op":"add","path":"/error","value":"{{input.value/data/error/message}} {{input.value/data/error/error_user_title}}"},{"op":"add","path":"/status","value":"Ad error"}]},"data":{"export_enabled":true,"data":{}}}},"patch_json_v2_4":{"type":"patch_json_v2","logging_enabled":false,"error_rules":[],"x":454,"y":746,"group":"group_1","inputs":{"patches":{"export_enabled":true,"data":[{"op":"add","path":"/error","value":"{{input.value/data/error/message}} {{input.value/data/error/error_user_title}}"},{"op":"add","path":"/status","value":"Adset error"}]},"value":{"title":"adset_error","description":"A value that can be used in patches"},"data":{"export_enabled":true,"data":{}},"patch":{"title":"if_adset_error","description":"Starts the patching"}}},"fb_fetch_ad_v2_1":{"type":"fb_fetch_ad_v2","logging_enabled":false,"error_rules":[],"x":103,"y":241,"group":"group_1","inputs":{"fetch":{"title":"fetch","description":"Starts fetching the ad"}}},"patch_json_v2_5":{"type":"patch_json_v2","logging_enabled":false,"error_rules":[],"x":449,"y":138,"group":"group_1","inputs":{"patches":{"export_enabled":true,"data":[{"op":"add","path":"/ad_id","value":"{{input.value/id}}"},{"op":"add","path":"/preview_link","value":"{{input.value/preview_shareable_link}}"},{"op":"add","path":"/ads_manager_link","value":" https://business.facebook.com/adsmanager/manage/ads?act={{input.value/account_id}}\u0026filter_set=SEARCH_BY_ADGROUP_IDS-STRING_SET%1EANY%1E[%22{{input.value/id}}%22]\u0026selected_ad_ids={{input.value/id}}"},{"op":"add","path":"/status","value":"done"},{"op":"add","path":"/error","value":" "}]},"data":{"export_enabled":true,"data":{}}},"outputs":{"data":{"title":"output","description":"The patched data"}}},"patch_json_v2_6":{"type":"patch_json_v2","logging_enabled":false,"error_rules":[],"x":455,"y":1026,"group":"group_1","inputs":{"patches":{"export_enabled":true,"data":[{"op":"add","path":"/error","value":"{{input.value/data/error/message}} {{input.value/data/error/error_user_title}}"},{"op":"add","path":"/status","value":"Campaign error"}]},"value":{"title":"campaign_error","description":"A value that can be used in patches"},"data":{"export_enabled":true,"data":{}},"patch":{"title":"if_campaign_error","description":"Starts the patching"}}},"if_v2_1":{"type":"if_v2","logging_enabled":false,"error_rules":[],"x":2598,"y":443,"group":"group_1","inputs":{"b":{"export_enabled":true,"data":["Adset error","Campaign error"]},"condition":{"export_enabled":true,"data":"in"}},"outputs":{"false":{"title":"updated","description":"Triggers when the evaluation is false"},"true":{"title":"abort_automation","description":"Triggers when the evaluation is true"}}},"extract_v2_1":{"type":"extract_v2","logging_enabled":false,"error_rules":[],"x":2303,"y":447,"group":"group_1","inputs":{"pointer":{"export_enabled":true,"data":"/error"}}},"filter_v2_1":{"type":"filter_v2","logging_enabled":false,"error_rules":[],"x":770,"y":322,"group":"group_4","inputs":{"filters":{"export_enabled":true,"data":[{"value":"create","pointer":"/data/config/ad_action","operator":"="},{"value":null,"pointer":"/data/output/ad_id","operator":"="},{"operator":"!=","pointer":"/data/config/adset_id","value":null},{"operator":"!=","pointer":"/data/config/ad_format","value":null}]}},"outputs":{"filtered":{"title":"filtered","description":"Triggered when filtered"}}},"replace_string_1":{"type":"replace_string","logging_enabled":false,"error_rules":[],"x":341,"y":313,"group":"group_5","inputs":{"regex":{"export_enabled":true,"data":"{}"},"pointer":{"export_enabled":true,"data":""},"schema":{"export_enabled":true,"data":"any"},"data":{"export_enabled":true,"data":"{}!A4:ZZ"}}},"patch_json_list_v2_1":{"type":"patch_json_list_v2","logging_enabled":false,"error_rules":[],"x":921,"y":292,"group":"group_5","inputs":{"patches":{"export_enabled":true,"data":[{"op":"remove","path":"/id/context/ui"}]},"value":{"export_enabled":true}}},"google_sheets_fetch_table_rows_v3_1":{"type":"google_sheets_fetch_table_rows_v3","logging_enabled":false,"error_rules":[],"x":635,"y":304,"group":"group_5","inputs":{"date_time_render_option":{"export_enabled":true,"data":"FORMATTED_STRING"},"value_render_option":{"export_enabled":true,"data":"FORMATTED_VALUE"},"dimension":{"export_enabled":true,"data":"ROWS"}}},"data_relay_3":{"type":"data_relay","logging_enabled":false,"error_rules":[],"x":407,"y":59,"group":"group_5"},"google_sheets_fetch_table_row_mapping_1":{"type":"google_sheets_fetch_table_row_mapping","logging_enabled":false,"error_rules":[],"x":1191,"y":305,"group":"group_5"},"data_relay_4":{"type":"data_relay","logging_enabled":false,"error_rules":[],"x":107,"y":668,"group":"group_5"},"google_sheets_select_spreadsheet_id_v2_1":{"type":"google_sheets_select_spreadsheet_id_v2","logging_enabled":false,"error_rules":[],"x":41,"y":111,"group":"group_5","inputs":{"spreadsheet_id":{"title":" spreadsheet_id","description":"The spreadsheet to fetch from"}}},"map_table_rows_1":{"type":"map_table_rows","logging_enabled":false,"error_rules":[],"x":1762,"y":332,"group":"group_5","inputs":{"schema":{"export_enabled":true,"data":"any"}}},"filter_v2_2":{"type":"filter_v2","logging_enabled":false,"error_rules":[],"x":1480,"y":315,"group":"group_5","inputs":{"filters":{"export_enabled":true,"data":[{"operator":"!=","pointer":"/columns/0","value":""}]}}},"extract_v2_2":{"type":"extract_v2","logging_enabled":false,"error_rules":[],"x":272,"y":289,"group":"group_6","inputs":{"pointer":{"export_enabled":true,"data":"/data"}},"outputs":{"data":{"title":"ad_to_be","description":"The extracted data"}}},"trigger_relay_1":{"type":"trigger_relay","logging_enabled":false,"error_rules":[],"x":16,"y":258,"group":"group_6"},"data_relay_5":{"type":"data_relay","logging_enabled":false,"error_rules":[],"x":11,"y":593,"group":"group_6","inputs":{"data":{"title":"ad_row","description":"Data to relay"}},"outputs":{"data":{"title":"ad_row","description":"Data to relay"}}},"trigger_relay_2":{"type":"trigger_relay","logging_enabled":false,"error_rules":[],"x":825,"y":710,"group":"group_6","outputs":{"relayed":{"title":"false","description":"Output trigger from relay"}}},"patch_json_v2_7":{"type":"patch_json_v2","title":"Do Nothing","description":"Apply JSON patches against data","logging_enabled":false,"max_job_retries":6,"timeout":30,"error_rules":[],"x":2213,"y":524,"group":"group_6","inputs":{"patches":{"export_enabled":true,"data":[]},"value":{"export_enabled":true}}},"fb_create_adset_v4_1":{"type":"fb_create_adset_v4","logging_enabled":false,"error_rules":[{"error_type":"integration/client/response_error","expression":".*"}],"x":1608,"y":182,"group":"group_6","outputs":{"error":{"title":"adset_error","description":"Contains error details"},"failed":{"title":"adset_failed","description":"Triggers when an error handler matched"},"created":{"title":"created","description":"Triggered when created"}}},"converge_2":{"type":"converge","logging_enabled":false,"error_rules":[],"x":2605,"y":445,"group":"group_6","outputs":{"data":{"title":"ad_row","description":"Data from fetched output"}}},"trigger_relay_3":{"type":"trigger_relay","logging_enabled":false,"error_rules":[],"x":2889,"y":464,"group":"group_6","outputs":{"relayed":{"title":"done","description":"Output trigger from relay"}}},"patch_json_v2_8":{"type":"patch_json_v2","title":"Update Adset Id","description":"Apply JSON patches against data","logging_enabled":false,"max_job_retries":6,"timeout":30,"error_rules":[],"x":2203,"y":207,"group":"group_6","inputs":{"patches":{"export_enabled":true,"data":[{"op":"replace","path":"/data/config/adset_id","value":"{{input.value/id}}"}]}}},"patch_json_v2_9":{"type":"patch_json_v2","title":"Do Nothing","description":"Apply JSON patches against data","logging_enabled":false,"max_job_retries":6,"timeout":30,"error_rules":[],"x":673,"y":539,"group":"group_7","inputs":{"patches":{"export_enabled":true,"data":[]},"value":{"export_enabled":true}}},"converge_3":{"type":"converge","logging_enabled":false,"error_rules":[],"x":1032,"y":328,"group":"group_7"},"data_relay_6":{"type":"data_relay","logging_enabled":false,"error_rules":[],"x":926,"y":536,"group":"group_8","inputs":{"data":{"title":"action","description":"Data to relay"}}},"if_v2_2":{"type":"if_v2","title":"If new campaign \u0026 adset","description":"Allows to compare a against b","logging_enabled":false,"max_job_retries":6,"timeout":30,"error_rules":[],"x":1541,"y":214,"group":"group_8","inputs":{"b":{"export_enabled":true,"data":"new_campaign_and_adset_from_template"},"condition":{"export_enabled":true,"data":"equal"}},"outputs":{"true":{"title":" new_campaign_and_adset","description":"Triggers when the evaluation is true"}}},"if_v2_3":{"type":"if_v2","title":"If new adset into above campaign","description":"Allows to compare a against b","logging_enabled":false,"max_job_retries":6,"timeout":30,"error_rules":[],"x":1873,"y":484,"group":"group_8","inputs":{"b":{"export_enabled":true,"data":"new_adset_into_above_campaign"},"condition":{"export_enabled":true,"data":"equal"}},"outputs":{"false":{"title":"adset_existing_campaign","description":"Triggers when the evaluation is false"},"true":{"title":"adset_into_above_campaign","description":"Triggers when the evaluation is true"}}},"extract_v2_3":{"type":"extract_v2","logging_enabled":false,"error_rules":[],"x":614,"y":423,"group":"group_2","inputs":{"pointer":{"export_enabled":true,"data":"/campaign_id"},"data":{"title":"adset","description":"The data from which to extract"}}},"parse_string_to_id_2":{"type":"parse_string_to_id","logging_enabled":false,"error_rules":[],"x":914,"y":384,"group":"group_2","inputs":{"schema":{"export_enabled":true,"data":"fb_campaign_id"}}},"fb_fetch_campaign_v2_1":{"type":"fb_fetch_campaign_v2","logging_enabled":false,"error_rules":[],"x":1230,"y":387,"group":"group_2"},"fb_create_campaign_v4_1":{"type":"fb_create_campaign_v4","logging_enabled":false,"error_rules":[{"error_type":"integration/client/response_error","expression":".*"}],"x":1918,"y":383,"group":"group_2","outputs":{"error":{"title":"campaign_error","description":"Contains error details"},"failed":{"title":"campaign_failed","description":"Triggers when an error handler matched"}}},"fb_fetch_adset_v2_1":{"type":"fb_fetch_adset_v2","logging_enabled":false,"error_rules":[],"x":1534,"y":231,"group":"group_3","outputs":{"fetched":{"title":"fetched","description":"Triggered when fetched"}}},"extract_v2_4":{"type":"extract_v2","logging_enabled":false,"error_rules":[],"x":832,"y":258,"group":"group_3","inputs":{"pointer":{"export_enabled":true,"data":"/config/adset_id"}}},"extract_v2_5":{"type":"extract_v2","logging_enabled":false,"error_rules":[],"x":190,"y":661,"group":"group_9","inputs":{"pointer":{"export_enabled":true,"data":"/config/action"}},"outputs":{"extracted":{"title":"extracted","description":"Triggers when the data was extracted"},"data":{"title":"action","description":"The extracted data"}}},"if_v2_4":{"type":"if_v2","logging_enabled":false,"error_rules":[],"x":515,"y":260,"group":"group_9","inputs":{"b":{"export_enabled":true,"data":["new_adset_from_template","new_campaign_and_adset_from_template","new_adset_into_above_campaign"]},"condition":{"export_enabled":true,"data":"in"},"evaluate":{"title":"evaluate","description":"Starts the evaluation"}},"outputs":{"true":{"title":" new_simple_adset","description":"Triggers when the evaluation is true"}}},"if_v2_5":{"type":"if_v2","title":"If ad into above adset","description":"Allows to compare a against b","logging_enabled":false,"max_job_retries":6,"timeout":30,"error_rules":[],"x":1251,"y":596,"group":"group_9","inputs":{"b":{"export_enabled":true,"data":["insert_into_above"]},"condition":{"export_enabled":true,"data":"in"}},"outputs":{"true":{"title":"into_above","description":"Triggers when the evaluation is true"}}},"if_v2_6":{"type":"if_v2","title":"If Insert ad into existing adset","description":"Allows to compare a against b","logging_enabled":false,"max_job_retries":6,"timeout":30,"error_rules":[],"x":927,"y":411,"group":"group_9","inputs":{"b":{"export_enabled":true,"data":["insert_into_existing_adset"]},"condition":{"export_enabled":true,"data":"in"}},"outputs":{"true":{"title":"into_existing","description":"Triggers when the evaluation is true"}}},"data_relay_7":{"type":"data_relay","logging_enabled":false,"error_rules":[],"x":47,"y":423,"group":"group_10","inputs":{"data":{"title":"ad_to_be","description":"Data to relay"}},"outputs":{"data":{"title":"ad_to_be","description":"Data to relay"}}},"trigger_relay_4":{"type":"trigger_relay","logging_enabled":false,"error_rules":[],"x":2235,"y":449,"group":"group_10","outputs":{"relayed":{"title":"relayed","description":"Output trigger from relay"}}},"patch_json_v3_1":{"type":"patch_json_v3","logging_enabled":false,"error_rules":[],"x":318,"y":218,"group":"group_10","inputs":{"patches":{"export_enabled":true,"data":[{"op":"replace","path":"/name","value":"{{inputValue('/config/adset_name')}}"},{"op":"remove","path":"/source_adset"},{"op":"remove","path":"/targetingsentencelines"},{"op":"remove","path":"/adlabels"},{"op":"remove","path":"/end_time"},{"op":"remove","path":"/id"},{"op":"remove","path":"/source_adset_id"}]}},"outputs":{"patched":{"title":"patched","description":"Triggers when the patching is done"}}},"extract_v2_6":{"type":"extract_v2","logging_enabled":false,"error_rules":[],"x":194,"y":315,"group":"group_11","inputs":{"pointer":{"export_enabled":true,"data":"/config/adset_age_min"}}},"present_1":{"type":"present","logging_enabled":false,"error_rules":[],"x":570,"y":280,"group":"group_11"},"patch_json_v2_10":{"type":"patch_json_v2","logging_enabled":false,"error_rules":[],"x":1046,"y":460,"group":"group_11","inputs":{"patches":{"export_enabled":true,"data":[]},"value":{"export_enabled":true}}},"converge_4":{"type":"converge","logging_enabled":false,"error_rules":[],"x":1467,"y":366,"group":"group_11"},"patch_json_v2_11":{"type":"patch_json_v2","logging_enabled":false,"error_rules":[],"x":1047,"y":153,"group":"group_11","inputs":{"patches":{"export_enabled":true,"data":[{"op":"replace","path":"/targeting/age_min","value":"{{input.value}}"}]}}},"data_relay_8":{"type":"data_relay","logging_enabled":false,"error_rules":[],"x":719,"y":597,"group":"group_11","inputs":{"data":{"title":"adset","description":"Data to relay"}}},"present_2":{"type":"present","logging_enabled":false,"error_rules":[],"x":1547,"y":510,"group":"group_12"},"patch_json_v2_12":{"type":"patch_json_v2","logging_enabled":false,"error_rules":[],"x":1850,"y":308,"group":"group_12","inputs":{"patches":{"export_enabled":true,"data":[{"op":"replace","path":"/targeting/age_max","value":"{{input.value}}"}]}}},"patch_json_v2_13":{"type":"patch_json_v2","title":"Do Nothing","description":"Apply JSON patches against data","logging_enabled":false,"max_job_retries":6,"timeout":30,"error_rules":[],"x":1856,"y":736,"group":"group_12","inputs":{"patches":{"export_enabled":true,"data":[]},"value":{"export_enabled":true}}},"converge_5":{"type":"converge","logging_enabled":false,"error_rules":[],"x":2200,"y":612,"group":"group_12","outputs":{"data":{"title":"adset","description":"Data from fetched output"}}},"data_relay_9":{"type":"data_relay","logging_enabled":false,"error_rules":[],"x":1271,"y":752,"group":"group_12","inputs":{"data":{"title":"adset","description":"Data to relay"}}},"extract_v2_7":{"type":"extract_v2","logging_enabled":false,"error_rules":[],"x":1236,"y":475,"group":"group_12","inputs":{"pointer":{"export_enabled":true,"data":"/config/adset_age_max"},"data":{"title":"ad_to_be","description":"The data from which to extract"}}},"extract_v2_8":{"type":"extract_v2","logging_enabled":false,"error_rules":[],"x":327,"y":344,"group":"group_13","inputs":{"pointer":{"export_enabled":true,"data":"/config/adset/daily_budget"},"data":{"title":"ad_to_be","description":"The data from which to extract"}}},"patch_json_v2_14":{"type":"patch_json_v2","title":"Do Nothing","description":"Apply JSON patches against data","logging_enabled":false,"max_job_retries":6,"timeout":30,"error_rules":[],"x":1142,"y":499,"group":"group_13","inputs":{"patches":{"export_enabled":true,"data":[]},"value":{"export_enabled":true}}},"patch_json_v2_15":{"type":"patch_json_v2","logging_enabled":false,"error_rules":[],"x":1115,"y":170,"group":"group_13","inputs":{"patches":{"export_enabled":true,"data":[{"op":"replace","path":"/daily_budget","value":"{{input.value}}"}]}}},"present_3":{"type":"present","logging_enabled":false,"error_rules":[],"x":715,"y":352,"group":"group_13"},"converge_6":{"type":"converge","logging_enabled":false,"error_rules":[],"x":1538,"y":381,"group":"group_13","outputs":{"data":{"title":"adset","description":"Data from fetched output"}}},"data_relay_10":{"type":"data_relay","logging_enabled":false,"error_rules":[],"x":622,"y":603,"group":"group_13","inputs":{"data":{"title":"adset","description":"Data to relay"}}},"extract_v2_9":{"type":"extract_v2","logging_enabled":false,"error_rules":[],"x":1234,"y":353,"group":"group_14","inputs":{"pointer":{"export_enabled":true,"data":"/config/adset_is_dynamic_creative"},"data":{"title":"ad_to_be","description":"The data from which to extract"}}},"present_4":{"type":"present","logging_enabled":false,"error_rules":[],"x":1531,"y":342,"group":"group_14"},"converge_7":{"type":"converge","logging_enabled":false,"error_rules":[],"x":2169,"y":444,"group":"group_14","outputs":{"data":{"title":"adset","description":"Data from fetched output"}}},"data_relay_11":{"type":"data_relay","logging_enabled":false,"error_rules":[],"x":1068,"y":626,"group":"group_14","inputs":{"data":{"title":"adset","description":"Data to relay"}}},"patch_json_v2_16":{"type":"patch_json_v2","logging_enabled":false,"error_rules":[],"x":1812,"y":182,"group":"group_14","inputs":{"patches":{"export_enabled":true,"data":[{"op":"replace","path":"/is_dynamic_creative","value":"{{input.value}}"}]}}},"patch_json_v2_17":{"type":"patch_json_v2","title":"Do Nothing","description":"Apply JSON patches against data","logging_enabled":false,"max_job_retries":6,"timeout":30,"error_rules":[],"x":1826,"y":569,"group":"group_14","inputs":{"patches":{"export_enabled":true,"data":[]},"value":{"export_enabled":true}}},"extract_v2_10":{"type":"extract_v2","logging_enabled":false,"error_rules":[],"x":1234,"y":353,"group":"group_15","inputs":{"pointer":{"export_enabled":true,"data":"/config/adset_targeting_countries"},"data":{"title":"ad_to_be","description":"The data from which to extract"}}},"present_5":{"type":"present","logging_enabled":false,"error_rules":[],"x":1531,"y":342,"group":"group_15"},"converge_8":{"type":"converge","logging_enabled":false,"error_rules":[],"x":2473,"y":457,"group":"group_15","outputs":{"data":{"title":"adset","description":"Data from fetched output"}}},"data_relay_12":{"type":"data_relay","logging_enabled":false,"error_rules":[],"x":1068,"y":626,"group":"group_15","inputs":{"data":{"title":"adset","description":"Data to relay"}}},"patch_json_v2_18":{"type":"patch_json_v2","logging_enabled":false,"error_rules":[],"x":2126,"y":181,"group":"group_15","inputs":{"patches":{"export_enabled":true,"data":[{"op":"replace","path":"/targeting/geo_locations/countries","value":"{{input.value}}"}]}}},"patch_json_v2_19":{"type":"patch_json_v2","title":"Do Nothing","description":"Apply JSON patches against data","logging_enabled":false,"max_job_retries":6,"timeout":30,"error_rules":[],"x":1826,"y":569,"group":"group_15","inputs":{"patches":{"export_enabled":true,"data":[]},"value":{"export_enabled":true}}},"process_script_1":{"type":"process_script","logging_enabled":false,"error_rules":[],"x":1803,"y":176,"group":"group_15","inputs":{"b":{"export_enabled":true,"data":"|||"},"src":{"export_enabled":true,"data":"delimiter = inputs['b']\noutputs['a'] = inputs['a'].split(delimiter)"},"runtime":{"export_enabled":true,"data":"python3_7"}}},"fb_fetch_adset_v2_2":{"type":"fb_fetch_adset_v2","logging_enabled":false,"error_rules":[],"x":1128,"y":425,"group":"group_16"},"patch_json_v2_20":{"type":"patch_json_v2","logging_enabled":false,"error_rules":[],"x":244,"y":268,"group":"group_17","inputs":{"patches":{"export_enabled":true,"data":[{"op":"remove","path":"/data"},{"op":"add","path":"/data/output","value":{}}]},"data":{"title":"ad_row","description":"The data the patches are applied to"}}},"google_sheets_update_table_rows_v2_2":{"type":"google_sheets_update_table_rows_v2","logging_enabled":false,"error_rules":[],"x":1578,"y":316,"group":"group_17","outputs":{"updated":{"title":"updated","description":"Triggered when updated"}}},"unmap_table_rows_2":{"type":"unmap_table_rows","logging_enabled":false,"error_rules":[],"x":1223,"y":278,"group":"group_17","inputs":{"schema":{"export_enabled":true,"data":"any"}}},"patch_json_v2_21":{"type":"patch_json_v2","logging_enabled":false,"error_rules":[],"x":877,"y":275,"group":"group_17","inputs":{"patches":{"export_enabled":true,"data":[{"op":"add","path":"/-","value":"{{input.value}}"}]},"data":{"export_enabled":true,"data":[]}}},"patch_json_v2_22":{"type":"patch_json_v2","logging_enabled":false,"error_rules":[],"x":573,"y":279,"group":"group_17","inputs":{"patches":{"export_enabled":true,"data":[{"op":"add","path":"/data/output/ads_manager_link_adset","value":"https://business.facebook.com/adsmanager/manage/adsets?act={{input.value/account_id}}\u0026filter_set=SEARCH_BY_CAMPAIGN_IDS-STRING_SET%1EANY%1E[%22{{input.value/id}}%22]\u0026selected_adset_ids={{input.value/id}}"},{"op":"add","path":"/data/output/adset_id","value":"{{input.value/id}}"},{"op":"add","path":"/data/config/ad_action","value":" "}]},"value":{"title":"adset","description":"A value that can be used in patches"}}},"extract_v2_11":{"type":"extract_v2","logging_enabled":false,"error_rules":[],"x":420,"y":489,"group":"group_18","inputs":{"pointer":{"export_enabled":true,"data":"/data"},"data":{"title":"ad_row","description":"The data from which to extract"}}},"extract_v2_12":{"type":"extract_v2","title":"Extract Config","description":"Allows to extract data with a pointer","logging_enabled":false,"error_rules":[],"x":709,"y":368,"group":"group_18","inputs":{"pointer":{"export_enabled":true,"data":"/config"}},"outputs":{"data":{"title":"config","description":"The extracted data"}}},"trigger_relay_5":{"type":"trigger_relay","logging_enabled":false,"error_rules":[],"x":68,"y":341,"group":"group_18","inputs":{"relay":{"title":"do","description":"Input trigger to relayed"}}},"input_boolean_1":{"type":"input_boolean","logging_enabled":false,"error_rules":[],"x":1108,"y":748,"group":"group_18","inputs":{"boolean":{"export_enabled":true,"data":true}}},"patch_json_v2_23":{"type":"patch_json_v2","logging_enabled":false,"error_rules":[],"x":1404,"y":538,"group":"group_18","inputs":{"patches":{"export_enabled":true,"data":[{"op":"add","path":"/config/remove_story_text","value":"{{input.value}}"}]}}},"fb_fetch_ad_v2_2":{"type":"fb_fetch_ad_v2","logging_enabled":false,"error_rules":[],"x":511,"y":470,"group":"group_19","outputs":{"ad":{"title":"template_ad","description":"The fetched ad"}}},"fb_fetch_ad_creative_v2_1":{"type":"fb_fetch_ad_creative_v2","logging_enabled":false,"error_rules":[],"x":1212,"y":413,"group":"group_19","outputs":{"fetched":{"title":"fetched","description":"Triggered when fetched"}}},"patch_json_v2_24":{"type":"patch_json_v2","title":"Patch Json: Build Ad Creative id","description":"Apply JSON patches against data","logging_enabled":false,"error_rules":[],"x":867,"y":353,"group":"group_19","inputs":{"patches":{"export_enabled":true,"data":[{"op":"replace","path":"/id","value":"{{input.value/creative/id}}"}]},"data":{"export_enabled":true,"data":{"id":"","provider":"facebook","type":"ad_creative"}}}},"patch_json_v2_25":{"type":"patch_json_v2","title":"Patch Json: Build Ad Id","description":"Apply JSON patches against data","logging_enabled":false,"error_rules":[],"x":185,"y":295,"group":"group_19","inputs":{"patches":{"export_enabled":true,"data":[{"op":"replace","path":"/id","value":"{{input.value/template_ad_id}}"}]},"value":{"title":"value: config","description":"A value that can be used in patches"},"data":{"export_enabled":true,"data":{"id":"","provider":"facebook","type":"ad"}}}},"data_relay_13":{"type":"data_relay","logging_enabled":false,"error_rules":[],"x":38,"y":543,"group":"group_20","inputs":{"data":{"title":"ad_to_be","description":"Data to relay"}}},"process_script_2":{"type":"process_script","logging_enabled":false,"error_rules":[],"x":817,"y":741,"group":"group_20","inputs":{"src":{"export_enabled":true,"data":"ad_to_be = inputs['a']\ntemplate_creative = inputs['b']\nad_info = ad_to_be['ad_creative']\nfeed = {}\n\nvideo_ids = []\nimage_hashes = []\n\nfor asset_id in ad_info['assets']:\n if asset_id.isnumeric() and asset_id not in video_ids:\n video_ids.append(asset_id)\n elif asset_id not in image_hashes:\n image_hashes.append(asset_id)\n\nbodies = ad_info.get('bodies', [])\nheadlines = ad_info.get('headlines', [])\ndescriptions = ad_info.get('descriptions', [])\n\ncall_to_action_types = ad_info.get('call_to_action_types', [])\n\nfeed[\"link_urls\"] = [{\"website_url\": ad_info['urls'][0], \"display_url\":\"\"}]\n\nnew_ctas = []\nfor cta in call_to_action_types:\n new_ctas.append(cta)\n\nnew_descriptions = []\nfor description in descriptions:\n if description == \"_\":\n description = \" \"\n new_descriptions.append({\"text\": description})\n\nnew_headlines = []\nfor headline in headlines:\n new_headlines.append({\"text\": headline})\n \nnew_bodies = []\nfor body in bodies:\n new_bodies.append({\"text\": body})\n \nnew_videos = []\nfor video_id in video_ids:\n new_videos.append({\"video_id\": video_id})\n\nnew_images = []\nfor image_hash in image_hashes:\n new_images.append({\"hash\": image_hash})\n\nfeed[\"bodies\"] = new_bodies\nfeed[\"descriptions\"] = new_descriptions\nfeed[\"titles\"] = new_headlines\nfeed[\"videos\"] = new_videos\nfeed[\"images\"] = new_images\nfeed[\"call_to_action_types\"] = new_ctas\n\n\nfeed['ad_formats'] = ['AUTOMATIC_FORMAT']\nfeed['optimization_type'] = 'REGULAR'\n\noutputs['a'] = {\n \"asset_feed_spec\": feed,\n \"object_story_spec\": {\n \"page_id\": template_creative.get('actor_id'),\n \"instagram_actor_id\": template_creative.get('instagram_actor_id'),\n },\n \"url_tags\": template_creative.get('url_tags'),\n \"authorization_category\": template_creative.get('authorization_category')\n}"},"runtime":{"export_enabled":true,"data":"python3_7"}}},"trigger_relay_6":{"type":"trigger_relay","logging_enabled":false,"error_rules":[],"x":38,"y":326,"group":"group_20"},"if_v2_7":{"type":"if_v2","logging_enabled":false,"error_rules":[],"x":544,"y":517,"group":"group_20","inputs":{"b":{"export_enabled":true,"data":"dco"},"condition":{"export_enabled":true,"data":"equal"}}},"extract_v2_13":{"type":"extract_v2","logging_enabled":false,"error_rules":[],"x":290,"y":505,"group":"group_20","inputs":{"default_value":{"export_enabled":true},"pointer":{"export_enabled":true,"data":"/config/ad_format"}}},"process_remote_function_v2_1":{"type":"process_remote_function_v2","title":"Cloud Function: Build Ad Creative","description":"Posts the inputs to a json url endpoint and maps responses to the outputs","logging_enabled":false,"error_rules":[],"x":820,"y":208,"group":"group_20","inputs":{"b":{"title":"b: ad_to_be","description":"Any data that is sent to the remote function"},"a":{"title":"a: template_ad_creative","description":"Any data that is sent to the remote function"},"authorization":{"export_enabled":true,"data":""},"url":{"export_enabled":true,"data":"https://europe-west3-kitchnware-cs-remote-functions.cloudfunctions.net/build_adcreative_for_bulk_creation_20230413"},"process":{"title":"process","description":"Starts the processing"}},"outputs":{"processed":{"title":"processed","description":"Triggered when processing is done"},"a":{"title":"a: ad_creative","description":"Data from response.outputs.a"}}},"data_relay_14":{"type":"data_relay","logging_enabled":false,"error_rules":[],"x":1568,"y":332,"group":"group_20","inputs":{"data":{"title":"template_ad","description":"Data to relay"}}},"data_relay_15":{"type":"data_relay","logging_enabled":false,"error_rules":[],"x":42,"y":758,"group":"group_20","inputs":{"data":{"title":"template_ad_creative","description":"Data to relay"}}},"patch_json_v2_26":{"type":"patch_json_v2","logging_enabled":false,"error_rules":[],"x":3272,"y":666,"group":"group_20","inputs":{"patches":{"export_enabled":true,"data":[{"op":"test","path":"/creative/creative_id","value":null},{"op":"replace","path":"/name","value":"{{input.value/ad_creative/name}}"}]}}},"patch_json_v2_27":{"type":"patch_json_v2","logging_enabled":false,"error_rules":[],"x":2704,"y":623,"group":"group_20","inputs":{"patches":{"export_enabled":true,"data":[{"op":"replace","path":"/adset_id","value":"{{input.value/config/adset_id}}"}]}}},"patch_json_v2_28":{"type":"patch_json_v2","title":"If no name, use template name","description":"Apply JSON patches against data","logging_enabled":false,"max_job_retries":6,"timeout":30,"error_rules":[],"x":2989,"y":665,"group":"group_20","inputs":{"patches":{"export_enabled":true,"data":[{"op":"test","path":"/name","value":""},{"op":"replace","path":"/name","value":"{{input.value/name}}"}]}}},"converge_9":{"type":"converge","logging_enabled":false,"error_rules":[],"x":1187,"y":570,"group":"group_20"},"patch_json_v2_29":{"type":"patch_json_v2","logging_enabled":false,"error_rules":[],"x":1492,"y":552,"group":"group_20","inputs":{"patches":{"export_enabled":true,"data":[{"op":"replace","path":"/creative","value":"{{input.value}}"}]},"data":{"export_enabled":true,"data":{"account_id":"","adset_id":"","creative":{},"status":"PAUSED","name":"","tracking_specs":[],"conversion_domain":""}}},"outputs":{"data":{"title":"ad","description":"The patched data"}}},"patch_json_v2_30":{"type":"patch_json_v2","logging_enabled":false,"error_rules":[],"x":3555,"y":647,"group":"group_20","inputs":{"patches":{"export_enabled":true,"data":[{"op":"replace","path":"/conversion_domain","value":"{{input.value/conversion_domain}}"},{"op":"replace","path":"/account_id","value":"{{input.value/account_id}}"},{"op":"replace","path":"/tracking_specs","value":"{{input.value/tracking_specs}}"}]}},"outputs":{"patched":{"title":"patched","description":"Triggers when the patching is done"},"data":{"title":"ad_to_be","description":"The patched data"}}},"data_relay_16":{"type":"data_relay","logging_enabled":false,"error_rules":[],"x":1007,"y":465,"group":"group_21","inputs":{"data":{"title":"ad","description":"Data to relay"}}},"patch_json_v2_31":{"type":"patch_json_v2","title":"Do Nothing","description":"Apply JSON patches against data","logging_enabled":false,"max_job_retries":6,"timeout":30,"error_rules":[],"x":1304,"y":823,"group":"group_21","inputs":{"patches":{"export_enabled":true,"data":[]},"value":{"export_enabled":true}}},"present_6":{"type":"present","logging_enabled":false,"error_rules":[],"x":888,"y":662,"group":"group_21"},"extract_v2_14":{"type":"extract_v2","logging_enabled":false,"error_rules":[],"x":573,"y":695,"group":"group_21","inputs":{"pointer":{"export_enabled":true,"data":"/ad_creative/post_id"},"data":{"title":"ad_to_be","description":"The data from which to extract"}}},"converge_10":{"type":"converge","logging_enabled":false,"error_rules":[],"x":1677,"y":702,"group":"group_21","outputs":{"converged":{"title":"converged","description":"Triggers when data is converged"}}},"patch_json_v3_2":{"type":"patch_json_v3","logging_enabled":false,"error_rules":[],"x":1303,"y":534,"group":"group_21","inputs":{"patches":{"export_enabled":true,"data":[{"op":"add","path":"/creative/object_story_id","value":"{{inputData(\"/creative/actor_id\")}}_{{inputValue(\"\")}}"},{"op":"remove","path":"/creative/asset_feed_spec"},{"op":"remove","path":"/effective_object_story_id"},{"op":"remove","path":"/object_story_spec"},{"op":"remove","path":"/id"},{"op":"remove","path":"/name"}]}}},"if_v2_8":{"type":"if_v2","logging_enabled":false,"error_rules":[],"x":754,"y":291,"group":"group_22","inputs":{"b":{"export_enabled":true,"data":"collection_img"},"condition":{"export_enabled":true,"data":"equal"}}},"patch_json_v2_32":{"type":"patch_json_v2","logging_enabled":false,"error_rules":[],"x":1449,"y":553,"group":"group_22","inputs":{"patches":{"export_enabled":true,"data":[{"op":"replace","path":"/body_elements/1/product_set_id","value":"{{input.value/ad_creative/product_set_id}}"},{"op":"replace","path":"/body_elements/2/child_elements/0/open_url_action/url","value":"{{input.value/ad_creative/urls/0}}"},{"op":"replace","path":"/body_elements/2/child_elements/0/rich_text/plain_text","value":"{{input.value/ad_creative/canvas_button_text}}"},{"op":"replace","path":"/body_elements/0/video_id","value":"{{input.value/ad_creative/video_ids/0}}"},{"op":"replace","path":"/name","value":"{{input.value/ad_creative/name}}"}]},"data":{"export_enabled":true,"data":{"name":"","is_hidden":false,"is_published":true,"background_color":"FFFFFFFF","body_elements":[{"element_type":"canvas_video","style":"FIT_TO_WIDTH","name":"Video","video_id":""},{"element_type":"canvas_product_set","name":"Product","max_items":50,"item_headline":"{{product.name}}","item_description":"{{product.description}}","product_set_id":"","show_in_feed":true,"bottom_padding":"0","top_padding":"0"},{"element_type":"canvas_footer","name":"Footer","background_color":"FFFFFFFF","child_elements":[{"element_type":"canvas_button","name":"Button","open_url_action":{"url":""},"background_color":"FFFFFFFF","bottom_padding":"0","button_color":"FF000000","button_style":"BUTTON_OUTLINE","rich_text":{"plain_text":""}}]}]}}}},"if_v2_9":{"type":"if_v2","logging_enabled":false,"error_rules":[],"x":938,"y":613,"group":"group_22","inputs":{"b":{"export_enabled":true,"data":"collection_vid"},"condition":{"export_enabled":true,"data":"equal"}}},"data_relay_17":{"type":"data_relay","logging_enabled":false,"error_rules":[],"x":18,"y":471,"group":"group_22","inputs":{"data":{"title":"ad_to_be","description":"Data to relay"}}},"patch_json_v3_3":{"type":"patch_json_v3","logging_enabled":false,"error_rules":[],"x":2012,"y":594,"group":"group_22","inputs":{"patches":{"export_enabled":true,"data":[{"op":"replace","path":"/creative/object_story_spec/video_data/call_to_action/value/link","value":"https://fb.com/canvas_doc/{{inputValue(\"/id\")}}"}]}}},"patch_json_v2_33":{"type":"patch_json_v2","logging_enabled":false,"error_rules":[],"x":516,"y":722,"group":"group_22","inputs":{"patches":{"export_enabled":true,"data":[{"op":"add","path":"/id","value":"{{input.value/creative/object_story_spec/page_id}}"}]},"data":{"export_enabled":true,"data":{"provider":"facebook","type":"page"}}},"outputs":{"data":{"title":"page_id","description":"The patched data"}}},"data_relay_18":{"type":"data_relay","logging_enabled":false,"error_rules":[],"x":157,"y":1004,"group":"group_22","inputs":{"data":{"title":"ad","description":"Data to relay"}}},"patch_json_v2_34":{"type":"patch_json_v2","title":"Do Nothing","description":"Apply JSON patches against data","logging_enabled":false,"max_job_retries":6,"timeout":30,"error_rules":[],"x":2009,"y":925,"group":"group_22","inputs":{"patches":{"export_enabled":true,"data":[]},"value":{"export_enabled":true}}},"extract_v2_15":{"type":"extract_v2","logging_enabled":false,"error_rules":[],"x":261,"y":553,"group":"group_22","inputs":{"pointer":{"export_enabled":true,"data":"/config/ad_format"},"data":{"title":"ad_to_be","description":"The data from which to extract"}},"outputs":{"data":{"title":"ad_format","description":"The extracted data"}}},"converge_11":{"type":"converge","logging_enabled":false,"error_rules":[],"x":2440,"y":637,"group":"group_22","outputs":{"converged":{"title":"converged","description":"Triggers when data is converged"}}},"patch_json_v3_4":{"type":"patch_json_v3","logging_enabled":false,"error_rules":[],"x":1988,"y":225,"group":"group_22","inputs":{"patches":{"export_enabled":true,"data":[{"op":"replace","path":"/creative/object_story_spec/link_data/link","value":"https://fb.com/canvas_doc/{{inputValue(\"/id\")}}"}]}}},"fb_create_canvas_1":{"type":"fb_create_canvas","logging_enabled":false,"error_rules":[],"x":1705,"y":591,"group":"group_22"},"trigger_relay_7":{"type":"trigger_relay","logging_enabled":false,"error_rules":[],"x":405,"y":185,"group":"group_23"},"fb_create_canvas_2":{"type":"fb_create_canvas","logging_enabled":false,"error_rules":[],"x":1967,"y":374,"group":"group_23"},"fb_create_page_photo_1":{"type":"fb_create_page_photo","logging_enabled":false,"error_rules":[],"x":1041,"y":231,"group":"group_23","inputs":{"published":{"export_enabled":true,"data":false}}},"data_relay_19":{"type":"data_relay","logging_enabled":false,"error_rules":[],"x":325,"y":686,"group":"group_23","inputs":{"data":{"title":"page_id","description":"Data to relay"}}},"patch_json_v2_35":{"type":"patch_json_v2","logging_enabled":false,"error_rules":[],"x":1651,"y":306,"group":"group_23","inputs":{"patches":{"export_enabled":true,"data":[{"op":"replace","path":"/body_elements/0/photo_id","value":"{{input.value/id}}"}]}}},"extract_v2_16":{"type":"extract_v2","logging_enabled":false,"error_rules":[],"x":725,"y":235,"group":"group_23","inputs":{"pointer":{"export_enabled":true,"data":"/ad_creative/collection_ad_image_url"}},"outputs":{"extracted":{"title":"extracted","description":"Triggers when the data was extracted"}}},"data_relay_20":{"type":"data_relay","logging_enabled":false,"error_rules":[],"x":351,"y":444,"group":"group_23","inputs":{"data":{"title":"ad_to_be","description":"Data to relay"}}},"patch_json_v2_36":{"type":"patch_json_v2","logging_enabled":false,"error_rules":[],"x":1338,"y":270,"group":"group_23","inputs":{"patches":{"export_enabled":true,"data":[{"op":"replace","path":"/body_elements/1/product_set_id","value":"{{input.value/ad_creative/product_set_id}}"},{"op":"replace","path":"/body_elements/2/child_elements/0/open_url_action/url","value":"{{input.value/ad_creative/urls/0}}"},{"op":"replace","path":"/body_elements/2/child_elements/0/rich_text/plain_text","value":"{{input.value/ad_creative/canvas_button_text}}"},{"op":"replace","path":"/name","value":"{{input.value/ad_creative/name}}"}]},"data":{"export_enabled":true,"data":{"name":"Using processor","is_hidden":true,"is_published":true,"background_color":"FFFFFFFF","body_elements":[{"element_type":"canvas_photo","style":"FIT_TO_WIDTH","name":"Image","photo_id":""},{"element_type":"canvas_product_set","name":"Product","max_items":50,"item_headline":"{{product.name}}","item_description":"{{product.description}}","product_set_id":"","show_in_feed":true,"bottom_padding":"0","top_padding":"0"},{"element_type":"canvas_footer","name":"Footer","background_color":"FFFFFFFF","child_elements":[{"element_type":"canvas_button","name":"Button","open_url_action":{"url":""},"background_color":"FFFFFFFF","bottom_padding":"0","button_color":"FF000000","button_style":"BUTTON_OUTLINE","rich_text":{"plain_text":""}}]}]}}}},"data_relay_21":{"type":"data_relay","logging_enabled":false,"error_rules":[],"x":1007,"y":465,"group":"group_24","inputs":{"data":{"title":"ad","description":"Data to relay"}}},"patch_json_v2_37":{"type":"patch_json_v2","title":"Do Nothing","description":"Apply JSON patches against data","logging_enabled":false,"max_job_retries":6,"timeout":30,"error_rules":[],"x":1304,"y":823,"group":"group_24","inputs":{"patches":{"export_enabled":true,"data":[]},"value":{"export_enabled":true}}},"patch_json_v2_38":{"type":"patch_json_v2","logging_enabled":false,"error_rules":[],"x":1281,"y":521,"group":"group_24","inputs":{"patches":{"export_enabled":true,"data":[{"op":"replace","path":"/adset_id","value":"{{input.value/config/adset_id}}"},{"op":"replace","path":"/status","value":"{{input.value}}"}]}}},"present_7":{"type":"present","logging_enabled":false,"error_rules":[],"x":888,"y":662,"group":"group_24"},"extract_v2_17":{"type":"extract_v2","logging_enabled":false,"error_rules":[],"x":573,"y":695,"group":"group_24","inputs":{"pointer":{"export_enabled":true,"data":"/config/ad_status"},"data":{"title":"ad_to_be","description":"The data from which to extract"}}},"converge_12":{"type":"converge","logging_enabled":false,"error_rules":[],"x":1677,"y":702,"group":"group_24"},"data_relay_22":{"type":"data_relay","logging_enabled":false,"error_rules":[],"x":1986,"y":352,"group":"group_25","inputs":{"data":{"title":"ad","description":"Data to relay"}}},"patch_json_v2_39":{"type":"patch_json_v2","title":"Do Nothing","description":"Apply JSON patches against data","logging_enabled":false,"max_job_retries":6,"timeout":30,"error_rules":[],"x":2283,"y":710,"group":"group_25","inputs":{"patches":{"export_enabled":true,"data":[]},"value":{"export_enabled":true}}},"patch_json_v2_40":{"type":"patch_json_v2","logging_enabled":false,"error_rules":[],"x":2260,"y":408,"group":"group_25","inputs":{"patches":{"export_enabled":true,"data":[{"op":"replace","path":"/creative/url_tags","value":"{{input.value}}"}]}}},"present_8":{"type":"present","logging_enabled":false,"error_rules":[],"x":1867,"y":549,"group":"group_25"},"extract_v2_18":{"type":"extract_v2","logging_enabled":false,"error_rules":[],"x":1552,"y":582,"group":"group_25","inputs":{"pointer":{"export_enabled":true,"data":"/ad_creative/url_tags"},"data":{"title":"ad_to_be","description":"The data from which to extract"}}},"converge_13":{"type":"converge","logging_enabled":false,"error_rules":[],"x":2656,"y":589,"group":"group_25"},"patch_json_v3_5":{"type":"patch_json_v3","logging_enabled":false,"error_rules":[],"x":1575,"y":378,"group":"group_2","inputs":{"patches":{"export_enabled":true,"data":[{"op":"replace","path":"/name","value":"{{inputValue('/config/campaign_name')}}"},{"op":"remove","path":"/source_campaign"},{"op":"remove","path":"/source_campaign_id"},{"op":"remove","path":"/id"},{"op":"remove","path":"/topline_id"},{"op":"remove","path":"/special_ad_category"},{"op":"remove","path":"/budget_rebalance_flag"},{"op":"replace","path":"","value":"{{\n if(\n equals(inputData('/smart_promotion_type'), 'AUTOMATED_SHOPPING_ADS'),\n deletePropertiesFromObject(inputData(''), [\"/is_skadnetwork_attribution\", \"/start_time\"]),\n inputData('')\n )\n}}"}]},"value":{"title":"ad_to_be","description":"A value that can be used in patches"}}},"patch_json_v3_6":{"type":"patch_json_v3","title":"Update Campaign Id","description":"Apply JSON patches against data","logging_enabled":false,"max_job_retries":6,"timeout":30,"error_rules":[],"x":2495,"y":590,"group":"group_2","inputs":{"patches":{"export_enabled":true,"data":[{"op":"replace","path":"/campaign_id","value":"{{inputValue('/id')}}"}]},"patch":{"title":"update_campaign_id","description":"Starts the patching"}},"outputs":{"data":{"title":"adset","description":"The patched data"}}},"patch_json_v3_7":{"type":"patch_json_v3","logging_enabled":false,"error_rules":[],"x":2225,"y":593,"group":"group_2","inputs":{"patches":{"export_enabled":true,"data":[{"op":"replace","path":"","value":"{{\n if(\n equals(inputValue('/smart_promotion_type'), 'AUTOMATED_SHOPPING_ADS'),\n deletePropertiesFromObject(inputData(''), [\n \"/is_dynamic_creative\",\n \"/lifetime_imps\",\n \"/activities\",\n \"/budget_remaining\",\n \"/campaign\",\n \"/multi_optimization_goal_weight\",\n \"/optimization_sub_event\",\n \"/pacing_type\",\n \"/targeting/age_max\",\n \"/targeting/age_min\",\n \"/targeting/brand_safety_content_filter_levels\",\n \"/targeting/geo_locations/location_types\"\n ]),\n inputData('')\n )\n}}"}]},"patch":{"title":"update_campaign_id","description":"Starts the patching"}}},"patch_json_v3_8":{"type":"patch_json_v3","logging_enabled":false,"error_rules":[],"x":1401,"y":869,"group":"group_26","inputs":{"patches":{"export_enabled":true,"data":[{"op":"add","path":"/creative/degrees_of_freedom_spec/creative_features_spec/standard_enhancements","value":{"enroll_status":"OPT_OUT"}}]},"value":{"export_enabled":true}}},"process_script_3":{"type":"process_script","logging_enabled":false,"error_rules":[],"x":1644,"y":863,"group":"group_26","inputs":{"b":{"export_enabled":true},"src":{"export_enabled":true,"data":"ad = inputs['a']\ntracking_specs = ad[\"tracking_specs\"]\n\nfor spec in tracking_specs[:]: \n if \"post\" in spec:\n tracking_specs.remove(spec)\n\noutputs['a'] = ad\n\n"},"runtime":{"export_enabled":true,"data":"python3_9"}}},"fb_create_ad_v4_1":{"type":"fb_create_ad_v4","logging_enabled":false,"error_rules":[{"error_type":"integration/client/response_error","expression":".*"}],"x":2180,"y":883,"group":"group_26","outputs":{"failed":{"title":"failed","description":"Triggers when an error handler matched"},"created":{"title":"created","description":"Triggered when created"}}},"if_v2_10":{"type":"if_v2","logging_enabled":false,"error_rules":[],"x":2659,"y":1048,"group":"group_26","inputs":{"condition":{"export_enabled":true,"data":"equal"},"a":{"export_enabled":true,"data":1815956}},"outputs":{"false":{"title":"failed","description":"Triggers if the evaluation amounts to false"}}},"extract_v2_19":{"type":"extract_v2","logging_enabled":false,"error_rules":[],"x":2423,"y":1150,"group":"group_26","inputs":{"default_value":{"export_enabled":true},"pointer":{"export_enabled":true,"data":"/data/error/error_subcode"}}},"converge_14":{"type":"converge","logging_enabled":false,"error_rules":[],"x":1911,"y":904,"group":"group_26","outputs":{"converged":{"title":"converged","description":"Triggers when the paths were converged"}}}},"edges":[{"id":"start_1.start:replace_string_1.replace","points":[]},{"id":"if_v2_1.true:stop_1.stop","points":[]},{"id":"for_each_v2_1.done:stop_1.stop","points":[]},{"id":"fb_fetch_campaign_v2_1.fetched:patch_json_v3_5.patch","points":[]},{"id":"patch_json_v3_5.data:fb_create_campaign_v4_1.data","points":[]},{"id":"extract_v2_5.data:if_v2_4.a","points":[]},{"id":"trigger_relay_3.relayed:trigger_relay_5.relay","points":[]},{"id":"if_v2_2.false:if_v2_3.evaluate","points":[]},{"id":"fb_fetch_ad_v2_2.ad:data_relay_14.data","points":[]},{"id":"data_relay_14.data:patch_json_v2_28.value","points":[]},{"id":"data_relay_14.data:patch_json_v2_30.value","points":[]},{"id":"converge_13.converged:extract_v2_14.extract","points":[]},{"id":"converge_12.data:data_relay_22.data","points":[]},{"id":"patch_json_v2_26.data:patch_json_v2_30.data","points":[]},{"id":"patch_json_v2_28.patched:patch_json_v2_26.patch","points":[]},{"id":"data_relay_13.data:patch_json_v2_26.value","points":[]},{"id":"data_relay_13.data:process_remote_function_v2_1.b","points":[]},{"id":"patch_json_v2_28.data:patch_json_v2_26.data","points":[]},{"id":"patch_json_v2_26.patched:patch_json_v2_30.patch","points":[]},{"id":"data_relay_7.data:patch_json_v3_1.value","points":[]},{"id":"extract_v2_8.data:present_3.data","points":[]},{"id":"extract_v2_10.data:present_5.data","points":[]},{"id":"extract_v2_10.extracted:present_5.check","points":[]},{"id":"extract_v2_6.data:present_1.data","points":[]},{"id":"extract_v2_6.extracted:present_1.check","points":[]},{"id":"extract_v2_7.data:present_2.data","points":[]},{"id":"extract_v2_7.extracted:present_2.check","points":[]},{"id":"data_relay_7.data:extract_v2_6.data","points":[]},{"id":"data_relay_7.data:extract_v2_7.data","points":[]},{"id":"patch_json_v3_5.patched:fb_create_campaign_v4_1.create","points":[]},{"id":"trigger_relay_4.relayed:if_v2_2.evaluate","points":[]},{"id":"extract_v2_8.extracted:present_3.check","points":[]},{"id":"data_relay_7.data:extract_v2_10.data","points":[]},{"id":"trigger_relay_2.relayed:for_each_v2_1.next","points":[]},{"id":"google_sheets_select_spreadsheet_id_v2_1.spreadsheet_id:google_sheets_fetch_table_rows_v3_1.spreadsheet_id","points":[]},{"id":"google_sheets_fetch_table_row_mapping_1.mapping:map_table_rows_1.mapping","points":[]},{"id":"google_sheets_select_spreadsheet_id_v2_1.spreadsheet_id:google_sheets_fetch_table_row_mapping_1.spreadsheet_id","points":[]},{"id":"google_sheets_select_spreadsheet_id_v2_1.range:data_relay_3.data","points":[]},{"id":"google_sheets_select_spreadsheet_id_v2_1.range:data_relay_4.data","points":[]},{"id":"data_relay_4.data:replace_string_1.value","points":[]},{"id":"replace_string_1.replaced:google_sheets_fetch_table_rows_v3_1.fetch","points":[]},{"id":"replace_string_1.data:google_sheets_fetch_table_rows_v3_1.range","points":[]},{"id":"google_sheets_fetch_table_rows_v3_1.rows:patch_json_list_v2_1.data_list","points":[]},{"id":"google_sheets_fetch_table_rows_v3_1.fetched:patch_json_list_v2_1.patch","points":[]},{"id":"map_table_rows_1.mapped_rows:filter_v2_1.items","points":[]},{"id":"map_table_rows_1.mapped:filter_v2_1.filter","points":[]},{"id":"data_relay_5.data:extract_v2_2.data","points":[]},{"id":"trigger_relay_1.relayed:extract_v2_2.extract","points":[]},{"id":"extract_v2_2.extracted:extract_v2_5.extract","points":[]},{"id":"data_relay_5.data:patch_json_v2_20.data","points":[]},{"id":"unmap_table_rows_2.unmapped:google_sheets_update_table_rows_v2_2.update","points":[]},{"id":"patch_json_v2_21.patched:unmap_table_rows_2.unmap","points":[]},{"id":"unmap_table_rows_2.rows:google_sheets_update_table_rows_v2_2.rows","points":[]},{"id":"extract_v2_11.data:extract_v2_12.data","points":[]},{"id":"extract_v2_11.extracted:extract_v2_12.extract","points":[]},{"id":"patch_json_v2_20.data:patch_json_v2_22.data","points":[]},{"id":"patch_json_v2_20.patched:patch_json_v2_22.patch","points":[]},{"id":"google_sheets_fetch_table_row_mapping_1.mapping:unmap_table_rows_2.mapping","points":[]},{"id":"for_each_v2_1.item:data_relay_5.data","points":[]},{"id":"fb_create_adset_v4_1.adset_id:patch_json_v2_8.value","points":[]},{"id":"patch_json_v2_22.patched:patch_json_v2_21.patch","points":[]},{"id":"patch_json_v2_22.data:patch_json_v2_21.value","points":[]},{"id":"fb_fetch_adset_v2_2.adset:patch_json_v2_22.value","points":[]},{"id":"fb_fetch_adset_v2_2.fetched:patch_json_v2_20.patch","points":[]},{"id":"patch_json_v2_21.data:unmap_table_rows_2.mapped_rows","points":[]},{"id":"extract_v2_2.data:patch_json_v3_5.value","points":[]},{"id":"extract_v2_2.data:data_relay_7.data","points":[]},{"id":"extract_v2_2.data:extract_v2_5.data","points":[]},{"id":"extract_v2_2.data:extract_v2_4.data","points":[]},{"id":"data_relay_13.data:process_script_2.a","points":[]},{"id":"data_relay_13.data:extract_v2_13.data","points":[]},{"id":"extract_v2_13.data:if_v2_7.a","points":[]},{"id":"if_v2_7.true:process_script_2.process","points":[]},{"id":"trigger_relay_6.relayed:extract_v2_13.extract","points":[]},{"id":"patch_json_list_v2_1.data_list:filter_v2_2.items","points":[]},{"id":"filter_v2_1.filtered:for_each_v2_1.start","points":[]},{"id":"converge_7.data:data_relay_8.data","points":[]},{"id":"if_v2_7.false:process_remote_function_v2_1.process","points":[]},{"id":"extract_v2_13.extracted:if_v2_7.evaluate","points":[]},{"id":"patch_json_list_v2_1.patched:google_sheets_fetch_table_row_mapping_1.fetch","points":[]},{"id":"google_sheets_select_spreadsheet_id_v2_1.range:google_sheets_fetch_table_row_mapping_1.range","points":[]},{"id":"extract_v2_9.data:present_4.data","points":[]},{"id":"extract_v2_9.extracted:present_4.check","points":[]},{"id":"extract_v2_9.data:patch_json_v2_16.value","points":[]},{"id":"present_4.false:patch_json_v2_17.patch","points":[]},{"id":"present_4.true:patch_json_v2_16.patch","points":[]},{"id":"patch_json_v2_17.data:converge_7.data","points":[]},{"id":"patch_json_v2_17.patched:converge_7.converge","points":[]},{"id":"patch_json_v2_16.data:converge_7.data","points":[]},{"id":"patch_json_v2_16.patched:converge_7.converge","points":[]},{"id":"data_relay_11.data:patch_json_v2_17.data","points":[]},{"id":"data_relay_11.data:patch_json_v2_16.data","points":[]},{"id":"converge_7.converged:extract_v2_6.extract","points":[]},{"id":"converge_8.data:data_relay_11.data","points":[]},{"id":"data_relay_7.data:extract_v2_9.data","points":[]},{"id":"converge_8.converged:extract_v2_9.extract","points":[]},{"id":"data_relay_15.data:process_script_2.b","points":[]},{"id":"converge_9.converged:patch_json_v2_29.patch","points":[]},{"id":"process_script_2.a:converge_9.data","points":[]},{"id":"process_remote_function_v2_1.processed:converge_9.converge","points":[]},{"id":"filter_v2_1.items:for_each_v2_1.items","points":[]},{"id":"google_sheets_fetch_table_row_mapping_1.fetched:filter_v2_2.filter","points":[]},{"id":"filter_v2_2.filtered:map_table_rows_1.map","points":[]},{"id":"google_sheets_select_spreadsheet_id_v2_1.spreadsheet_id:google_sheets_update_table_rows_v2_2.spreadsheet_id","points":[]},{"id":"filter_v2_2.items:map_table_rows_1.rows","points":[]},{"id":"data_relay_13.data:patch_json_v2_27.value","points":[]},{"id":"patch_json_v2_27.patched:patch_json_v2_28.patch","points":[]},{"id":"patch_json_v2_27.data:patch_json_v2_28.data","points":[]},{"id":"extract_v2_5.data:if_v2_5.a","points":[]},{"id":"extract_v2_5.data:if_v2_6.a","points":[]},{"id":"fb_fetch_ad_v2_2.ad:patch_json_v2_24.value","points":[]},{"id":"patch_json_v2_24.data:fb_fetch_ad_creative_v2_1.ad_creative_id","points":[]},{"id":"fb_fetch_ad_v2_2.fetched:patch_json_v2_24.patch","points":[]},{"id":"patch_json_v2_24.patched:fb_fetch_ad_creative_v2_1.fetch","points":[]},{"id":"patch_json_v2_25.data:fb_fetch_ad_v2_2.ad_id","points":[]},{"id":"patch_json_v2_25.patched:fb_fetch_ad_v2_2.fetch","points":[]},{"id":"extract_v2_12.data:patch_json_v2_25.value","points":[]},{"id":"extract_v2_12.extracted:patch_json_v2_25.patch","points":[]},{"id":"extract_v2_5.extracted:if_v2_4.evaluate","points":[]},{"id":"if_v2_4.true:extract_v2_4.extract","points":[]},{"id":"extract_v2_4.data:parse_string_to_id_1.value","points":[]},{"id":"fb_fetch_adset_v2_1.adset:patch_json_v3_1.data","points":[]},{"id":"extract_v2_4.extracted:parse_string_to_id_1.parse","points":[]},{"id":"parse_string_to_id_1.parsed:fb_fetch_adset_v2_1.fetch","points":[]},{"id":"fb_fetch_adset_v2_1.fetched:patch_json_v3_1.patch","points":[]},{"id":"parse_string_to_id_1.result:fb_fetch_adset_v2_1.adset_id","points":[]},{"id":"if_v2_4.false:if_v2_6.evaluate","points":[]},{"id":"if_v2_6.false:if_v2_5.evaluate","points":[]},{"id":"if_v2_2.true:extract_v2_3.extract","points":[]},{"id":"extract_v2_3.data:parse_string_to_id_2.value","points":[]},{"id":"parse_string_to_id_2.result:fb_fetch_campaign_v2_1.campaign_id","points":[]},{"id":"fb_fetch_campaign_v2_1.campaign:patch_json_v3_5.data","points":[]},{"id":"extract_v2_3.extracted:parse_string_to_id_2.parse","points":[]},{"id":"parse_string_to_id_2.parsed:fb_fetch_campaign_v2_1.fetch","points":[]},{"id":"data_relay_6.data:if_v2_2.a","points":[]},{"id":"data_relay_6.data:if_v2_3.a","points":[]},{"id":"extract_v2_5.data:data_relay_6.data","points":[]},{"id":"present_3.true:patch_json_v2_15.patch","points":[]},{"id":"patch_json_v3_1.patched:extract_v2_8.extract","points":[]},{"id":"present_3.false:patch_json_v2_14.patch","points":[]},{"id":"patch_json_v2_14.patched:converge_6.converge","points":[]},{"id":"patch_json_v2_15.patched:converge_6.converge","points":[]},{"id":"patch_json_v2_15.data:converge_6.data","points":[]},{"id":"patch_json_v2_14.data:converge_6.data","points":[]},{"id":"converge_6.converged:extract_v2_10.extract","points":[]},{"id":"present_5.false:patch_json_v2_19.patch","points":[]},{"id":"patch_json_v2_19.data:converge_8.data","points":[]},{"id":"patch_json_v2_19.patched:converge_8.converge","points":[]},{"id":"patch_json_v2_18.data:converge_8.data","points":[]},{"id":"patch_json_v2_18.patched:converge_8.converge","points":[]},{"id":"extract_v2_6.data:patch_json_v2_11.value","points":[]},{"id":"present_1.true:patch_json_v2_11.patch","points":[]},{"id":"present_1.false:patch_json_v2_10.patch","points":[]},{"id":"patch_json_v2_11.data:converge_4.data","points":[]},{"id":"patch_json_v2_10.data:converge_4.data","points":[]},{"id":"patch_json_v2_10.patched:converge_4.converge","points":[]},{"id":"patch_json_v2_11.patched:converge_4.converge","points":[]},{"id":"converge_4.converged:extract_v2_7.extract","points":[]},{"id":"present_2.false:patch_json_v2_13.patch","points":[]},{"id":"converge_5.converged:trigger_relay_4.relay","points":[]},{"id":"patch_json_v2_13.data:converge_5.data","points":[]},{"id":"patch_json_v2_12.data:converge_5.data","points":[]},{"id":"patch_json_v2_12.patched:converge_5.converge","points":[]},{"id":"patch_json_v2_13.patched:converge_5.converge","points":[]},{"id":"present_2.true:patch_json_v2_12.patch","points":[]},{"id":"extract_v2_7.data:patch_json_v2_12.value","points":[]},{"id":"converge_4.data:data_relay_9.data","points":[]},{"id":"data_relay_9.data:patch_json_v2_13.data","points":[]},{"id":"data_relay_9.data:patch_json_v2_12.data","points":[]},{"id":"patch_json_v3_1.data:data_relay_10.data","points":[]},{"id":"data_relay_10.data:patch_json_v2_14.data","points":[]},{"id":"data_relay_10.data:patch_json_v2_15.data","points":[]},{"id":"extract_v2_8.data:patch_json_v2_15.value","points":[]},{"id":"data_relay_7.data:extract_v2_8.data","points":[]},{"id":"converge_6.data:data_relay_12.data","points":[]},{"id":"data_relay_12.data:patch_json_v2_19.data","points":[]},{"id":"data_relay_12.data:patch_json_v2_18.data","points":[]},{"id":"data_relay_8.data:patch_json_v2_11.data","points":[]},{"id":"data_relay_8.data:patch_json_v2_10.data","points":[]},{"id":"converge_3.data:fb_create_adset_v4_1.data","points":[]},{"id":"converge_3.converged:fb_create_adset_v4_1.create","points":[]},{"id":"converge_5.data:patch_json_v2_9.data","points":[]},{"id":"if_v2_3.false:patch_json_v2_9.patch","points":[]},{"id":"patch_json_v2_9.data:converge_3.data","points":[]},{"id":"patch_json_v2_9.patched:converge_3.converge","points":[]},{"id":"fb_create_campaign_v4_1.campaign_id:patch_json_v3_6.value","points":[]},{"id":"data_relay_1.data:extract_v2_3.data","points":[]},{"id":"converge_5.data:data_relay_1.data","points":[]},{"id":"patch_json_v3_6.data:converge_3.data","points":[]},{"id":"patch_json_v3_6.patched:converge_3.converge","points":[]},{"id":"if_v2_6.true:patch_json_v2_7.patch","points":[]},{"id":"data_relay_5.data:patch_json_v2_7.data","points":[]},{"id":"patch_json_v2_7.patched:converge_2.converge","points":[]},{"id":"data_relay_5.data:patch_json_v2_8.data","points":[]},{"id":"patch_json_v2_7.data:converge_2.data","points":[]},{"id":"patch_json_v2_8.data:converge_2.data","points":[]},{"id":"converge_2.converged:trigger_relay_3.relay","points":[]},{"id":"for_each_v2_1.do:trigger_relay_1.relay","points":[]},{"id":"trigger_relay_5.relayed:extract_v2_11.extract","points":[]},{"id":"converge_2.data:extract_v2_11.data","points":[]},{"id":"patch_json_v2_29.data:data_relay_21.data","points":[]},{"id":"data_relay_21.data:patch_json_v2_38.data","points":[]},{"id":"extract_v2_17.data:patch_json_v2_38.value","points":[]},{"id":"data_relay_13.data:extract_v2_17.data","points":[]},{"id":"patch_json_v2_29.patched:extract_v2_17.extract","points":[]},{"id":"patch_json_v2_38.data:converge_12.data","points":[]},{"id":"patch_json_v2_37.data:converge_12.data","points":[]},{"id":"patch_json_v2_37.patched:converge_12.converge","points":[]},{"id":"patch_json_v2_38.patched:converge_12.converge","points":[]},{"id":"extract_v2_17.data:present_7.data","points":[]},{"id":"extract_v2_17.extracted:present_7.check","points":[]},{"id":"data_relay_21.data:patch_json_v2_37.data","points":[]},{"id":"present_7.true:patch_json_v2_38.patch","points":[]},{"id":"present_7.false:patch_json_v2_37.patch","points":[]},{"id":"fb_create_adset_v4_1.adset_id:fb_fetch_adset_v2_2.adset_id","points":[]},{"id":"fb_create_adset_v4_1.created:fb_fetch_adset_v2_2.fetch","points":[]},{"id":"if_v2_5.true:patch_json_v2_8.patch","points":[]},{"id":"if_v2_5.false:trigger_relay_2.relay","points":[]},{"id":"google_sheets_update_table_rows_v2_2.updated:patch_json_v2_8.patch","points":[]},{"id":"patch_json_v2_8.patched:converge_2.converge","points":[]},{"id":"data_relay_15.data:process_remote_function_v2_1.a","points":[]},{"id":"fb_fetch_ad_creative_v2_1.ad_creative:data_relay_15.data","points":[]},{"id":"converge_9.data:patch_json_v2_29.value","points":[]},{"id":"process_remote_function_v2_1.a:converge_9.data","points":[]},{"id":"process_script_2.processed:converge_9.converge","points":[]},{"id":"extract_v2_10.data:process_script_1.a","points":[]},{"id":"present_5.true:process_script_1.process","points":[]},{"id":"process_script_1.a:patch_json_v2_18.value","points":[]},{"id":"process_script_1.processed:patch_json_v2_18.patch","points":[]},{"id":"fb_fetch_ad_creative_v2_1.fetched:patch_json_v2_23.patch","points":[]},{"id":"patch_json_v2_23.patched:trigger_relay_6.relay","points":[]},{"id":"converge_11.data:patch_json_v2_27.data","points":[]},{"id":"patch_json_v2_31.data:converge_10.data","points":[]},{"id":"patch_json_v2_31.patched:converge_10.converge","points":[]},{"id":"extract_v2_14.data:present_6.data","points":[]},{"id":"extract_v2_14.extracted:present_6.check","points":[]},{"id":"data_relay_16.data:patch_json_v2_31.data","points":[]},{"id":"present_6.false:patch_json_v2_31.patch","points":[]},{"id":"data_relay_16.data:patch_json_v3_2.data","points":[]},{"id":"present_6.true:patch_json_v3_2.patch","points":[]},{"id":"patch_json_v3_2.data:converge_10.data","points":[]},{"id":"patch_json_v3_2.patched:converge_10.converge","points":[]},{"id":"extract_v2_14.data:patch_json_v3_2.value","points":[]},{"id":"patch_json_v2_34.data:converge_11.data","points":[]},{"id":"patch_json_v2_34.patched:converge_11.converge","points":[]},{"id":"data_relay_18.data:patch_json_v2_34.data","points":[]},{"id":"data_relay_18.data:patch_json_v3_4.data","points":[]},{"id":"patch_json_v3_4.data:converge_11.data","points":[]},{"id":"patch_json_v3_4.patched:converge_11.converge","points":[]},{"id":"converge_10.data:data_relay_18.data","points":[]},{"id":"converge_10.converged:extract_v2_15.extract","points":[]},{"id":"extract_v2_15.data:if_v2_8.a","points":[]},{"id":"if_v2_8.false:if_v2_9.evaluate","points":[]},{"id":"extract_v2_15.data:if_v2_9.a","points":[]},{"id":"if_v2_9.false:patch_json_v2_34.patch","points":[]},{"id":"data_relay_17.data:extract_v2_15.data","points":[]},{"id":"fb_create_canvas_2.canvas_id:patch_json_v3_4.value","points":[]},{"id":"fb_create_canvas_2.created:patch_json_v3_4.patch","points":[]},{"id":"data_relay_18.data:patch_json_v2_33.value","points":[]},{"id":"extract_v2_15.extracted:patch_json_v2_33.patch","points":[]},{"id":"patch_json_v2_33.patched:if_v2_8.evaluate","points":[]},{"id":"patch_json_v2_33.data:fb_create_canvas_1.page_id","points":[]},{"id":"data_relay_19.data:fb_create_page_photo_1.page_id","points":[]},{"id":"data_relay_19.data:fb_create_canvas_2.page_id","points":[]},{"id":"if_v2_8.true:trigger_relay_7.relay","points":[]},{"id":"patch_json_v2_33.data:data_relay_19.data","points":[]},{"id":"data_relay_20.data:extract_v2_16.data","points":[]},{"id":"fb_create_page_photo_1.page_photo_id:patch_json_v2_35.value","points":[]},{"id":"patch_json_v2_35.patched:fb_create_canvas_2.create","points":[]},{"id":"patch_json_v2_36.data:patch_json_v2_35.data","points":[]},{"id":"patch_json_v2_36.patched:patch_json_v2_35.patch","points":[]},{"id":"data_relay_20.data:patch_json_v2_36.value","points":[]},{"id":"trigger_relay_7.relayed:extract_v2_16.extract","points":[]},{"id":"data_relay_17.data:data_relay_20.data","points":[]},{"id":"patch_json_v2_35.data:fb_create_canvas_2.data","points":[]},{"id":"fb_create_page_photo_1.created:patch_json_v2_36.patch","points":[]},{"id":"patch_json_v3_3.data:converge_11.data","points":[]},{"id":"data_relay_18.data:patch_json_v3_3.data","points":[]},{"id":"fb_create_canvas_1.canvas_id:patch_json_v3_3.value","points":[]},{"id":"patch_json_v2_32.data:fb_create_canvas_1.data","points":[]},{"id":"patch_json_v2_32.patched:fb_create_canvas_1.create","points":[]},{"id":"extract_v2_16.data:fb_create_page_photo_1.url","points":[]},{"id":"extract_v2_16.extracted:fb_create_page_photo_1.create","points":[]},{"id":"patch_json_v3_3.patched:converge_11.converge","points":[]},{"id":"fb_create_canvas_1.created:patch_json_v3_3.patch","points":[]},{"id":"if_v2_9.true:patch_json_v2_32.patch","points":[]},{"id":"data_relay_17.data:patch_json_v2_32.value","points":[]},{"id":"converge_11.converged:patch_json_v2_27.patch","points":[]},{"id":"extract_v2_11.data:patch_json_v2_23.data","points":[]},{"id":"patch_json_v2_23.data:data_relay_13.data","points":[]},{"id":"data_relay_13.data:extract_v2_14.data","points":[]},{"id":"input_boolean_1.boolean:patch_json_v2_23.value","points":[]},{"id":"data_relay_13.data:data_relay_17.data","points":[]},{"id":"data_relay_22.data:patch_json_v2_40.data","points":[]},{"id":"extract_v2_18.data:patch_json_v2_40.value","points":[]},{"id":"patch_json_v2_40.data:converge_13.data","points":[]},{"id":"patch_json_v2_39.data:converge_13.data","points":[]},{"id":"patch_json_v2_39.patched:converge_13.converge","points":[]},{"id":"patch_json_v2_40.patched:converge_13.converge","points":[]},{"id":"extract_v2_18.data:present_8.data","points":[]},{"id":"extract_v2_18.extracted:present_8.check","points":[]},{"id":"data_relay_22.data:patch_json_v2_39.data","points":[]},{"id":"present_8.true:patch_json_v2_40.patch","points":[]},{"id":"present_8.false:patch_json_v2_39.patch","points":[]},{"id":"converge_13.data:data_relay_16.data","points":[]},{"id":"converge_12.converged:extract_v2_18.extract","points":[]},{"id":"data_relay_13.data:extract_v2_18.data","points":[]},{"id":"data_relay_2.data:patch_json_v2_2.data","points":[]},{"id":"patch_json_v2_2.data:patch_json_v2_1.value","points":[]},{"id":"patch_json_v2_2.patched:patch_json_v2_1.patch","points":[]},{"id":"patch_json_v2_1.patched:unmap_table_rows_1.unmap","points":[]},{"id":"patch_json_v2_1.data:unmap_table_rows_1.mapped_rows","points":[]},{"id":"unmap_table_rows_1.rows:google_sheets_update_table_rows_v2_1.rows","points":[]},{"id":"unmap_table_rows_1.unmapped:google_sheets_update_table_rows_v2_1.update","points":[]},{"id":"fb_fetch_ad_v2_1.ad:patch_json_v2_5.value","points":[]},{"id":"fb_fetch_ad_v2_1.fetched:patch_json_v2_5.patch","points":[]},{"id":"converge_1.converged:patch_json_v2_2.patch","points":[]},{"id":"converge_1.data:patch_json_v2_2.value","points":[]},{"id":"patch_json_v2_5.data:converge_1.data","points":[]},{"id":"patch_json_v2_3.patched:converge_1.converge","points":[]},{"id":"patch_json_v2_3.data:converge_1.data","points":[]},{"id":"patch_json_v2_5.patched:converge_1.converge","points":[]},{"id":"for_each_v2_1.item:data_relay_2.data","points":[]},{"id":"google_sheets_fetch_table_row_mapping_1.mapping:unmap_table_rows_1.mapping","points":[]},{"id":"google_sheets_select_spreadsheet_id_v2_1.spreadsheet_id:google_sheets_update_table_rows_v2_1.spreadsheet_id","points":[]},{"id":"patch_json_v2_4.patched:converge_1.converge","points":[]},{"id":"patch_json_v2_4.data:converge_1.data","points":[]},{"id":"fb_create_adset_v4_1.error:patch_json_v2_4.value","points":[]},{"id":"fb_create_adset_v4_1.failed:patch_json_v2_4.patch","points":[]},{"id":"patch_json_v2_6.patched:converge_1.converge","points":[]},{"id":"patch_json_v2_6.data:converge_1.data","points":[]},{"id":"fb_create_campaign_v4_1.failed:patch_json_v2_6.patch","points":[]},{"id":"fb_create_campaign_v4_1.error:patch_json_v2_6.value","points":[]},{"id":"converge_1.data:extract_v2_1.data","points":[]},{"id":"google_sheets_update_table_rows_v2_1.updated:extract_v2_1.extract","points":[]},{"id":"extract_v2_1.data:if_v2_1.a","points":[]},{"id":"extract_v2_1.extracted:if_v2_1.evaluate","points":[]},{"id":"if_v2_1.false:for_each_v2_1.next","points":[]},{"id":"data_relay_1.data:patch_json_v3_7.data","points":[]},{"id":"patch_json_v3_5.data:patch_json_v3_7.value","points":[]},{"id":"fb_create_campaign_v4_1.created:patch_json_v3_7.patch","points":[]},{"id":"patch_json_v3_7.data:patch_json_v3_6.data","points":[]},{"id":"patch_json_v3_7.patched:patch_json_v3_6.patch","points":[]},{"id":"if_v2_3.true:patch_json_v3_7.patch","points":[]},{"id":"fb_create_ad_v4_1.error:extract_v2_19.data","points":[]},{"id":"extract_v2_19.data:if_v2_10.b","points":[]},{"id":"extract_v2_19.extracted:if_v2_10.evaluate","points":[]},{"id":"fb_create_ad_v4_1.failed:extract_v2_19.extract","points":[]},{"id":"if_v2_10.true:process_script_3.process","points":[]},{"id":"patch_json_v3_8.data:process_script_3.a","points":[]},{"id":"patch_json_v3_8.patched:converge_14.converge","points":[]},{"id":"patch_json_v3_8.data:converge_14.data","points":[]},{"id":"process_script_3.processed:converge_14.converge","points":[]},{"id":"process_script_3.a:converge_14.data","points":[]},{"id":"converge_14.converged:fb_create_ad_v4_1.create","points":[]},{"id":"converge_14.data:fb_create_ad_v4_1.data","points":[]},{"id":"patch_json_v2_30.patched:patch_json_v3_8.patch","points":[]},{"id":"patch_json_v2_30.data:patch_json_v3_8.data","points":[]},{"id":"fb_create_ad_v4_1.ad_id:fb_fetch_ad_v2_1.ad_id","points":[]},{"id":"fb_create_ad_v4_1.error:patch_json_v2_3.value","points":[]},{"id":"fb_create_ad_v4_1.created:fb_fetch_ad_v2_1.fetch","points":[]},{"id":"if_v2_10.false:patch_json_v2_3.patch","points":[]}],"groups":{"group_1":{"title":"Update Sheet","description":"","x":1537,"y":356,"inputs":["unmap_table_rows_1.mapping","google_sheets_update_table_rows_v2_1.spreadsheet_id","fb_fetch_ad_v2_1.fetch","fb_fetch_ad_v2_1.ad_id","data_relay_2.data","patch_json_v2_3.patch","patch_json_v2_3.value","patch_json_v2_4.patch","patch_json_v2_4.value","patch_json_v2_6.value","patch_json_v2_6.patch"],"outputs":["if_v2_1.true","if_v2_1.false"]},"group_4":{"title":"Get Spreadsheet data \u0026 validate","description":"","x":220,"y":324,"inputs":["google_sheets_select_spreadsheet_id_v2_1.spreadsheet_id","google_sheets_select_spreadsheet_id_v2_1.range","replace_string_1.replace"],"outputs":["google_sheets_select_spreadsheet_id_v2_1.spreadsheet_id","google_sheets_fetch_table_row_mapping_1.mapping","filter_v2_1.items","filter_v2_1.filtered"]},"group_6":{"title":"Optionally, Create Adset","description":"","x":877,"y":329,"inputs":["data_relay_5.data","trigger_relay_1.relay","google_sheets_update_table_rows_v2_2.spreadsheet_id","unmap_table_rows_2.mapping"],"outputs":["trigger_relay_3.relayed","trigger_relay_2.relayed","converge_2.data","fb_create_adset_v4_1.error","fb_create_adset_v4_1.failed","fb_create_campaign_v4_1.error","fb_create_campaign_v4_1.failed"]},"group_18":{"title":"Create Ad from Template","description":"","x":1207,"y":405,"inputs":["extract_v2_11.data","trigger_relay_5.relay"],"outputs":["fb_create_ad_v4_1.ad_id","fb_create_ad_v4_1.error","if_v2_10.false","fb_create_ad_v4_1.created"]},"group_27":{"title":"Create PAC Video Ad","description":"","x":4705,"y":2987},"group_28":{"title":"Create PAC Video Ad","description":"","x":4352,"y":2997},"group_5":{"title":"Fetch Spreadsheet data","description":"","x":404,"y":252,"group":"group_4","inputs":["replace_string_1.replace","google_sheets_select_spreadsheet_id_v2_1.spreadsheet_id","google_sheets_select_spreadsheet_id_v2_1.range"],"outputs":["map_table_rows_1.mapped_rows","map_table_rows_1.mapped","google_sheets_fetch_table_row_mapping_1.mapping","google_sheets_select_spreadsheet_id_v2_1.spreadsheet_id"]},"group_7":{"title":"Create campaign (optional)","description":"","x":1358,"y":183,"group":"group_6","inputs":["patch_json_v2_9.data","patch_json_v3_5.value","data_relay_1.data","data_relay_6.data","if_v2_2.evaluate"],"outputs":["converge_3.data","converge_3.converged","fb_create_campaign_v4_1.error","fb_create_campaign_v4_1.failed"]},"group_8":{"title":"Control Flow 2","description":"","x":332,"y":378,"group":"group_7","inputs":["if_v2_2.evaluate","data_relay_6.data"],"outputs":["if_v2_2.true","if_v2_3.true","if_v2_3.false"]},"group_2":{"title":"Create campaign","description":"","x":682,"y":192,"group":"group_7","inputs":["extract_v2_3.extract","patch_json_v3_5.value","data_relay_1.data","patch_json_v3_7.patch"],"outputs":["patch_json_v3_6.data","patch_json_v3_6.patched","fb_create_campaign_v4_1.error","fb_create_campaign_v4_1.failed"]},"group_3":{"title":"Get Template Adset","description":"","x":801,"y":208,"group":"group_6","inputs":["extract_v2_4.data","extract_v2_4.extract"],"outputs":["fb_fetch_adset_v2_1.adset","fb_fetch_adset_v2_1.fetched"]},"group_9":{"title":"Control Flow","description":"","x":551,"y":358,"group":"group_6","inputs":["extract_v2_5.data","extract_v2_5.extract"],"outputs":["extract_v2_5.data","if_v2_4.true","if_v2_5.true","if_v2_6.true","if_v2_5.false"]},"group_10":{"title":"Merge Adset Values","description":"","x":1073,"y":197,"group":"group_6","inputs":["patch_json_v3_1.data","patch_json_v3_1.patch","data_relay_7.data"],"outputs":["trigger_relay_4.relayed","converge_5.data"]},"group_11":{"title":"Update Age Min","description":"","x":1639,"y":306,"group":"group_10","inputs":["extract_v2_6.extract","extract_v2_6.data","data_relay_8.data"],"outputs":["converge_4.data","converge_4.converged"]},"group_12":{"title":"Update Age Max","description":"","x":1895,"y":313,"group":"group_10","inputs":["data_relay_9.data","extract_v2_7.extract","extract_v2_7.data"],"outputs":["converge_5.converged","converge_5.data"]},"group_13":{"title":"Update Daily Budget (optional)","description":"","x":649,"y":254,"group":"group_10","inputs":["extract_v2_8.extract","data_relay_10.data","extract_v2_8.data"],"outputs":["converge_6.data","converge_6.converged"]},"group_14":{"title":"Update Adset DCO (optional)","description":"","x":1343,"y":271,"group":"group_10","inputs":["extract_v2_9.data","extract_v2_9.extract","data_relay_11.data"],"outputs":["converge_7.data","converge_7.converged"]},"group_15":{"title":"Update Adset Targeting","description":"","x":979,"y":272,"group":"group_10","inputs":["extract_v2_10.data","extract_v2_10.extract","data_relay_12.data"],"outputs":["converge_8.data","converge_8.converged"]},"group_16":{"title":"Update Sheet","description":"","x":1892,"y":164,"group":"group_6","inputs":["patch_json_v2_20.data","unmap_table_rows_2.mapping","google_sheets_update_table_rows_v2_2.spreadsheet_id","fb_fetch_adset_v2_2.adset_id","fb_fetch_adset_v2_2.fetch"],"outputs":["google_sheets_update_table_rows_v2_2.updated"]},"group_17":{"title":"Update Sheet","description":"","x":1455,"y":434,"group":"group_16","inputs":["patch_json_v2_20.data","patch_json_v2_20.patch","google_sheets_update_table_rows_v2_2.spreadsheet_id","patch_json_v2_22.value","unmap_table_rows_2.mapping"],"outputs":["google_sheets_update_table_rows_v2_2.updated"]},"group_19":{"title":"Get Template Ad","description":"","x":1039,"y":362,"group":"group_18","inputs":["patch_json_v2_25.value","patch_json_v2_25.patch"],"outputs":["fb_fetch_ad_v2_2.ad","fb_fetch_ad_creative_v2_1.ad_creative","fb_fetch_ad_creative_v2_1.fetched"]},"group_20":{"title":"Combine data","description":"","x":1716,"y":538,"group":"group_18","inputs":["data_relay_13.data","data_relay_14.data","trigger_relay_6.relay","data_relay_15.data"],"outputs":["patch_json_v2_30.data","patch_json_v2_30.patched"]},"group_21":{"title":"Add Post Id (optional)","description":"","x":2219,"y":593,"group":"group_20","inputs":["data_relay_16.data","extract_v2_14.data","extract_v2_14.extract"],"outputs":["converge_10.data","converge_10.converged"]},"group_22":{"title":"Add Canvas (optional)","description":"","x":2457,"y":613,"group":"group_20","inputs":["data_relay_18.data","extract_v2_15.extract","data_relay_17.data"],"outputs":["converge_11.data","converge_11.converged"]},"group_23":{"title":"Create Image Canvas","description":"","x":1285,"y":284,"group":"group_22","inputs":["data_relay_19.data","trigger_relay_7.relay","data_relay_20.data"],"outputs":["fb_create_canvas_2.created","fb_create_canvas_2.canvas_id"]},"group_24":{"title":"Update Ad Status (optional)","description":"","x":1739,"y":563,"group":"group_20","inputs":["data_relay_21.data","extract_v2_17.data","extract_v2_17.extract"],"outputs":["converge_12.data","converge_12.converged"]},"group_25":{"title":"Update UTM params (optional)","description":"","x":1980,"y":574,"group":"group_20","inputs":["data_relay_22.data","extract_v2_18.data","extract_v2_18.extract"],"outputs":["converge_13.data","converge_13.converged"]},"group_26":{"title":"Create Facebook Ad","description":"","x":1991,"y":630,"group":"group_18","inputs":["patch_json_v3_8.data","patch_json_v3_8.patch"],"outputs":["fb_create_ad_v4_1.ad_id","fb_create_ad_v4_1.error","fb_create_ad_v4_1.created","if_v2_10.false"]}},"widgets":{"widget_1":{"title":"Spreadsheet","description":"The spreadsheet to fetch from","position":1,"input":"google_sheets_select_spreadsheet_id_v2_1.spreadsheet_id"},"widget_2":{"title":"Range / Tab","description":"The range in A1 notation to fetch","position":2,"icon":"las la-table","input":"google_sheets_select_spreadsheet_id_v2_1.range"},"widget_3":{"title":"Remove Story Text","description":"Remove text from story placements","position":10,"icon":"la la-instagram","options":[{"data":true,"title":"TRUE"},{"data":false,"title":"FALSE"}],"input":"input_boolean_1.boolean"}},"variables":{},"config":{"capture_inputs_enabled":false,"caching_enabled":false},"tags":[]}
- Export Adsets into sheet
{"name":"Export Adsets","description":"export_adsets_gsheets_20230130","nodes":{"extract_v2_1":{"type":"extract_v2","logging_enabled":false,"error_rules":[],"x":809,"y":162,"group":"group_1","inputs":{"default_value":{"export_enabled":true,"data":[{"operator":"contains","pointer":"/campaign_name","value":""}]},"pointer":{"export_enabled":true,"data":""}}},"patch_json_list_v3_1":{"type":"patch_json_list_v3","logging_enabled":false,"error_rules":[],"x":539,"y":166,"group":"group_1","inputs":{"patches":{"export_enabled":true,"data":[{"op":"add","path":"/adset_name","value":"{{inputData(\"/name\")}}"},{"op":"remove","path":"/name"},{"op":"add","path":"/campaign_name","value":"{{inputData(\"/campaign/name\")}}"}]},"value":{"export_enabled":true}}},"filter_v2_1":{"type":"filter_v2","logging_enabled":false,"error_rules":[],"x":1065,"y":162,"group":"group_1"},"fb_select_ad_account_ids_v2_1":{"type":"fb_select_ad_account_ids_v2","logging_enabled":false,"error_rules":[],"x":66,"y":263,"group":"group_2"},"fb_fetch_campaign_ids_v2_1":{"type":"fb_fetch_campaign_ids_v2","logging_enabled":false,"error_rules":[],"x":347,"y":301,"group":"group_2","inputs":{"effective_status":{"title":"campaign_status","description":"effective status of campaigns","export_enabled":true,"data":["ACTIVE","PAUSED"]},"is_completed":{"export_enabled":true,"data":false}}},"fb_fetch_campaign_adset_ids_v2_1":{"type":"fb_fetch_campaign_adset_ids_v2","logging_enabled":false,"error_rules":[],"x":1015,"y":273,"group":"group_2","inputs":{"effective_status":{"title":"adset_status","description":"effective status of adset","export_enabled":true,"data":["ACTIVE","PAUSED"]},"is_completed":{"export_enabled":true,"data":false}}},"fb_fetch_campaigns_v2_1":{"type":"fb_fetch_campaigns_v2","logging_enabled":false,"error_rules":[],"x":688,"y":609,"group":"group_2"},"google_sheets_select_spreadsheet_id_v2_1":{"type":"google_sheets_select_spreadsheet_id_v2","logging_enabled":false,"error_rules":[],"x":248,"y":64,"group":"group_3","inputs":{"range":{"title":" range","description":"The range in A1 notation to fetch","export_enabled":true},"spreadsheet_id":{"title":" spreadsheet_id","description":"The spreadsheet to fetch from"}}},"google_sheets_clear_table_rows_v3_1":{"type":"google_sheets_clear_table_rows_v3","logging_enabled":false,"error_rules":[],"x":668,"y":355,"group":"group_3"},"google_sheets_append_table_rows_v3_1":{"type":"google_sheets_append_table_rows_v3","title":"Append Google Spreadsheet Rows","description":"Append table rows to a Google Spreadsheet","logging_enabled":true,"error_rules":[],"x":1037,"y":471,"group":"group_3"},"map_any_to_table_rows_1":{"type":"map_any_to_table_rows","logging_enabled":false,"error_rules":[],"x":213,"y":394,"group":"group_3","inputs":{"add_header":{"export_enabled":true,"data":true},"mapping":{"title":" mapping","description":"Mapping for columns to data paths","export_enabled":true,"data":{"A":"/id","B":"/adset_name","C":"/campaign/id","D":"/campaign_name","E":"/status"}},"schema":{"export_enabled":true,"data":"fb_adsets"},"map":{"title":"map","description":"Starts the mapping"}}},"start_1":{"type":"start","logging_enabled":false,"error_rules":[],"x":42,"y":245},"stop_1":{"type":"stop","logging_enabled":false,"error_rules":[],"x":1140,"y":388},"fb_fetch_adsets_v2_1":{"type":"fb_fetch_adsets_v2","logging_enabled":false,"error_rules":[],"x":1411,"y":288,"group":"group_2"},"join_data_1":{"type":"join_data","logging_enabled":false,"error_rules":[],"x":1718,"y":444,"group":"group_2","inputs":{"conditions":{"export_enabled":true,"data":[{"a":"/campaign_id","b":"/id"}]},"target":{"export_enabled":true,"data":"/campaign"}},"outputs":{"items":{"title":"adsets","description":"joined arrays by conditions and selection"}}},"build_filter_v2_1":{"type":"build_filter_v2","logging_enabled":false,"error_rules":[],"x":541,"y":455,"group":"group_1","inputs":{"filters":{"export_enabled":true,"data":[{"operator":"contains","pointer":"/campaign_name","value":""}]}}}},"edges":[{"id":"patch_json_list_v3_1.data_list:filter_v2_1.items","points":[]},{"id":"filter_v2_1.items:map_any_to_table_rows_1.data","points":[]},{"id":"filter_v2_1.filtered:map_any_to_table_rows_1.map","points":[]},{"id":"fb_fetch_campaign_ids_v2_1.campaign_ids:fb_fetch_campaign_adset_ids_v2_1.campaign_ids","points":[]},{"id":"google_sheets_select_spreadsheet_id_v2_1.range:google_sheets_clear_table_rows_v3_1.range","points":[]},{"id":"google_sheets_select_spreadsheet_id_v2_1.spreadsheet_id:google_sheets_clear_table_rows_v3_1.spreadsheet_id","points":[]},{"id":"fb_fetch_campaign_adset_ids_v2_1.adset_ids:fb_fetch_adsets_v2_1.adset_ids","points":[]},{"id":"fb_fetch_campaign_adset_ids_v2_1.fetched:fb_fetch_adsets_v2_1.fetch","points":[]},{"id":"google_sheets_clear_table_rows_v3_1.cleared:google_sheets_append_table_rows_v3_1.append","points":[]},{"id":"map_any_to_table_rows_1.mapped:google_sheets_clear_table_rows_v3_1.clear","points":[]},{"id":"map_any_to_table_rows_1.rows:google_sheets_append_table_rows_v3_1.rows","points":[]},{"id":"google_sheets_select_spreadsheet_id_v2_1.range:google_sheets_append_table_rows_v3_1.range","points":[]},{"id":"google_sheets_select_spreadsheet_id_v2_1.spreadsheet_id:google_sheets_append_table_rows_v3_1.spreadsheet_id","points":[]},{"id":"fb_select_ad_account_ids_v2_1.ad_account_ids:fb_fetch_campaign_ids_v2_1.ad_account_ids","points":[]},{"id":"start_1.start:fb_fetch_campaign_ids_v2_1.fetch","points":[]},{"id":"google_sheets_append_table_rows_v3_1.appended:stop_1.stop","points":[]},{"id":"fb_fetch_campaign_ids_v2_1.campaign_ids:fb_fetch_campaigns_v2_1.campaign_ids","points":[]},{"id":"fb_fetch_campaigns_v2_1.fetched:fb_fetch_campaign_adset_ids_v2_1.fetch","points":[]},{"id":"fb_fetch_campaign_ids_v2_1.fetched:fb_fetch_campaigns_v2_1.fetch","points":[]},{"id":"fb_fetch_adsets_v2_1.fetched:join_data_1.join","points":[]},{"id":"fb_fetch_adsets_v2_1.adsets:join_data_1.a","points":[]},{"id":"fb_fetch_campaigns_v2_1.campaigns:join_data_1.b","points":[]},{"id":"join_data_1.items:patch_json_list_v3_1.data_list","points":[]},{"id":"join_data_1.joined:patch_json_list_v3_1.patch","points":[]},{"id":"build_filter_v2_1.filters:extract_v2_1.data","points":[]},{"id":"patch_json_list_v3_1.patched:extract_v2_1.extract","points":[]},{"id":"extract_v2_1.data:filter_v2_1.filters","points":[]},{"id":"extract_v2_1.extracted:filter_v2_1.filter","points":[]}],"groups":{"group_1":{"title":"Filter by Name (Optional)","description":"","x":558,"y":170,"inputs":["patch_json_list_v3_1.data_list","patch_json_list_v3_1.patch"],"outputs":["filter_v2_1.filtered","filter_v2_1.items"]},"group_2":{"title":"Get Facebook Data","description":"","x":282,"y":169,"inputs":["fb_fetch_campaign_ids_v2_1.fetch","fb_select_ad_account_ids_v2_1.ad_account_ids","fb_fetch_campaign_adset_ids_v2_1.effective_status","fb_fetch_campaign_ids_v2_1.effective_status"],"outputs":["join_data_1.items","join_data_1.joined"]},"group_3":{"title":"Update Google Spreadsheet","description":"","x":837,"y":170,"inputs":["map_any_to_table_rows_1.map","map_any_to_table_rows_1.data","google_sheets_select_spreadsheet_id_v2_1.spreadsheet_id","map_any_to_table_rows_1.mapping","google_sheets_select_spreadsheet_id_v2_1.range"],"outputs":["google_sheets_append_table_rows_v3_1.appended"]}},"widgets":{"widget_1":{"title":"Spreadsheet","description":"The spreadsheet to fetch from","position":1,"input":"google_sheets_select_spreadsheet_id_v2_1.spreadsheet_id"},"widget_2":{"title":"Ad Accounts","description":"Select one or more Facebook Accounts","position":0,"input":"fb_select_ad_account_ids_v2_1.ad_account_ids"},"widget_3":{"title":"Campaign","description":"effective status of campaigns","position":5,"input":"fb_fetch_campaign_ids_v2_1.effective_status"},"widget_4":{"title":"Tab","description":"The range in A1 notation to fetch","position":1,"input":"google_sheets_select_spreadsheet_id_v2_1.range"},"widget_5":{"title":"filters","description":"If any ad object matches this set of conditions, the rule will be applied.\n\nUse these fields with `Contains`, `Not contains`:\n`/campaign_name` (string)\n`/adset_name` (string)\n","position":6,"input":"build_filter_v2_1.filters"}},"variables":{},"config":{"capture_inputs_enabled":false,"caching_enabled":false},"tags":[]}
- Export Ad IDs into sheet
{"name":"Export Ad IDs","description":"export_ad_ids_gsheets_20231024","nodes":{"fb_select_ad_ids_v2_1":{"type":"fb_select_ad_ids_v2","logging_enabled":false,"error_rules":[],"x":289,"y":112,"inputs":{"ad_ids":{"export_enabled":true,"data":[{"id":"23847895248660699","context":{"ad_account_id":{"id":"1135934886600327","context":{"business":{"id":"999246123544891","name":"kitchn.io"},"ui":{"id":"act_1135934886600327","account_id":"1135934886600327","name":"Kitchn.io Demo Account","business":{"id":"999246123544891","name":"kitchn.io"},"user_tasks":["DRAFT","ANALYZE","ADVERTISE"]}},"provider":"facebook","type":"ad_account"},"ui":{"id":"23847895248660699","account_id":"1135934886600327","name":"[TEMPLATE AD]","creative":{"thumbnail_url":"https://external-fra3-2.xx.fbcdn.net/emg1/v/t13/7540313399544001141?url=https%3A%2F%2Fwww.facebook.com%2Fads%2Fimage%2F%3Fd%3DAQJfcu0LVMDfpsudtG2QmtR-0iz38W9Bbi8hDJfzWsvTucVPk0f8opTEtlTBTrKDAHN_H-Q_tsuTrEsOZPahDn7d0m0mOcxXqTuGzDw-DeDaHkOTMt2JhF8q5mIEV5SSFnwqHfnUtAe8YBlZaR0dWYXz\u0026fb_obo=1\u0026utld=facebook.com\u0026stp=c0.5000x0.5000f_dst-emg0_p64x64_q75\u0026ccb=13-1\u0026oh=06_AbF5wybpKmdPxjYnyjdSBI7BdD5t6pk9IAq7wNDT0ACnxQ\u0026oe=6538FE60\u0026_nc_sid=31d854","id":"23848642574070699"},"campaign":{"name":"180621 - EU - Conversions - nonCBO","id":"23847895248570699"},"adset":{"name":"[TEMPLATE]","id":"23847895248640699"}}},"provider":"facebook","type":"ad"},{"id":"23847915953740699","context":{"ad_account_id":{"id":"1135934886600327","context":{"business":{"id":"999246123544891","name":"kitchn.io"},"ui":{"id":"act_1135934886600327","account_id":"1135934886600327","name":"Kitchn.io Demo Account","business":{"id":"999246123544891","name":"kitchn.io"},"user_tasks":["DRAFT","ANALYZE","ADVERTISE"]}},"provider":"facebook","type":"ad_account"},"ui":{"id":"23847915953740699","account_id":"1135934886600327","name":"Single_VID_bac-gif1.7_B001_H001__BAC-DE","creative":{"thumbnail_url":"https://scontent-fra3-2.xx.fbcdn.net/v/t15.5256-10/201041196_165712675604654_1600829105567511379_n.jpg?_nc_cat=104\u0026ccb=1-7\u0026_nc_ohc=-ZA5SR2T0KUAX-QaAme\u0026_nc_ht=scontent-fra3-2.xx\u0026edm=AOgd6ZUEAAAA\u0026stp=c0.5000x0.5000f_dst-emg0_p64x64_q75\u0026ur=1a7029\u0026_nc_sid=58080a\u0026oh=00_AfDZXPAkL-TUA4olcOX4PzdK77gvnnN4I5ftZcpEkDhFVg\u0026oe=653BFD89","id":"23847915981800699"},"campaign":{"name":"180621 - EU - Conversions - nonCBO","id":"23847895248570699"},"adset":{"name":"03 - DE - LAL3%top25visitors - Intent - lowestcost - EN","id":"23847895804630699"}}},"provider":"facebook","type":"ad"},{"id":"23847915958580699","context":{"ad_account_id":{"id":"1135934886600327","context":{"business":{"id":"999246123544891","name":"kitchn.io"},"ui":{"id":"act_1135934886600327","account_id":"1135934886600327","name":"Kitchn.io Demo Account","business":{"id":"999246123544891","name":"kitchn.io"},"user_tasks":["DRAFT","ANALYZE","ADVERTISE"]}},"provider":"facebook","type":"ad_account"},"ui":{"id":"23847915958580699","account_id":"1135934886600327","name":"Single_VID_bac-gif1.4_B001_H001__BAC-DE","creative":{"thumbnail_url":"https://scontent-fra5-1.xx.fbcdn.net/v/t15.5256-10/201927665_562138441587033_1941591602622535712_n.jpg?_nc_cat=100\u0026ccb=1-7\u0026_nc_ohc=rIP-1PvtFgkAX--8mJL\u0026_nc_ht=scontent-fra5-1.xx\u0026edm=AOgd6ZUEAAAA\u0026stp=c0.5000x0.5000f_dst-emg0_p64x64_q75\u0026ur=1a7029\u0026_nc_sid=58080a\u0026oh=00_AfBV2DsSOHj4RbIvKX371cxY4ezGeVrfEVxoP95H_dPSRQ\u0026oe=653CBF5F","id":"23847915982090699"},"campaign":{"name":"180621 - EU - Conversions - nonCBO","id":"23847895248570699"},"adset":{"name":"03 - DE - LAL3%top25visitors - Intent - lowestcost - EN","id":"23847895804630699"}}},"provider":"facebook","type":"ad"}]},"ad_account_ids":{"export_enabled":true,"data":[{"id":"1135934886600327","context":{"business":{"id":"999246123544891","name":"kitchn.io"},"ui":{"id":"act_1135934886600327","account_id":"1135934886600327","name":"Kitchn.io Demo Account","business":{"id":"999246123544891","name":"kitchn.io"},"user_tasks":["DRAFT","ANALYZE","ADVERTISE"]}},"provider":"facebook","type":"ad_account"}]}}},"start_1":{"type":"start","logging_enabled":false,"error_rules":[],"x":150,"y":50},"stop_1":{"type":"stop","logging_enabled":false,"error_rules":[],"x":939,"y":341},"google_sheets_select_spreadsheet_id_v2_1":{"type":"google_sheets_select_spreadsheet_id_v2","logging_enabled":false,"error_rules":[],"x":560,"y":78,"group":"group_1","inputs":{"range":{"title":" range","description":"The range in A1 notation to fetch","export_enabled":true,"data":"Template Ads"},"spreadsheet_id":{"title":" spreadsheet_id","description":"The spreadsheet to fetch from"}}},"map_any_to_table_rows_1":{"type":"map_any_to_table_rows","logging_enabled":false,"error_rules":[],"x":519,"y":293,"group":"group_1","inputs":{"mapping":{"title":" mapping","description":"Mapping for columns to data paths","export_enabled":true,"data":{"A":"/context/ui/name","B":"/id","C":"/context/ui/adset/name","D":"/context/ui/adset/id","E":"/context/ui/campaign/name","F":"/context/ui/campaign/id","G":"/context/ad_account_id/context/ui/name","H":"/context/ad_account_id/context/ui/account_id"}},"add_header":{"export_enabled":true,"data":true},"schema":{"export_enabled":true,"data":"fb_ad_ids"},"map":{"title":"map","description":"Starts the mapping"}}},"google_sheets_append_table_rows_v3_1":{"type":"google_sheets_append_table_rows_v3","title":"Append Google Spreadsheet Rows","description":"Append table rows to a Google Spreadsheet","logging_enabled":true,"error_rules":[],"x":924,"y":370,"group":"group_1"}},"edges":[{"id":"map_any_to_table_rows_1.mapped:google_sheets_append_table_rows_v3_1.append","points":[]},{"id":"map_any_to_table_rows_1.rows:google_sheets_append_table_rows_v3_1.rows","points":[]},{"id":"google_sheets_select_spreadsheet_id_v2_1.range:google_sheets_append_table_rows_v3_1.range","points":[]},{"id":"google_sheets_select_spreadsheet_id_v2_1.spreadsheet_id:google_sheets_append_table_rows_v3_1.spreadsheet_id","points":[]},{"id":"start_1.start:map_any_to_table_rows_1.map","points":[]},{"id":"google_sheets_append_table_rows_v3_1.appended:stop_1.stop","points":[]},{"id":"fb_select_ad_ids_v2_1.ad_ids:map_any_to_table_rows_1.data","points":[]}],"groups":{"group_1":{"title":"Update Google Spreadsheet","description":"","x":645,"y":123,"inputs":["map_any_to_table_rows_1.map","map_any_to_table_rows_1.data","google_sheets_select_spreadsheet_id_v2_1.spreadsheet_id","map_any_to_table_rows_1.mapping","google_sheets_select_spreadsheet_id_v2_1.range"],"outputs":["google_sheets_append_table_rows_v3_1.appended"]}},"widgets":{"widget_1":{"title":"Tab","description":"The range in A1 notation to fetch","position":1,"input":"google_sheets_select_spreadsheet_id_v2_1.range"},"widget_2":{"title":"Spreadsheet","description":"The spreadsheet to fetch from","position":0,"input":"google_sheets_select_spreadsheet_id_v2_1.spreadsheet_id"},"widget_3":{"title":"Ad Account IDs","description":"Select one or more Facebook Accounts","position":-5,"input":"fb_select_ad_ids_v2_1.ad_account_ids"},"widget_4":{"title":"Ad IDs","description":"Select one or more Ads","position":-4,"input":"fb_select_ad_ids_v2_1.ad_ids"}},"variables":{},"config":{"capture_inputs_enabled":false,"caching_enabled":false},"tags":[]}
- Upload assets into Media Library: Use this automation to upload assets from a GDrive folder into your Ad Account’s media library. After being uploaded they will be made available in your spreadsheet so that you can start creating ads.
{"name":"Upload assets (GDrive)","description":"upload_assets_gdrive_20221217","nodes":{"google_sheets_fetch_table_rows_v3_1":{"type":"google_sheets_fetch_table_rows_v3","logging_enabled":false,"x":509,"y":283,"group":"group_1","inputs":{"date_time_render_option":{"export_enabled":true,"data":"FORMATTED_STRING"},"value_render_option":{"export_enabled":true,"data":"UNFORMATTED_VALUE"},"dimension":{"export_enabled":true,"data":"ROWS"}}},"extract_list_1":{"type":"extract_list","logging_enabled":false,"x":780,"y":406,"group":"group_1","inputs":{"pointer":{"export_enabled":true,"data":"/columns/0"}},"outputs":{"data_list":{"title":"existing_assets","description":"The extracted data"},"extracted":{"title":"extracted","description":"Triggers when the data was extracted"}}},"start_1":{"type":"start","logging_enabled":false,"x":27,"y":478},"google_drive_fetch_files_v2_1":{"type":"google_drive_fetch_files_v2","logging_enabled":false,"x":516,"y":301,"inputs":{"include_sub_folders":{"export_enabled":true,"data":false},"parent_folder_id":{"title":"parent_folder_id","description":"Select a folder where all the files you want to fetch are"},"filters":{"export_enabled":true,"data":[]},"mime_types":{"export_enabled":true,"data":["image/jpeg","image/png","image/gif","image/bmp","video/x-flv","video/mp4","application/x-mpegURL","video/MP2T","video/3gpp","video/quicktime","video/x-ms-wmv","video/x-msvideo","application/vnd.google-apps.video","application/vnd.google-apps.photo"]}}},"delete_file_1":{"type":"delete_file","logging_enabled":false,"x":1196,"y":471,"group":"group_2"},"extract_1":{"type":"extract_v2","logging_enabled":false,"x":379,"y":333,"group":"group_3","inputs":{"pointer":{"export_enabled":true,"data":"/id"}}},"google_drive_download_file_1":{"type":"google_drive_download_file","logging_enabled":false,"x":1075,"y":441,"group":"group_3"},"parse_string_to_id_1":{"type":"parse_string_to_id","logging_enabled":false,"x":735,"y":372,"group":"group_3","inputs":{"schema":{"export_enabled":true,"data":"google_drive_folder_id"}}},"stop_1":{"type":"stop","logging_enabled":false,"x":1084,"y":813},"google_sheets_select_spreadsheet_id_v2_1":{"type":"google_sheets_select_spreadsheet_id_v2","logging_enabled":false,"x":112,"y":58,"inputs":{"spreadsheet_id":{"title":"spreadsheet_id","description":"The spreadsheet to fetch from"},"range":{"export_enabled":true,"data":"Assets"}}},"if_v2_1":{"type":"if_v2","logging_enabled":false,"x":500,"y":286,"group":"group_4","inputs":{"condition":{"export_enabled":true,"data":"equal"},"a":{"export_enabled":true,"data":"skip"}}},"data_relay_1":{"type":"data_relay","logging_enabled":false,"x":79,"y":218,"group":"group_2","inputs":{"data":{"title":"file","description":"Data to relay"}}},"input_string_1":{"type":"input_string","logging_enabled":false,"x":136,"y":573,"group":"group_4","inputs":{"string":{"title":"skip?","description":"A string to input","export_enabled":true,"data":"skip"}}},"if_v2_2":{"type":"if_v2","logging_enabled":false,"x":1441,"y":232,"group":"group_4","inputs":{"b":{"title":"existing_assets","description":"Write or paste the data B"},"condition":{"export_enabled":true,"data":"not_in"}},"outputs":{"false":{"title":"skip","description":"Triggers when the evaluation is false"}}},"patch_json_v2_1":{"type":"patch_json_v2","logging_enabled":false,"x":1413,"y":240,"group":"group_5","inputs":{"patches":{"export_enabled":true,"data":[{"op":"add","path":"/timestamp","value":"{{input.value}}"}]}}},"format_timestamp_v2_1":{"type":"format_timestamp_v2","logging_enabled":false,"x":1021,"y":234,"group":"group_6","inputs":{"pattern":{"export_enabled":true,"data":"%Y-%m-%dT%H:%M:%S%z"}}},"timestamp_1":{"type":"timestamp","logging_enabled":false,"x":733,"y":221,"group":"group_6"},"format_timestamp_v2_2":{"type":"format_timestamp_v2","logging_enabled":false,"x":1096,"y":222,"group":"group_5","inputs":{"pattern":{"export_enabled":true,"data":"%Y-%m-%dT%H:%M:%S%z"}}},"fb_select_ad_account_id_v2_1":{"type":"fb_select_ad_account_id_v2","logging_enabled":false,"x":418,"y":139,"group":"group_2","inputs":{"ad_account_id":{"title":"ad_account_id","description":"Select a Facebook Account"}}},"for_each_v2_1":{"type":"for_each_v2","title":"For Each File","description":"Loops over elements in a list","logging_enabled":false,"max_job_retries":6,"timeout":30,"x":830,"y":213,"inputs":{"start":{"title":" start","description":"Starts the first iteration"}}},"trigger_relay_1":{"type":"trigger_relay","logging_enabled":false,"x":1873,"y":560,"group":"group_4","outputs":{"relayed":{"title":"upload","description":"Output trigger from relay"}}},"extract_2":{"type":"extract_v2","logging_enabled":false,"x":817,"y":217,"group":"group_4","inputs":{"pointer":{"export_enabled":true,"data":"/name"}}},"fb_create_ad_video_v3_1":{"type":"fb_create_ad_video_v3","logging_enabled":false,"x":653,"y":304,"group":"group_7"},"fb_select_ad_account_id_v2_2":{"type":"fb_select_ad_account_id_v2","title":"Relay Facebook Ad Account Id","description":"Select one id of your connected Ad Accounts.","logging_enabled":false,"x":2,"y":278,"group":"group_7","inputs":{"ad_account_id":{"title":"ad_account_id","description":"Select a Facebook Account"}}},"google_sheets_append_table_rows_v3_1":{"type":"google_sheets_append_table_rows_v3","logging_enabled":false,"x":1603,"y":681,"group":"group_7"},"google_sheets_append_table_rows_v3_2":{"type":"google_sheets_append_table_rows_v3","logging_enabled":false,"x":1615,"y":328,"group":"group_7"},"trigger_relay_2":{"type":"trigger_relay","logging_enabled":false,"x":1994,"y":564,"group":"group_7"},"data_relay_2":{"type":"data_relay","logging_enabled":false,"x":310,"y":210,"group":"group_7","inputs":{"data":{"title":"url","description":"Data to relay"}}},"google_sheets_select_spreadsheet_id_v2_2":{"type":"google_sheets_select_spreadsheet_id_v2","logging_enabled":false,"x":1083,"y":45,"group":"group_7","inputs":{"range":{"title":" range","description":"The range in A1 notation to fetch"},"spreadsheet_id":{"title":" spreadsheet_id","description":"The spreadsheet to fetch from"}}},"fb_create_ad_image_v3_1":{"type":"fb_create_ad_image_v3","logging_enabled":false,"x":679,"y":622,"group":"group_7"},"extract_3":{"type":"extract_v2","logging_enabled":false,"x":1890,"y":673,"group":"group_8","inputs":{"pointer":{"export_enabled":true,"data":"/context/image/url"}}},"clone_file_v2_1":{"type":"clone_file_v2","logging_enabled":false,"x":2480,"y":638,"group":"group_8"},"patch_json_v2_2":{"type":"patch_json_v2","logging_enabled":false,"x":464,"y":222,"group":"group_6","inputs":{"patches":{"export_enabled":true,"data":[{"op":"add","path":"/context/asset_name","value":"{{input.value}}"}]}}},"patch_json_v2_3":{"type":"patch_json_v2","logging_enabled":false,"x":108,"y":171,"group":"group_6","inputs":{"patches":{"export_enabled":true,"data":[{"op":"replace","path":"/context/image/url","value":"{{input.value}}"}]}}},"map_any_to_table_rows_1":{"type":"map_any_to_table_rows","logging_enabled":false,"x":1560,"y":235,"group":"group_6","inputs":{"mapping":{"export_enabled":true,"data":{"A":"/context/asset_name","B":"/type","C":"/context/image/hash","D":"/context/image/url","E":"/timestamp"}},"add_header":{"export_enabled":true,"data":false},"schema":{"export_enabled":true,"data":"any"}}},"if_v2_3":{"type":"if_v2","logging_enabled":false,"x":1070,"y":421,"group":"group_9","inputs":{"b":{"export_enabled":true,"data":["video/mp4","image/gif","application/vnd.google-apps.video","video/x-flv","video/MP2T","video/3gpp","video/quicktime","video/x-msvideo","video/x-ms-wmv"]},"condition":{"export_enabled":true,"data":"in"}},"outputs":{"false":{"title":"is_image","description":"Triggers when the evaluation is false"},"true":{"title":"is_video","description":"Triggers when the evaluation is true"}}},"extract_4":{"type":"extract_v2","logging_enabled":false,"x":698,"y":374,"group":"group_9","inputs":{"pointer":{"export_enabled":true,"data":"/mimeType"}},"outputs":{"data":{"title":"mimeType","description":"The extracted data"}}},"data_relay_3":{"type":"data_relay","logging_enabled":false,"x":286,"y":383,"group":"group_9","inputs":{"data":{"title":"file","description":"Data to relay"}}},"extract_5":{"type":"extract_v2","logging_enabled":false,"x":1857,"y":379,"group":"group_10","inputs":{"pointer":{"export_enabled":true,"data":"/context/thumbnail/uri"}}},"clone_file_v2_2":{"type":"clone_file_v2","logging_enabled":false,"x":2463,"y":301,"group":"group_10"},"patch_json_v2_4":{"type":"patch_json_v2","logging_enabled":false,"x":527,"y":187,"group":"group_5","inputs":{"patches":{"export_enabled":true,"data":[{"op":"add","path":"/context/asset_name","value":"{{input.value}}"}]}}},"patch_json_v2_5":{"type":"patch_json_v2","logging_enabled":false,"x":173,"y":155,"group":"group_5","inputs":{"patches":{"export_enabled":true,"data":[{"op":"replace","path":"/context/thumbnail/uri","value":"{{input.value}}"}]}}},"map_any_to_table_rows_2":{"type":"map_any_to_table_rows","logging_enabled":false,"x":1722,"y":238,"group":"group_5","inputs":{"mapping":{"export_enabled":true,"data":{"A":"/context/asset_name","B":"/type","C":"/id","D":"/context/thumbnail/uri","E":"/timestamp"}},"add_header":{"export_enabled":true,"data":false},"schema":{"export_enabled":true,"data":"any"}}},"replace_string_1":{"type":"replace_string","logging_enabled":false,"x":1124,"y":245,"group":"group_4","inputs":{"regex":{"title":"regex (paste here)","description":"Regex for replacing the string","export_enabled":true,"data":""},"value":{"export_enabled":true,"data":""},"pointer":{"export_enabled":true,"data":""},"schema":{"export_enabled":true}},"outputs":{"data":{"title":"name","description":"Data that has been partially replaced"}}},"data_relay_4":{"type":"data_relay","logging_enabled":false,"x":138,"y":737,"group":"group_7","inputs":{"data":{"title":"name","description":"Data to relay"}}},"timestamp_2":{"type":"timestamp","logging_enabled":false,"x":790,"y":239,"group":"group_5"},"patch_json_v2_6":{"type":"patch_json_v2","logging_enabled":false,"x":1312,"y":230,"group":"group_6","inputs":{"patches":{"export_enabled":true,"data":[{"op":"add","path":"/timestamp","value":"{{input.value}}"}]}}},"input_any_1":{"type":"input_any","title":"No file endings?Copy to \"regex\" below","description":"Allows to input a any type","logging_enabled":false,"max_job_retries":6,"timeout":30,"x":1121,"y":72,"group":"group_4","inputs":{"any":{"title":"regex (copy me)","description":"Copy this field into the regex field below to remove file endings from your assets. Add any further file endings with the pipe symbol | and the file ending.","export_enabled":true,"data":"\\.(png|mp4|jpg|jpeg|gif|mov|bmp)"}},"outputs":{"any":{"title":" ","description":"The any to input"}}}},"edges":["google_sheets_fetch_table_rows_v3_1.rows:extract_list_1.data_list","start_1.start:google_sheets_fetch_table_rows_v3_1.fetch","extract_list_1.data_list:if_v2_2.b","google_sheets_select_spreadsheet_id_v2_1.spreadsheet_id:google_sheets_fetch_table_rows_v3_1.spreadsheet_id","google_sheets_select_spreadsheet_id_v2_1.range:google_sheets_fetch_table_rows_v3_1.range","google_sheets_fetch_table_rows_v3_1.fetched:extract_list_1.extract","for_each_v2_1.item:extract_2.data","for_each_v2_1.do:if_v2_1.evaluate","if_v2_1.true:extract_2.extract","input_string_1.string:if_v2_1.b","google_drive_download_file_1.url:data_relay_2.data","data_relay_2.data:fb_create_ad_video_v3_1.url","data_relay_2.data:fb_create_ad_image_v3_1.url","extract_3.extracted:clone_file_v2_1.clone","fb_create_ad_image_v3_1.ad_image_id:extract_3.data","extract_5.extracted:clone_file_v2_2.clone","extract_3.data:clone_file_v2_1.url","extract_5.data:clone_file_v2_2.url","fb_create_ad_video_v3_1.ad_video_id:extract_5.data","clone_file_v2_2.url:patch_json_v2_5.value","clone_file_v2_2.cloned:patch_json_v2_5.patch","patch_json_v2_5.data:patch_json_v2_4.data","patch_json_v2_5.patched:patch_json_v2_4.patch","map_any_to_table_rows_2.rows:google_sheets_append_table_rows_v3_2.rows","map_any_to_table_rows_2.mapped:google_sheets_append_table_rows_v3_2.append","google_sheets_select_spreadsheet_id_v2_2.spreadsheet_id:google_sheets_append_table_rows_v3_2.spreadsheet_id","google_sheets_append_table_rows_v3_2.appended:trigger_relay_2.relay","clone_file_v2_1.url:patch_json_v2_3.value","clone_file_v2_1.cloned:patch_json_v2_3.patch","patch_json_v2_3.data:patch_json_v2_2.data","patch_json_v2_3.patched:patch_json_v2_2.patch","map_any_to_table_rows_1.rows:google_sheets_append_table_rows_v3_1.rows","map_any_to_table_rows_1.mapped:google_sheets_append_table_rows_v3_1.append","google_sheets_select_spreadsheet_id_v2_2.spreadsheet_id:google_sheets_append_table_rows_v3_1.spreadsheet_id","google_sheets_append_table_rows_v3_1.appended:trigger_relay_2.relay","google_sheets_select_spreadsheet_id_v2_2.range:google_sheets_append_table_rows_v3_2.range","google_sheets_select_spreadsheet_id_v2_2.range:google_sheets_append_table_rows_v3_1.range","fb_create_ad_image_v3_1.ad_image_id:patch_json_v2_3.data","fb_select_ad_account_id_v2_2.ad_account_id:fb_create_ad_image_v3_1.ad_account_id","fb_select_ad_account_id_v2_2.ad_account_id:fb_create_ad_video_v3_1.ad_account_id","fb_create_ad_video_v3_1.ad_video_id:patch_json_v2_5.data","fb_create_ad_video_v3_1.created:extract_5.extract","fb_create_ad_image_v3_1.created:extract_3.extract","extract_list_1.extracted:google_drive_fetch_files_v2_1.fetch","google_drive_fetch_files_v2_1.files:for_each_v2_1.items","if_v2_2.true:trigger_relay_1.relay","google_drive_fetch_files_v2_1.fetched:for_each_v2_1.start","if_v2_1.false:trigger_relay_1.relay","patch_json_v2_4.patched:timestamp_2.now","patch_json_v2_1.data:map_any_to_table_rows_2.data","format_timestamp_v2_1.date_time:patch_json_v2_6.value","format_timestamp_v2_1.formatted:patch_json_v2_6.patch","timestamp_1.timestamp:format_timestamp_v2_1.timestamp","for_each_v2_1.done:stop_1.stop","data_relay_1.data:data_relay_3.data","trigger_relay_1.relayed:extract_1.extract","google_sheets_select_spreadsheet_id_v2_1.spreadsheet_id:google_sheets_select_spreadsheet_id_v2_2.spreadsheet_id","for_each_v2_1.item:data_relay_1.data","delete_file_1.deleted:for_each_v2_1.next","replace_string_1.data:if_v2_2.a","data_relay_4.data:fb_create_ad_video_v3_1.name","data_relay_4.data:patch_json_v2_2.value","data_relay_3.data:extract_4.data","extract_4.extracted:if_v2_3.evaluate","extract_4.data:if_v2_3.a","if_v2_3.true:fb_create_ad_video_v3_1.create","if_v2_3.false:fb_create_ad_image_v3_1.create","extract_1.data:parse_string_to_id_1.value","extract_1.extracted:parse_string_to_id_1.parse","parse_string_to_id_1.result:google_drive_download_file_1.file_id","parse_string_to_id_1.parsed:google_drive_download_file_1.download","google_drive_download_file_1.url:delete_file_1.url","data_relay_1.data:extract_1.data","google_sheets_select_spreadsheet_id_v2_1.range:google_sheets_select_spreadsheet_id_v2_2.range","if_v2_2.false:for_each_v2_1.next","extract_2.data:replace_string_1.data","replace_string_1.replaced:if_v2_2.evaluate","data_relay_4.data:fb_create_ad_image_v3_1.name","replace_string_1.data:data_relay_4.data","data_relay_4.data:patch_json_v2_4.value","format_timestamp_v2_2.date_time:patch_json_v2_1.value","format_timestamp_v2_2.formatted:patch_json_v2_1.patch","timestamp_2.timestamp:format_timestamp_v2_2.timestamp","timestamp_2.done:format_timestamp_v2_2.format","patch_json_v2_4.data:patch_json_v2_1.data","patch_json_v2_1.patched:map_any_to_table_rows_2.map","patch_json_v2_2.patched:timestamp_1.now","patch_json_v2_6.patched:map_any_to_table_rows_1.map","google_drive_download_file_1.downloaded:extract_4.extract","timestamp_1.done:format_timestamp_v2_1.format","patch_json_v2_2.data:patch_json_v2_6.data","patch_json_v2_6.data:map_any_to_table_rows_1.data","fb_select_ad_account_id_v2_1.ad_account_id:fb_select_ad_account_id_v2_2.ad_account_id","trigger_relay_2.relayed:delete_file_1.delete","extract_2.extracted:replace_string_1.replace"],"groups":{"group_1":{"title":"Get existing assets","description":"","x":224,"y":414,"inputs":["google_sheets_fetch_table_rows_v3_1.range","google_sheets_fetch_table_rows_v3_1.spreadsheet_id","google_sheets_fetch_table_rows_v3_1.fetch"],"outputs":["extract_list_1.data_list","extract_list_1.extracted"]},"group_3":{"title":"Download File","description":"","x":401,"y":434,"group":"group_2","inputs":["extract_1.data","extract_1.extract"],"outputs":["google_drive_download_file_1.url","google_drive_download_file_1.downloaded"]},"group_7":{"title":"Upload and add to Sheet","description":"","x":882,"y":206,"group":"group_2","inputs":["data_relay_2.data","google_sheets_select_spreadsheet_id_v2_2.spreadsheet_id","google_sheets_select_spreadsheet_id_v2_2.range","fb_select_ad_account_id_v2_2.ad_account_id","data_relay_3.data","data_relay_4.data","extract_4.extract"],"outputs":["trigger_relay_2.relayed"]},"group_8":{"title":"Clone to S3","description":"","x":996,"y":672,"group":"group_7","inputs":["extract_3.extract","extract_3.data"],"outputs":["clone_file_v2_1.cloned","clone_file_v2_1.url"]},"group_6":{"title":"Map Rows","description":"","x":1287,"y":671,"group":"group_7","inputs":["patch_json_v2_2.value","patch_json_v2_3.value","patch_json_v2_3.data","patch_json_v2_3.patch"],"outputs":["map_any_to_table_rows_1.mapped","map_any_to_table_rows_1.rows"]},"group_9":{"title":"Determine Action","description":"","x":307,"y":424,"group":"group_7","inputs":["data_relay_3.data","extract_4.extract"],"outputs":["if_v2_3.false","if_v2_3.true"]},"group_10":{"title":"Clone to S3","description":"","x":976,"y":318,"group":"group_7","inputs":["extract_5.data","extract_5.extract"],"outputs":["clone_file_v2_2.url","clone_file_v2_2.cloned"]},"group_5":{"title":"Map Rows","description":"","x":1283,"y":328,"group":"group_7","inputs":["patch_json_v2_4.value","patch_json_v2_5.data","patch_json_v2_5.value","patch_json_v2_5.patch"],"outputs":["map_any_to_table_rows_2.rows","map_any_to_table_rows_2.mapped"]},"group_2":{"title":"Upload File","description":"","x":1458,"y":180,"inputs":["extract_1.extract","google_sheets_select_spreadsheet_id_v2_2.range","google_sheets_select_spreadsheet_id_v2_2.spreadsheet_id","data_relay_1.data","data_relay_4.data"],"outputs":["delete_file_1.deleted"]},"group_4":{"title":"Skip?","description":"","x":1140,"y":446,"inputs":["input_string_1.string","if_v2_1.evaluate","extract_2.data","if_v2_2.b"],"outputs":["if_v2_2.false","trigger_relay_1.relayed","replace_string_1.data"]}},"widgets":{"widget_1":{"title":"Tab / Range","description":"The range in A1 notation.","position":7,"icon":"las la-table","input":"google_sheets_select_spreadsheet_id_v2_1.range"},"widget_2":{"title":"Google Sheet","description":"The ids and names of your uploaded assets will be added here.","position":6,"icon":"","input":"google_sheets_select_spreadsheet_id_v2_1.spreadsheet_id"},"widget_3":{"title":"Skip uploaded assets","description":"If set to \"Skip\", any files already in the tab will be skipped. Note: Check takes place on asset name basis without file extension. E.g. if an asset called `test.png` has been uploaded before and added to the spreadsheet, another asset called `test.mp4` would not be uploaded.","position":9,"icon":"las la-filter","options":[{"data":"skip","title":"Skip"},{"data":"dontskip","title":"Upload all (don't skip)"}],"input":"input_string_1.string"},"widget_4":{"title":"Folder","description":"Select a folder.","position":1,"input":"google_drive_fetch_files_v2_1.parent_folder_id"},"widget_5":{"title":"Include subfolders?","description":"Searches also in subfolder of parent folder. Make sure that the parent folder is explicitly shared with the connected GDrive account. Otherwise sub-folders cannot be searched.","position":2,"options":[{"data":true,"title":"TRUE"},{"data":false,"title":"FALSE"}],"input":"google_drive_fetch_files_v2_1.include_sub_folders"},"widget_6":{"title":"Ad Accounts","description":"Select a Facebook Account","position":0,"input":"fb_select_ad_account_id_v2_1.ad_account_id"}},"config":{"capture_inputs_enabled":false,"caching_enabled":false},"tags":[]}
Using Dropbox? Check out this Uploading Recipe.
Want to use existing assets that you previously uploaded to your account? Use this Creative Export recipe.
Spreadsheet Template
After, importing all relevant automations, create a copy of all required automations and duplicate this spreadsheet.
How to use the automations
Step 1: Export Adsets
Export your Ad sets with the “Export adsets to sheet” recipe. Simply choose an account and the right spreadsheet that you setup before. This is needed to fill the spreadsheet with all your ad sets, that serve as reference when creating new ads. Optionally, choose to only output campaigns that are active or paused.
Step 2: Upload Assets (optional)
Setup the Recipe “Upload Assets from GDrive” to make sure your creatives are uploaded. Here you simply need to specify the folder where you store your creatives. Also, you again need to specify the spreadsheet that you have setup before. Two levels of sub folders are currently supported.
You can choose to either skip or
Step 3: Fill out the spreadsheet
In order to minimize the amount of information we need to enter in the spreadsheet we work with “template” campaigns, adsets and ads.
On ad-level, we will then duplicate the Facebook Page, Instagram Account and any tracking information (Pixel, UTM paraters etc.) from the template ad and use it in the newly created ad.
Besides filling out the “create” tab in order to prepare your ads, you will have to add at least one template ad into the “Template Ads” tab.
In order to prepare ads, follow the video version to set up and run the automation, especially if using for the first time or reference the spreadsheet examples and explanation.
a) Creating simple ads
b) Creating dynamic ads & other ad formats
Step 4: Run automation to upload ads (and adsets and campaigns)
Fill out each mandatory field and change the “Create” column to “create”.
Now, with all data setup correctly and available in the sheet, you can create ads, adsets and campaigns.
Make sure to choose the correct Spreadsheet and Tab and hit “Run Automation”.
After running the automation, you will receive the ad id, a preview link and link to Ads Manager back into your sheet. Also the Create column will be cleared.
Connected FAQs
Last updated on July 25, 2023