Skip to main content

Facebook Marketing Component

Interact with ads and adsets in your Facebook Marketing account.

Component key: facebook-marketing

Description#

Facebook Marketing offers digital marketing for a variety of channels for building communication with your audience. The Facebook Marketing component allows you to interact with your ads, adsets, campaigns and more.

Facebook Marketing Connections#

Facebook Marketing Oauth 2.0#

This component uses OAuth 2.0 to connect to Facebook's Marketing API. To get started with Facebook Marketing, you first need to create a developer account.

  1. Select Create app, take note of the App Id and App Secret under the basic tab.
  2. Navigate to the Facebook Login Section:
    1. You will see an input to enter your Prismatic Redirect URL.
    2. Under the Valid OAuth Redirect URIs section add https://oauth2.prismatic.io/callback as a Redirect URI.
  3. Now add a new Facebook Marketing action to your Prismatic integration, and you will see a new connection.
  4. Enter the values that you previously saved from your Facebook Developer App.
  5. All the scopes you need should already exist in the connection. However if you need to enter additional scopes you can refer to Facebook Marketing Docs to find the correct ones.

Now you can make a new Facebook Marketing connection in Prismatic, and provide the values you obtained earlier.

For any additional setup information, refer to the Facebook Marketing Docs

InputDefaultNotesExample
Input
Authorize URL
string
/ Required
Default
https://www.facebook.com/v13.0/dialog/oauth
Notes
Provide a valid authURL for Facebook Marketing
Example
 
Input
App Id
string
/ Required
Default
 
Notes
Provide the App Id that was generated from your Facebook App.
Example
1233096058094633
Input
App Secret
string
/ Required
Default
 
Notes
Provide the App Secret that was generated from your Facebook App.
Example
7699008007296c1689ddd30b0cf7c924
Input
Scopes
string
/ Required
Default
ads_read ads_management pages_show_list groups_access_member_info leads_retrieval page_events pages_read_user_content public_profile
Notes
Provide a valid list of scopes. A list per use case is provided on the Facebook Marketing docs: https://developers.facebook.com/docs/marketing-api/overview/authorization/
Example
 
Input
Token URL
string
/ Required
Default
https://graph.facebook.com/v13.0/oauth/access_token
Notes
Provide a valid Facebook Marketing version to complete the Token URL
Example
 

Actions#

Add URL Tags To Ad Creative#

Update an existing Ad Creative to include a new set of URL Tags | key: addUrlTagsToCreative

InputDefaultNotesExample
Input
Ad Account
string
/ Required
Default
 
Notes
Provide the identifier of an Ad Account. This value can either be an Id, or the name of the account.
Example
act_342512647855388
Input
After
string
Default
 
Notes
Provide the token for the item after the current one.
Example
xOTQ1MjAwNzI5NDE=
Input
Before
string
Default
 
Notes
Provide the token for the item before the current one.
Example
xOTQ1MjAwNzI5NDE=
Input
Connection
connection
/ Required
Default
 
Notes
 
Example
 
Input
Fields
string
Default
name, object_story_spec, adlabels, body, object_id, url_tags
Notes
Provide a comma separated list of fields to be returned
Example
 
Input
Limit
string
Default
 
Notes
Provide a limit for the result set.
Example
30
Input
Object Story Id
string
/ Required
Default
 
Notes
Provide an Id for the object story of the adCreative.
Example
1051738543535_10636436633230
Input
Optional Values
string
Key Value List
Default
 
Notes
Provide optional values to mutate the given object.
Example
 
Input
URL Tags
string
/ Required
Default
 
Notes
Provide an string for the URL tags on the given adCreative
Example
rid=Dcid_238495513324Cgid_23849551352290668%257Cadid_23849551899068

Delete Ad#

Delete the information and metadata of a given ad | key: deleteAd

InputNotesExample
Input
Ad Account
string
/ Required
Notes
Provide the identifier of an Ad Account. This value can either be an Id, or the name of the account.
Example
act_342512647855388
Input
Ad Id
string
/ Required
Notes
Provide the Id of an Ad or Ad Set
Example
342512647855388
Input
Connection
connection
/ Required
Notes
 
Example
 

Get Ad#

Get the information and metadata of a given ad | key: getAd

InputDefaultNotesExample
Input
Ad Account
string
/ Required
Default
 
Notes
Provide the identifier of an Ad Account. This value can either be an Id, or the name of the account.
Example
act_342512647855388
Input
Ad Id
string
/ Required
Default
 
