Workflows · From Tasks · from_facebook

Purpose

Imports data from Facebook Ads.

Method of use

Before you can download data from Facebook you have to give Workflows access with a system account. Make sure the system account has access to all items you will use of Facebook.

Configuration

Example usage

extract:
    conn_id: facebook
    type: custom_audiences
    ad_account_id: 123456789012345

    filtering:
        - field: name
        operator: CONTAIN
        value: ' - '

Properties

propertytyperequireddescription
typeenumerator (account, campaigns, custom_audiences, insights)yesContains the report you want to download.
ad_account_idintegeryesContains the id of the ad account.
conn_idstringnoConnection string as handed to you by the Onesecondbefore team. Default is `facebook`
fieldsenumerator (of field names)noA default list of fields will be selected. Add the fields here if you only want a subset. Make sure you get the correct fields per report.
filteringarray of objectsyesContains array of filters. Each filter should be configured as described in the properties of filtering object
limitintegernoContains the limit of records you want to import.
levelenumerator (campaign)noOnly use when type=insights. Contains the insights aggregation level. Full list can be found here, search for level.
breakdownsenumerator(full list here)noOnly use when type=insights. Contains the limit of breakdowns.

Properties of filtering object

If you use filtering (see above) in the extract. You have to add an object every time with the fields below.

propertytyperequireddescription
fieldenumerator (see field list)yesContains the name of the field you want to filter on.
operatorenumerator (EQUAL, NOT_EQUAL, GREATER_THAN, GREATER_THAN_OR_EQUAL, LESS_THAN, LESS_THAN_OR_EQUAL, IN_RANGE, NOT_IN_RANGE, CONTAIN, NOT_CONTAIN, IN, NOT_IN, STARTS_WITH, ENDS_WITH, ANY, ALL, AFTER, BEFORE, ON_OR_AFTER, ON_OR_BEFORE, NONE)yescontains operator like e.g. EQUAL or NOT_EQUAL
valuestringyesContains the value to filter one.

Details

itemdescription
APIFacebook Marketing API
Pre-formatted schemaYes. Comes with a pre-formatted and described schema.