Facebook Marketing Component

Interact with ads and adsets in your Facebook Marketing account.
Component key: facebook-marketing#
DescriptionFacebook 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.0This 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.
- Select Create app, take note of the App Id and App Secret under the basic tab.
- Navigate to the Facebook Login Section:
- You will see an input to enter your Prismatic Redirect URL.
- Under the Valid OAuth Redirect URIs section add
https://oauth2.prismatic.io/callback
as a Redirect URI.
- Now add a new Facebook Marketing action to your Prismatic integration, and you will see a new connection.
- Enter the values that you previously saved from your Facebook Developer App.
- 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
Input | Default | Notes | Example |
---|---|---|---|
Input Authorize URL string / Required | Default https://www.facebook.com/v15.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/v15.0/oauth/access_token | Notes Provide a valid Facebook Marketing version to complete the Token URL | Example |
#
Data Sources#
Business NamesA picklist of business names | key: businessNames | type: picklist
Input | Notes |
---|---|
Input Connection connection / Required | Notes |
#
Actions#
Add URL Tags To Ad CreativeUpdate an existing Ad Creative to include a new set of URL Tags | key: addUrlTagsToCreative
Input | Default | Notes | Example |
---|---|---|---|
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 AdDelete the information and metadata of a given ad | key: deleteAd
Input | Notes | Example |
---|---|---|
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 AdGet the information and metadata of a given ad | key: getAd
Input | Default | Notes | Example |
---|---|---|---|
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 AccountGet the information and metadata of the given ad account | key: getAdAccount
Input | Default | Notes | Example |
---|---|---|---|
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 CreativeGet the information and metadata of the given ad creative | key: getAdCreative
Input | Default | Notes | Example |
---|---|---|---|
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 SetGet the information and metadata of a given Ad Set | key: getAdSet
Input | Default | Notes | Example |
---|---|---|---|
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 Business By NameFetch an business with the provided name | key: businessByName
Input | Notes |
---|---|
Input Business Name string / Required | Notes |
Input Connection connection / Required | Notes |
#
Get Current UserGet the information and metadata of the current user | key: getCurrentUser
Input | Notes |
---|---|
Input Connection connection / Required | Notes |
#
Get User By IdGet the information and metadata of a given user | key: getUserById
Input | Notes | Example |
---|---|---|
Input Connection connection / Required | Notes | Example |
Input User Id string / Required | Notes Provide the Id of a user. | Example 587490763 |
#
List Ad AccountsGet the information and metadata of the current user | key: listAddAccounts
Input | Default | Notes | Example |
---|---|---|---|
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 CreativesList all ad creatives in a given ad account | key: listAdCreatives
Input | Default | Notes | Example |
---|---|---|---|
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 LeadsList all ad groups in a given ad account | key: listAdLeads
Input | Default | Notes | Example |
---|---|---|---|
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 PreviewsGet a list of all previews of the given ad | key: getAdPreview
Input | Notes | Example |
---|---|---|
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 AccountList all ads in an ad account | key: listAdSetsInAccount
Input | Default | Notes | Example |
---|---|---|---|
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 AccountList all ad sets in an ad account | key: listAdsInAccount
Input | Default | Notes | Example |
---|---|---|---|
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 AdsetList all ads in a given adset | key: listAdsInAdset
Input | Default | Notes | Example |
---|---|---|---|
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 AccountList all campaigns in an ad account | key: listCampaignsInAccount
Input | Notes | Example |
---|---|---|
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 RequestIssue a raw HTTP request with the configured connection | key: rawRequest
Input | Default | Notes | Example |
---|---|---|---|
Input Connection connection | 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 false | 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 AdUpdate the information and metadata of a given ad or adset | key: updateAd
Input | Default | Notes | Example |
---|---|---|---|
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
|
#
Update Ad CreativeUpdate the information and metadata of the given ad creative | key: updateAdCreative
Input | Default | Notes | Example |
---|---|---|---|
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 SetUpdate the information and metadata of a given Ad Set | key: updateAdSet
Input | Default | Notes | Example |
---|---|---|---|
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
|