Notes
Provide the Id of an Ad or Ad Set
Example
342512647855388
Input
Connection
connection
/ Required
Default
 
Notes
 
Example
 
Input
Fields
string
Default
name,adset,account_id,ad_review_feedback,adlabels,adset_id,bid_amount,campaign,campaign_id,configured_status,conversion_domain,created_time,creative,effective_status,issues_info,last_updated_by_app_id,preview_shareable_link,recommendations,status,tracking_specs
Notes
Provide a comma separated list of fields to be returned
Example
 

Get Ad Account#

Get the information and metadata of the given ad account | key: getAdAccount

InputDefaultNotesExample
Input
Ad Account
string
/ Required
Default
 
Notes
Provide the identifier of an Ad Account. This value can either be an Id, or the name of the account.
Example
act_342512647855388
Input
After
string
Default
 
Notes
Provide the token for the item after the current one.
Example
xOTQ1MjAwNzI5NDE=
Input
Before
string
Default
 
Notes
Provide the token for the item before the current one.
Example
xOTQ1MjAwNzI5NDE=
Input
Connection
connection
/ Required
Default
 
Notes
 
Example
 
Input
Fields
string
Default
name,age,balance,is_personal,account_status,line_numbers,adcreatives
Notes
Provide a comma separated list of fields to be returned
Example
 
Input
Limit
string
Default
 
Notes
Provide a limit for the result set.
Example
30

Get Ad Creative#

Get the information and metadata of the given ad creative | key: getAdCreative

InputDefaultNotesExample
Input
Ad Account
string
/ Required
Default
 
Notes
Provide the identifier of an Ad Account. This value can either be an Id, or the name of the account.
Example
act_342512647855388
Input
Ad Creative
string
/ Required
Default
 
Notes
Provide a unique identifier of the adCreative. This value can either be the ID, or the name.
Example
342512647855388
Input
After
string
Default
 
Notes
Provide the token for the item after the current one.
Example
xOTQ1MjAwNzI5NDE=
Input
Before
string
Default
 
Notes
Provide the token for the item before the current one.
Example
xOTQ1MjAwNzI5NDE=
Input
Connection
connection
/ Required
Default
 
Notes
 
Example
 
Input
Fields
string
Default
name, object_story_spec, adlabels, body, object_id, url_tags
Notes
Provide a comma separated list of fields to be returned
Example
 
Input
Limit
string
Default
 
Notes
Provide a limit for the result set.
Example
30

Get Ad Set#

Get the information and metadata of a given Ad Set | key: getAdSet

InputDefaultNotesExample
Input
Ad Set Id
string
/ Required
Default
 
Notes
Provide the Id of an Ad or Ad Set
Example
342512647855388
Input
Connection
connection
/ Required
Default
 
Notes
 
Example
 
Input
Fields
string
Default
name,account_id,adlabels,adset_schedule,asset_feed_id,attribution_spec,bid_adjustments,bid_amount,bid_constraints,bid_info,billing_event,budget_remaining,campaign,configured_status,created_time,creative_sequence,daily_budget,daily_min_spend_target,daily_spend_cap,destination_type,effective_status,end_time,optimization_goal,optimization_sub_event,pacing_type,promoted_object,recommendations,status,targeting,start_time,targeting_optimization_types,updated_time
Notes
Provide a comma separated list of fields to be returned
Example
 

Get Current User#

Get the information and metadata of the current user | key: getCurrentUser

InputNotes
Input
Connection
connection
/ Required
Notes
 

Get User By Id#

Get the information and metadata of a given user | key: getUserById

InputNotesExample
Input
Connection
connection
/ Required
Notes
 
Example
 
Input
User Id
string
/ Required
Notes
Provide the Id of a user.
Example
587490763

List Ad Accounts#

Get the information and metadata of the current user | key: listAddAccounts

InputDefaultNotesExample
Input
After
string
Default
 
Notes
Provide the token for the item after the current one.
Example
xOTQ1MjAwNzI5NDE=
Input
Before
string
Default
 
Notes
Provide the token for the item before the current one.
Example
xOTQ1MjAwNzI5NDE=
Input
Connection
connection
/ Required
Default
 
Notes
 
Example
 
Input
Fields
string
Default
name,age,balance,is_personal,account_status,line_numbers,adcreatives
Notes
Provide a comma separated list of fields to be returned
Example
 
Input
Limit
string
Default
 
Notes
Provide a limit for the result set.
Example
30

List Ad Creatives#

List all ad creatives in a given ad account | key: listAdCreatives

InputDefaultNotesExample
Input
Ad Account
string
/ Required
Default
 
