Facebook Ads Creative Report (Slack)

This automation recipe allows you to get a weekly Slack report showcasing your best or worst-performing ads including a screenshot of each ad.

Notion image

JSON Recipe

Import the automation recipe(s) into your own account. Don’t know how? Learn here.

Facebook Ads Slack Creative Report
{"name":"Facebook Ads Creative Report (Slack)","description":"","nodes":{"start_1":{"type":"start","title":"Start","description":"Starts an automation","logging_enabled":true,"error_rules":[],"x":35,"y":479},"stop_1":{"type":"stop","logging_enabled":false,"error_rules":[],"x":2041,"y":1355,"inputs":{"stop":{"export_enabled":true}}},"slack_select_conversation_id_1":{"type":"slack_select_conversation_id","logging_enabled":false,"error_rules":[],"x":626,"y":53,"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":75,"y":539,"group":"group_1"},"slack_notifier_v2_1":{"type":"slack_notifier_v2","logging_enabled":false,"error_rules":[],"x":1440,"y":563,"group":"group_1"},"slack_notifier_v2_2":{"type":"slack_notifier_v2","title":"Slack Notifier (main message)","description":"Send blocks to slack for given conversation channels","logging_enabled":false,"error_rules":[],"x":1136,"y":232,"group":"group_2","inputs":{"thread_ts":{"export_enabled":true}}},"filter_v2_1":{"type":"filter_v2","logging_enabled":false,"error_rules":[],"x":755,"y":313,"group":"group_3"},"fb_select_ad_account_ids_v2_1":{"type":"fb_select_ad_account_ids_v2","logging_enabled":false,"error_rules":[],"x":38,"y":142,"group":"group_3","inputs":{"ad_account_ids":{"title":"ad_account_ids","description":"Select one or more Facebook Accounts"}}},"patch_json_v2_1":{"type":"patch_json_v2","logging_enabled":false,"error_rules":[],"x":731,"y":235,"group":"group_2","inputs":{"patches":{"export_enabled":true,"data":[{"op":"replace","path":"/0/text/text","value":"{{input.value}}"}]},"data":{"export_enabled":true,"data":[{"type":"section","text":{"type":"mrkdwn","text":""}}]}}},"input_string_1":{"type":"input_string","title":"Input Text","description":"Allows to input a string","logging_enabled":false,"error_rules":[],"x":319,"y":232,"group":"group_2","inputs":{"string":{"title":"message","description":"A string to input","export_enabled":true,"data":"Here are your top 5 ads of the last 7 days."}}},"input_number_1":{"type":"input_number","logging_enabled":false,"error_rules":[],"x":1115,"y":105,"group":"group_3","inputs":{"number":{"export_enabled":true,"data":5}}},"delay_to_1":{"type":"delay_to","logging_enabled":false,"error_rules":[],"x":217,"y":476,"inputs":{"weekdays":{"export_enabled":true,"data":["Monday"]},"time":{"export_enabled":true,"data":"08:00:00+01:00"}}},"slice_list_v3_1":{"type":"slice_list_v3","logging_enabled":false,"error_rules":[],"x":1651,"y":309,"group":"group_3"},"build_filter_1":{"type":"build_filter","logging_enabled":false,"error_rules":[],"x":541,"y":123,"group":"group_3","inputs":{"filters":{"export_enabled":true,"data":[{"operator":"contains","pointer":"/campaign_name","value":""}]},"schema":{"export_enabled":true,"data":"fb_insight"}}},"sort_1":{"type":"sort","logging_enabled":false,"error_rules":[],"x":1057,"y":267,"group":"group_3","inputs":{"direction":{"title":"direction","description":"Sort direction","export_enabled":true,"data":"DESC"},"pointer":{"title":"pointer","description":"A pointer for which the sorting takes place.","export_enabled":true,"data":"/spend"}},"outputs":{"sorted":{"title":"sorted","description":"Triggered when filtered"}}},"fb_fetch_insights_v6_1":{"type":"fb_fetch_insights_v6","title":"Fetch Facebook Insights","description":"Fetches insights and returns table rows","logging_enabled":true,"error_rules":[],"x":290,"y":191,"group":"group_3","inputs":{"action_report_time":{"export_enabled":true,"data":"conversion"},"breakdowns":{"export_enabled":true},"action_breakdowns":{"export_enabled":true},"fields":{"export_enabled":true,"data":["reach","inline_link_clicks","video_play_actions","video_p25_watched_actions","inline_post_engagement","ad_name","adset_name","spend","actions","impressions","clicks","adset_id","date_start","ad_id","campaign_name","conversions","conversion_values","action_values","account_currency","inline_link_click_ctr","cpc","cost_per_action_type","cost_per_conversion"]},"use_unified_attribution_setting":{"export_enabled":true,"data":true},"level":{"export_enabled":true,"data":"ad"},"action_attribution_windows":{"export_enabled":true,"data":["default"]},"time_increment":{"export_enabled":true,"data":"all_days"},"date_range":{"export_enabled":true,"data":"last_7d"}}},"extract_1":{"type":"extract_v2","logging_enabled":false,"error_rules":[],"x":328,"y":570,"group":"group_4","inputs":{"pointer":{"export_enabled":true,"data":"/ad_id"}}},"parse_string_to_id_1":{"type":"parse_string_to_id","logging_enabled":false,"error_rules":[],"x":642,"y":576,"group":"group_4","inputs":{"schema":{"export_enabled":true,"data":"fb_ad_id"}}},"patch_json_v3_1":{"type":"patch_json_v3","title":"Patch JSON (Advanced)","description":"Apply JSON patches against data with Tikila support","logging_enabled":false,"max_job_retries":6,"timeout":30,"error_rules":[],"x":1111,"y":536,"group":"group_1","inputs":{"patches":{"export_enabled":true,"data":[{"op":"replace","path":"/2/image_url","value":"{{inputValue(\"/image_url\")}}"},{"op":"replace","path":"/0/text/text","value":"*Ad Name* {{inputValue(\"/ad_name\")}} \n*Spend*  $ {{inputValue(\"/spend\")}}\n*CTR* {{round(inputValue(\"/inline_link_click_ctr\"),2)}}% \n*CPC* $ {{round(inputValue(\"/cpc\"),2)}}"}]},"data":{"export_enabled":true,"data":[{"type":"section","text":{"type":"mrkdwn","text":""}},{"type":"divider"},{"type":"image","image_url":"","alt_text":"inspiration"}]}}},"fb_create_ad_screenshot_v2_1":{"type":"fb_create_ad_screenshot_v2","logging_enabled":false,"error_rules":[],"x":966,"y":621,"group":"group_4","inputs":{"ad_format":{"export_enabled":true,"data":"INSTAGRAM_STANDARD"}}},"patch_json_v3_2":{"type":"patch_json_v3","title":"Patch JSON (Advanced)","description":"Apply JSON patches against data with Tikila support","logging_enabled":false,"max_job_retries":6,"timeout":30,"error_rules":[],"x":765,"y":559,"group":"group_1","inputs":{"patches":{"export_enabled":true,"data":[{"op":"cast","path":"/inline_link_click_ctr","value":"float"},{"op":"cast","path":"/cpc","value":"float"},{"op":"add","path":"/image_url","value":"{{inputValue(\"\")}}"}]}}},"calculate_math_operation_1":{"type":"calculate_math_operation","logging_enabled":false,"error_rules":[],"x":1373,"y":272,"group":"group_3","inputs":{"operator":{"export_enabled":true,"data":"-"},"b":{"export_enabled":true,"data":1}}}},"edges":[{"id":"fb_select_ad_account_ids_v2_1.ad_account_ids:fb_fetch_insights_v6_1.ad_account_ids","points":[]},{"id":"build_filter_1.filters:filter_v2_1.filters","points":[]},{"id":"fb_fetch_insights_v6_1.fetched:filter_v2_1.filter","points":[]},{"id":"fb_fetch_insights_v6_1.insights:filter_v2_1.items","points":[]},{"id":"filter_v2_1.items:sort_1.items","points":[]},{"id":"filter_v2_1.filtered:sort_1.sort","points":[]},{"id":"for_each_v2_1.item:extract_1.data","points":[]},{"id":"for_each_v2_1.do:extract_1.extract","points":[]},{"id":"extract_1.extracted:parse_string_to_id_1.parse","points":[]},{"id":"extract_1.data:parse_string_to_id_1.value","points":[]},{"id":"slack_notifier_v2_2.sent:for_each_v2_1.start","points":[]},{"id":"slack_select_conversation_id_1.conversation_id:slack_notifier_v2_1.conversation_id","points":[]},{"id":"slack_select_conversation_id_1.conversation_id:slack_notifier_v2_2.conversation_id","points":[]},{"id":"slack_notifier_v2_2.thread_ts:slack_notifier_v2_1.thread_ts","points":[]},{"id":"slack_notifier_v2_1.sent:for_each_v2_1.next","points":[]},{"id":"input_string_1.string:patch_json_v2_1.value","points":[]},{"id":"patch_json_v2_1.data:slack_notifier_v2_2.blocks","points":[]},{"id":"patch_json_v2_1.patched:slack_notifier_v2_2.send","points":[]},{"id":"patch_json_v3_2.patched:patch_json_v3_1.patch","points":[]},{"id":"for_each_v2_1.item:patch_json_v3_2.data","points":[]},{"id":"patch_json_v3_2.data:patch_json_v3_1.value","points":[]},{"id":"patch_json_v3_1.patched:slack_notifier_v2_1.send","points":[]},{"id":"parse_string_to_id_1.result:fb_create_ad_screenshot_v2_1.ad_id","points":[]},{"id":"for_each_v2_1.done:delay_to_1.start","points":[]},{"id":"patch_json_v3_1.data:slack_notifier_v2_1.blocks","points":[]},{"id":"parse_string_to_id_1.parsed:fb_create_ad_screenshot_v2_1.create","points":[]},{"id":"fb_create_ad_screenshot_v2_1.created:patch_json_v3_2.patch","points":[]},{"id":"fb_create_ad_screenshot_v2_1.url:patch_json_v3_2.value","points":[]},{"id":"start_1.start:delay_to_1.start","points":[]},{"id":"delay_to_1.delayed:fb_fetch_insights_v6_1.fetch","points":[]},{"id":"sort_1.items:slice_list_v3_1.data_list","points":[]},{"id":"slice_list_v3_1.sliced:patch_json_v2_1.patch","points":[]},{"id":"sort_1.sorted:calculate_math_operation_1.calculate","points":[]},{"id":"calculate_math_operation_1.calculated:slice_list_v3_1.slice","points":[]},{"id":"slice_list_v3_1.data_list:for_each_v2_1.items","points":[]},{"id":"input_number_1.number:calculate_math_operation_1.a","points":[]},{"id":"calculate_math_operation_1.data:slice_list_v3_1.to","points":[]}],"groups":{"group_1":{"title":"Comment for each creative","description":"","x":1240,"y":231,"inputs":["for_each_v2_1.start","for_each_v2_1.items","slack_notifier_v2_1.thread_ts","slack_notifier_v2_1.conversation_id"],"outputs":["for_each_v2_1.done"]},"group_2":{"title":"Send main message","description":"","x":880,"y":224,"inputs":["slack_notifier_v2_2.conversation_id","patch_json_v2_1.patch","input_string_1.string"],"outputs":["slack_notifier_v2_2.sent","slack_notifier_v2_2.thread_ts"]},"group_3":{"title":"Get Facebook data","description":"","x":498,"y":270,"inputs":["fb_fetch_insights_v6_1.fetch"],"outputs":["slice_list_v3_1.sliced","slice_list_v3_1.data_list"]},"group_4":{"title":"Create Screenshot","description":"","x":440,"y":576,"group":"group_1","inputs":["extract_1.data","extract_1.extract"],"outputs":["fb_create_ad_screenshot_v2_1.created","fb_create_ad_screenshot_v2_1.url"]}},"widgets":{"widget_1":{"title":"Ad Account","description":"Select one or more Facebook Accounts","position":0,"input":"fb_select_ad_account_ids_v2_1.ad_account_ids"},"widget_2":{"title":"Date Range","description":"Get insights for this time frame.","position":2,"icon":"las la-calendar-week","input":"fb_fetch_insights_v6_1.date_range"},"widget_3":{"title":"Channel","description":"Select a Slack Channel or Conversation","position":99,"input":"slack_select_conversation_id_1.conversation_id"},"widget_4":{"title":"Main Message","description":"Enter your main message that will be sent to the selected Slack Channel.","position":98,"icon":"las la-signature","input":"input_string_1.string"},"widget_5":{"title":"Number of Ads","description":"For how many ads would you like to receive a Slack report?","position":3,"icon":"las la-sort-numeric-up","input":"input_number_1.number"},"widget_6":{"title":"Filters","description":"Only look at performance of filtered campaigns, adsets or ads.","position":1,"icon":"las la-filter","input":"build_filter_1.filters"},"widget_7":{"title":"Weekdays","description":"Select one or more days of the week.","position":100,"icon":"las la-calendar-week","input":"delay_to_1.weekdays"},"widget_8":{"title":"Time","description":"Select a time of day and timezone.","position":101,"icon":"las la-clock","input":"delay_to_1.time"}},"variables":{},"config":{"capture_inputs_enabled":false,"caching_enabled":false},"tags":[{"name":"Creative","color":"#6B93E1"}]}

