[Slack Alert] Facebook Disapproved ads
This automation runs every hour and checks whether any of the ads got disapproved. If that’s the case, you will get a Slack notification with the name of the ad and the link to the Ads Manager.
With this automation, get a Slack message for any disapproved ads.
JSON Recipe
Import the automation recipe(s) into your own account. Don’t know how? Learn here.
{"name":"Disapproved ads: Slack Notifier","description":"fb_disapproved_ads_slack_notifier_20230928","nodes":{"slack_notifier_v2_1":{"type":"slack_notifier_v2","logging_enabled":false,"error_rules":[],"x":794,"y":225,"group":"group_1","inputs":{"thread_ts":{"export_enabled":true}}},"fb_select_ad_account_ids_v2_1":{"type":"fb_select_ad_account_ids_v2","logging_enabled":false,"error_rules":[],"x":17,"y":421,"inputs":{"ad_account_ids":{"title":"ad_account_ids","description":"Select one or more Facebook Accounts"}}},"start_1":{"type":"start","logging_enabled":false,"error_rules":[],"x":115,"y":347},"stop_1":{"type":"stop","logging_enabled":false,"error_rules":[],"x":2198,"y":663,"inputs":{"stop":{"export_enabled":true}}},"extract_list_1":{"type":"extract_list","logging_enabled":false,"error_rules":[],"x":226,"y":402,"group":"group_2","inputs":{"data_list":{"title":"currently_disapproved_ads","description":"The data from which to extract"},"pointer":{"export_enabled":true,"data":"/id"}}},"calculate_set_operation_1":{"type":"calculate_set_operation","logging_enabled":false,"error_rules":[],"x":819,"y":500,"group":"group_2","inputs":{"operator":{"export_enabled":true,"data":"-"}}},"parse_strings_to_ids_1":{"type":"parse_strings_to_ids","logging_enabled":false,"error_rules":[],"x":1096,"y":574,"group":"group_2","inputs":{"schema":{"export_enabled":true,"data":"fb_ad_id"}},"outputs":{"parsed":{"title":"parsed","description":"Triggers when the input is parsed"}}},"delay_1":{"type":"delay","logging_enabled":false,"error_rules":[],"x":40,"y":724,"inputs":{"duration":{"export_enabled":true,"data":3600}}},"append_1":{"type":"append","logging_enabled":false,"error_rules":[],"x":1338,"y":216,"group":"group_1","inputs":{"flatten":{"export_enabled":true},"schema":{"export_enabled":true,"data":"any"}},"outputs":{"list":{"title":"list_of_ads_already_appealed","description":"The resulting list with all inputs"}}},"extract_1":{"type":"extract_v2","logging_enabled":false,"error_rules":[],"x":1060,"y":213,"group":"group_1","inputs":{"pointer":{"export_enabled":true,"data":"/id"}}},"slack_select_conversation_id_1":{"type":"slack_select_conversation_id","logging_enabled":false,"error_rules":[],"x":1157,"y":283,"inputs":{"conversation_id":{"title":"conversation_id","description":"Select a Slack Channel or Conversation"}}},"for_each_v2_1":{"type":"for_each_v2","logging_enabled":false,"error_rules":[],"x":229,"y":223,"group":"group_1","inputs":{"start":{"title":"start","description":"Starts the first iteration"}}},"patch_json_v2_1":{"type":"patch_json_v2","logging_enabled":false,"error_rules":[],"x":517,"y":227,"group":"group_1","inputs":{"patches":{"export_enabled":true,"data":[{"op":"replace","path":"/0/text/text","value":":warning: The ad {{input.value/name}} is disapproved. \nCampaign Name: {{input.value/campaign/name}} \n Ad created {{input.value/created_time}} "},{"op":"replace","path":"/1/elements/0/url","value":"https://business.facebook.com/adsmanager/manage/ads/edit?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}}"}]},"data":{"export_enabled":true,"data":[{"type":"section","text":{"type":"mrkdwn","text":""}},{"type":"actions","elements":[{"type":"button","text":{"type":"plain_text","text":"Open in Ads Manager"},"url":""}]}]}}},"fb_fetch_ads_v2_1":{"type":"fb_fetch_ads_v2","logging_enabled":false,"error_rules":[],"x":1102,"y":479,"outputs":{"fetched":{"title":"fetched","description":"Triggered when fetched"}}},"fb_fetch_adset_ad_ids_v2_1":{"type":"fb_fetch_adset_ad_ids_v2","logging_enabled":false,"error_rules":[],"x":548,"y":466,"inputs":{"effective_status":{"export_enabled":true,"data":["DISAPPROVED"]}}},"fb_fetch_adset_ids_v2_1":{"type":"fb_fetch_adset_ids_v2","logging_enabled":false,"error_rules":[],"x":275,"y":428,"inputs":{"effective_status":{"export_enabled":true,"data":["ACTIVE"]},"is_completed":{"export_enabled":true,"data":false}}},"extract_v2_1":{"type":"extract_v2","logging_enabled":false,"error_rules":[],"x":504,"y":669,"group":"group_2","inputs":{"data":{"title":"previously_disapproved_ads","description":"The data from which to extract"},"default_value":{"export_enabled":true,"data":[]},"pointer":{"export_enabled":true,"data":""}}}},"edges":[{"id":"slack_notifier_v2_1.sent:extract_1.extract","points":[]},{"id":"for_each_v2_1.item:extract_1.data","points":[]},{"id":"for_each_v2_1.do:patch_json_v2_1.patch","points":[]},{"id":"append_1.appended:for_each_v2_1.next","points":[]},{"id":"slack_select_conversation_id_1.conversation_id:slack_notifier_v2_1.conversation_id","points":[]},{"id":"patch_json_v2_1.data:slack_notifier_v2_1.blocks","points":[]},{"id":"for_each_v2_1.item:patch_json_v2_1.value","points":[]},{"id":"extract_1.data:append_1.item","points":[]},{"id":"extract_1.extracted:append_1.append","points":[]},{"id":"calculate_set_operation_1.calculated:parse_strings_to_ids_1.parse","points":[]},{"id":"calculate_set_operation_1.data:parse_strings_to_ids_1.values","points":[]},{"id":"for_each_v2_1.done:delay_1.start","points":[]},{"id":"fb_fetch_adset_ids_v2_1.fetched:fb_fetch_adset_ad_ids_v2_1.fetch","points":[]},{"id":"fb_select_ad_account_ids_v2_1.ad_account_ids:fb_fetch_adset_ids_v2_1.ad_account_ids","points":[]},{"id":"fb_fetch_adset_ad_ids_v2_1.ad_ids:extract_list_1.data_list","points":[]},{"id":"parse_strings_to_ids_1.parsed:fb_fetch_ads_v2_1.fetch","points":[]},{"id":"fb_fetch_ads_v2_1.ads:for_each_v2_1.items","points":[]},{"id":"delay_1.delayed:fb_fetch_adset_ids_v2_1.fetch","points":[]},{"id":"fb_fetch_adset_ids_v2_1.adset_ids:fb_fetch_adset_ad_ids_v2_1.adset_ids","points":[]},{"id":"start_1.start:fb_fetch_adset_ids_v2_1.fetch","points":[]},{"id":"fb_fetch_adset_ad_ids_v2_1.fetched:extract_list_1.extract","points":[]},{"id":"parse_strings_to_ids_1.result:fb_fetch_ads_v2_1.ad_ids","points":[]},{"id":"extract_list_1.data_list:calculate_set_operation_1.a","points":[]},{"id":"extract_list_1.extracted:extract_v2_1.extract","points":[]},{"id":"extract_v2_1.extracted:calculate_set_operation_1.calculate","points":[]},{"id":"extract_v2_1.data:calculate_set_operation_1.b","points":[]},{"id":"append_1.list:extract_v2_1.data","points":[]},{"id":"patch_json_v2_1.patched:slack_notifier_v2_1.send","points":[]},{"id":"fb_fetch_ads_v2_1.fetched:for_each_v2_1.start","points":[]}],"groups":{"group_1":{"title":"Send a Slack Message \u0026 append the list of checked ads","description":"","x":1423,"y":463,"inputs":["for_each_v2_1.items","slack_notifier_v2_1.conversation_id","for_each_v2_1.start"],"outputs":["append_1.list","for_each_v2_1.done"]},"group_2":{"title":"Get the Ids of the new disapproved ads","description":"","x":822,"y":472,"inputs":["extract_list_1.data_list","extract_list_1.extract","extract_v2_1.data"],"outputs":["parse_strings_to_ids_1.result","parse_strings_to_ids_1.parsed"]}},"widgets":{"widget_1":{"title":"Adset Status","description":"Effective status of adsets","position":3,"icon":"las la-battery-half","input":"fb_fetch_adset_ids_v2_1.effective_status"},"widget_2":{"title":"Ad Account","description":"Select one or more Facebook Accounts","position":0,"input":"fb_select_ad_account_ids_v2_1.ad_account_ids"},"widget_3":{"title":"Slack channel","description":"Select a Slack Channel ","position":1,"input":"slack_select_conversation_id_1.conversation_id"}},"variables":{},"config":{"capture_inputs_enabled":false,"caching_enabled":false},"tags":[]}
How To
After creating the automation, make a few selections and then hit “Run Automation”. The check will happen by default every hour. If none of your ads are disapproved, you won’t get a Slack message.
Step 1
Select an Ad Account
Step 2
Select a Slack Channel, in which you would like to receive the notifications
Step 3
Define how often you want the automation to run
Last updated on September 28, 2023