Notes
Provide the identifier of an Ad Account. This value can either be an Id, or the name of the account.
Example
act_342512647855388
Input
After
string
Default
 
Notes
Provide the token for the item after the current one.
Example
xOTQ1MjAwNzI5NDE=
Input
Before
string
Default
 
Notes
Provide the token for the item before the current one.
Example
xOTQ1MjAwNzI5NDE=
Input
Connection
connection
/ Required
Default
 
Notes
 
Example
 
Input
Fields
string
Default
name, object_story_spec, adlabels, body, object_id, url_tags
Notes
Provide a comma separated list of fields to be returned
Example
 
Input
Limit
string
Default
 
Notes
Provide a limit for the result set.
Example
30

List Ad Leads#

List all ad groups in a given ad account | key: listAdLeads

InputDefaultNotesExample
Input
Ad Account
string
/ Required
Default
 
Notes
Provide the identifier of an Ad Account. This value can either be an Id, or the name of the account.
Example
act_342512647855388
Input
Ad Id
string
/ Required
Default
 
Notes
Provide the Id of an Ad or Ad Set
Example
342512647855388
Input
After
string
Default
 
Notes
Provide the token for the item after the current one.
Example
xOTQ1MjAwNzI5NDE=
Input
Before
string
Default
 
Notes
Provide the token for the item before the current one.
Example
xOTQ1MjAwNzI5NDE=
Input
Connection
connection
/ Required
Default
 
Notes
 
Example
 
Input
Fields
string
Default
name
Notes
Provide a comma separated list of fields to be returned
Example
 
Input
Limit
string
Default
 
Notes
Provide a limit for the result set.
Example
30

List Ad Previews#

Get a list of all previews of the given ad | key: getAdPreview

InputNotesExample
Input
Ad Account
string
/ Required
Notes
Provide the identifier of an Ad Account. This value can either be an Id, or the name of the account.
Example
act_342512647855388
Input
Ad Format
string
/ Required
Notes
Provide a type of ad format to preview.
Example
 
Input
Ad Id
string
/ Required
Notes
Provide the Id of an Ad or Ad Set
Example
342512647855388
Input
Connection
connection
/ Required
Notes
 
Example
 

List Ad Sets In Account#

List all ads in an ad account | key: listAdSetsInAccount

InputDefaultNotesExample
Input
Ad Account
string
/ Required
Default
 
Notes
Provide the identifier of an Ad Account. This value can either be an Id, or the name of the account.
Example
act_342512647855388
Input
After
string
Default
 
Notes
Provide the token for the item after the current one.
Example
xOTQ1MjAwNzI5NDE=
Input
Before
string
Default
 
Notes
Provide the token for the item before the current one.
Example
xOTQ1MjAwNzI5NDE=
Input
Connection
connection
/ Required
Default
 
Notes
 
Example
 
Input
Fields
string
Default
name,account_id,adlabels,adset_schedule,asset_feed_id,attribution_spec,bid_adjustments,bid_amount,bid_constraints,bid_info,billing_event,budget_remaining,campaign,configured_status,created_time,creative_sequence,daily_budget,daily_min_spend_target,daily_spend_cap,destination_type,effective_status,end_time,optimization_goal,optimization_sub_event,pacing_type,promoted_object,recommendations,status,targeting,start_time,targeting_optimization_types,updated_time
Notes
Provide a comma separated list of fields to be returned
Example
 
Input
Limit
string
Default
 
Notes
Provide a limit for the result set.
Example
30

List Ads In Account#

List all ad sets in an ad account | key: listAdsInAccount

InputDefaultNotesExample
Input
Ad Account
string
/ Required
Default
 
Notes
Provide the identifier of an Ad Account. This value can either be an Id, or the name of the account.
Example
act_342512647855388
Input
After
string
Default
 
Notes
Provide the token for the item after the current one.
Example
xOTQ1MjAwNzI5NDE=
Input
Before
string
Default
 
Notes
Provide the token for the item before the current one.
Example
xOTQ1MjAwNzI5NDE=
Input
Connection
connection
/ Required
Default
 
Notes
 
Example
 
Input
Fields
string
Default
name,adset,account_id,ad_review_feedback,adlabels,adset_id,bid_amount,campaign,campaign_id,configured_status,conversion_domain,created_time,creative,effective_status,issues_info,last_updated_by_app_id,preview_shareable_link,recommendations,status,tracking_specs
Notes
Provide a comma separated list of fields to be returned
Example
 
Input
Limit
string
Default
 
Notes
Provide a limit for the result set.
Example
30

