15 mins to complete
In this tutorial, you will learn how to send Slack messages to your preferred channels if your campaign or adset level spent is higher than planned.
Facebook uses JSON to work with data. If you are not familiar with JSON, refer to the tutorial.
Video Tutorial
Instructions
- Add Fetch Facebook Insights node. Select today as
date_present
, all_days fortime_increment
, your preferredattribution_windows
, campaign/adset aslevel
, spend, campaign_name and campaign_idfields,
conversions asaction_report_time
. - Add Select Facebook Ad Account Ids node. Choose a Facebook account. Connect
ad_account_ids
sockets. - Add Filter node. Connect
insights
socket toitems
. - Add Build filter node. Select Facebook Insight
schema
. Within thefilters
socket, choose filtering parameters. Connectfilters
sockets. - Add Slack Notifier Node.
- Add Select Slack Conversation Node. Select a channel in which you would want the message to be sent. Connect
conversation_id
sockets. If you want your message to go into the thread under another message, inputthread_ts
socket. - Add For Each node. We will send 1 Slack message for one campaign or adset that is overspending. Connect
items
(Filter) toitems
- Add Patch JSON node. Connect
item
tovalue
- Copy or create blocks JSON into the
data
socket of the Patch JSON node. Then, refer to Slack block builder to find the correct format. - Select “replace” operation inside of the patch node. Add a path. In our example it’s
/0/text/text
. The path consists of the index of an object in the list and the path to the element you want to change. - In the value field, write down your message. You can insert the dynamic parameters by using
{{input.value/(path_to_value}}
. In our example it’s{{input.value/campaign_name}}
. - Connect
data
(Patch JSON) toblocks
(Slack Notifier). - Add Delay or Delay to Node.