How To

Per default, the automation will output the highest-spending ads of the last 7 days into your selected Slack channel. You can easily change the date range in the Configuration view, though other logic or any metric changes will have to be completed in the Builder view.

Step 1

In order to get this running, all you need to do is select a Facebook account, any potential filters on your campaigns, adset or ads(e.g. if you want to get one report for each geo or split prospecting and retargeting) along with the number of ads you’d like in your ranking.

Notion image

Step 2

Enter a text that will be sent to the selected Slack channel. For each of the 5 ads, a comment will be sent to this main message.

Notion image

Step 3

Choose one or more days and a time when you would like to receive the report into your Slack channel.

Notion image

[Optional] Configuration for Builders

The automation is roughly split up into three parts:

  1. Getting the data from Facebook and sorting and filtering the right elements
  1. Sending the main message
  1. Building and sending a screenshot and some data of each ad
Notion image
 

Inside the “Get Facebook data” group node,

  1. we first make the API call to Facebook for a given time range (default: last_7d),
  1. then filter out items we don’t want to include (default: No filter),
  1. sort by our key metric (default: spend)
  1. and then “slice out” just the first items (default: 5).
Notion image
 

Q: How can I change the metric from spend to something else?

In order to change the metric you will need to adapt the pointer field of the Sort node.

 

Q: How can I change the message or the metrics for each ad?

Notion image

Using the last Patch node in the “Comment for each Creative” group node, you can change the metrics. See here how.

 
Did this answer your question?
😞
😐
🤩

Last updated on July 25, 2023