List Ads In Adset#

List all ads in a given adset | key: listAdsInAdset

InputDefaultNotesExample
Input
Ad Account
string
/ Required
Default
 
Notes
Provide the identifier of an Ad Account. This value can either be an Id, or the name of the account.
Example
act_342512647855388
Input
AdSet Id
string
/ Required
Default
 
Notes
Provide the Id of an Ad or Ad Set
Example
342512647855388
Input
Connection
connection
/ Required
Default
 
Notes
 
Example
 
Input
Fields
string
Default
name,adset,account_id,ad_review_feedback,adlabels,adset_id,bid_amount,campaign,campaign_id,configured_status,conversion_domain,created_time,creative,effective_status,issues_info,last_updated_by_app_id,preview_shareable_link,recommendations,status,tracking_specs
Notes
Provide a comma separated list of fields to be returned
Example
 

List Campaigns In Account#

List all campaigns in an ad account | key: listCampaignsInAccount

InputNotesExample
Input
Ad Account
string
/ Required
Notes
Provide the identifier of an Ad Account. This value can either be an Id, or the name of the account.
Example
act_342512647855388
Input
After
string
Notes
Provide the token for the item after the current one.
Example
xOTQ1MjAwNzI5NDE=
Input
Before
string
Notes
Provide the token for the item before the current one.
Example
xOTQ1MjAwNzI5NDE=
Input
Connection
connection
/ Required
Notes
 
Example
 
Input
Limit
string
Notes
Provide a limit for the result set.
Example
30

Raw Request#

Issue a raw HTTP request with the configured connection | key: rawRequest

InputDefaultNotesExample
Input
Connection
connection
/ Required
Default
 
Notes
 
Example
 
Input
Data
string
Default
 
Notes
The HTTP body payload to send to the URL. Must be a string or a reference to output from a previous step.
Example
{"exampleKey": "Example Data"}
Input
Debug Request
boolean
Default
 
Notes
Enabling this flag will log out the current request.
Example
 
Input
File Data
string
Key Value List
Default
 
Notes
File Data to be sent as a multipart form upload.
Example
[{key: "example.txt", value: "My File Contents"}]
Input
Form Data
string
Key Value List
Default
 
Notes
The Form Data to be sent as a multipart form upload.
Example
[{"key": "Example Key", "value": new Buffer("Hello World")}]
Input
Header
string
Key Value List
Default
 
Notes
A list of headers to send with the request.
Example
User-Agent: curl/7.64.1
Input
Max Retry Count
string
Default
0
Notes
The maximum number of retries to attempt.
Example
 
Input
Method
string
Default
 
Notes
 
Example
 
Input
Query Parameter
string
Key Value List
Default
 
Notes
A list of query parameters to send with the request. This is the portion at the end of the URL similar to ?key1=value1&key2=value2.
Example
 
Input
Response Type
string
Default
json
Notes
The type of data you expect in the response. You can request json, text, or binary data.
Example
binary
Input
Retry Delay (ms)
string
Default
0
Notes
The delay in milliseconds between retries.
Example
 
Input
Retry On All Errors
boolean
Default
false
Notes
If true, retries on all erroneous responses regardless of type.
Example
 
Input
Timeout
string
Default
 
Notes
The maximum time that a client will await a response to its request
Example
2000
Input
URL
string
/ Required
Default
 
Notes
This is the URL to call.
Example
/sobjects/Account
Input
Use Exponential Backoff
boolean
Default
false
Notes
Specifies whether to use a pre-defined exponential backoff strategy for retries.
Example
 

Update Ad#

Update the information and metadata of a given ad or adset | key: updateAd

InputDefaultNotesExample
Input
Ad Account
string
/ Required
Default
 
Notes
Provide the identifier of an Ad Account. This value can either be an Id, or the name of the account.
Example
act_342512647855388
Input
Ad Id
string
/ Required
Default
 
Notes
Provide the Id of an Ad or Ad Set
Example
342512647855388
Input
Ad Name
string
Default
 
Notes
Provide a name for the given ad
Example
My New Ad
Input
Connection
connection
/ Required
Default
 
Notes
 
Example
 
Input
Creative Id
string
Default
 
Notes
Provide the Id of the desired creative
Example
58789326952
Input
Fields
string
Default
name,adset,account_id,ad_review_feedback,adlabels,adset_id,bid_amount,campaign,campaign_id,configured_status,conversion_domain,created_time,creative,effective_status,issues_info,last_updated_by_app_id,preview_shareable_link,recommendations,status,tracking_specs
Notes
Provide a comma separated list of fields to be returned
Example
 
Input
Optional Values
string
Key Value List
Default
 
Notes
Provide optional values to mutate the given object.
Example
 
Input
Ad Status
string
Default
 
Notes
Provide a status for the given ad. During testing, it is recommended to set ads to a PAUSED status so as to not incur accidental spend.
Example
 
Input
Tracking
code
Default
 
Notes
Provide a JSON array containing valid tracking specs. The shape of this field can change depending on the type of ad: https://developers.facebook.com/docs/marketing-api/tracking-specs#default_by_ad
Example
[ { "action.type": [ "attention_event" ], "creative": [ "23849551358310668" ] }, { "action.type": [ "dwell" ], "creative": [ "23849551358310668" ] }, { "action.type": [ "post_engagement" ], "page": [ "105171555498035" ], "post": [ "105174712164386" ] } ]

Update Ad Creative#

Update the information and metadata of the given ad creative | key: updateAdCreative

InputDefaultNotesExample
Input
Ad Account
string
/ Required
Default
 
Notes
Provide the identifier of an Ad Account. This value can either be an Id, or the name of the account.
Example
act_342512647855388
Input
Ad Creative Id
string
/ Required
Default
 
Notes
Provide the Id of an Ad or Ad Set
Example
342512647855388
Input
After
string
Default
 
Notes
Provide the token for the item after the current one.
Example
xOTQ1MjAwNzI5NDE=
Input
Before
string
Default
 
Notes
Provide the token for the item before the current one.
Example
xOTQ1MjAwNzI5NDE=
Input
Body
string
Default
 
Notes
Provide a body for the adCreative.
Example
This is an example description body.
Input
Connection
connection
/ Required
Default
 
Notes
 
Example
 
Input
Fields
string
Default
name, object_story_spec, adlabels, body, object_id, url_tags
Notes
Provide a comma separated list of fields to be returned
Example
 
Input
Limit
string
Default
 
Notes
Provide a limit for the result set.
Example
30
Input
Name
string
Default
 
Notes
Provide a name for the adCreative.
Example
My Ad Creative
Input
Object Story Id
string
Default
 
Notes
Provide an Id for the object story of the adCreative.
Example
1051738543535_10636436633230
Input
Optional Values
string
Key Value List
Default
 
Notes
Provide optional values to mutate the given object.
Example
 
Input
URL Tags
string
Default
 
Notes
Provide an string for the URL tags on the given adCreative
Example
rid=Dcid_238495513324Cgid_23849551352290668%257Cadid_23849551899068

Update Ad Set#

Update the information and metadata of a given Ad Set | key: updateAdSet

InputDefaultNotesExample
Input
Ad Account
string
/ Required
Default
 
Notes
Provide the identifier of an Ad Account. This value can either be an Id, or the name of the account.
Example
act_342512647855388
Input
Ad Set Id
string
/ Required
Default
 
Notes
Provide the Id of an Ad or Ad Set
Example
342512647855388
Input
Ad Name
string
Default
 
Notes
Provide a name for the given ad
Example
My New Ad
Input
Connection
connection
/ Required
Default
 
Notes
 
Example
 
Input
Fields
string
Default
name,account_id,adlabels,adset_schedule,asset_feed_id,attribution_spec,bid_adjustments,bid_amount,bid_constraints,bid_info,billing_event,budget_remaining,campaign,configured_status,created_time,creative_sequence,daily_budget,daily_min_spend_target,daily_spend_cap,destination_type,effective_status,end_time,optimization_goal,optimization_sub_event,pacing_type,promoted_object,recommendations,status,targeting,start_time,targeting_optimization_types,updated_time
Notes
Provide a comma separated list of fields to be returned
Example
 
Input
Optional Values
string
Key Value List
Default
 
Notes
Provide optional values to mutate the given object.
Example
 
Input
Ad Status
string
Default
 
Notes
Provide a status for the given ad. During testing, it is recommended to set ads to a PAUSED status so as to not incur accidental spend.
Example
 
Input
Tracking
code
Default
 
Notes
Provide a JSON array containing valid tracking specs. The shape of this field can change depending on the type of ad: https://developers.facebook.com/docs/marketing-api/tracking-specs#default_by_ad
Example
[ { "action.type": [ "attention_event" ], "creative": [ "23849551358310668" ] }, { "action.type": [ "dwell" ], "creative": [ "23849551358310668" ] }, { "action.type": [ "post_engagement" ], "page": [ "105171555498035" ], "post": [ "105174712164386" ] } ]