ActiveCampaign: Exporting Contact Data with Custom Field using ContactCustomFieldValues table

ActiveCampaign: Exporting Contact Data with Custom Field using ContactCustomFieldValues table

You can export contacts with a specific custom field value to a CSV file using the Advanced Task Editor Mode in a Skyvia Export integration.

Steps
  1. Create a new Export integration.
  2. Open it and switch to Advanced Task Editor Mode.
  3. Add an Execute Command action.
  4. Use the following query, replacing 'your field id' with the actual utm_campaign field ID value in your ActiveCampaign connection:
SELECT Email, CreatedDate, Value
FROM (SELECT ContactId, Value
      FROM ContactCustomFieldValues
      WHERE FieldId = your field id) AS cfv
JOIN
     (SELECT Id, Email, CreatedDate
      FROM Contacts) AS ct
ON cfv.ContactId = ct.Id
GROUP BY Value

NotesNote: Value contains the custom field value. Email serves as the unique contact identifier.


Result
The exported CSV will include:
  1. Contact email
  2. Contact created date
  3. Value of the custom field
    • Related Articles

    • Resolving ActiveCampaign Backup Errors (403 Forbidden)

      Sometimes, when running an ActiveCampaign backup, users may encounter the following error: The remote server returned an error: (403) Forbidden This happens when the ActiveCampaign API receives too many requests in a short period, especially if ...
    • Understanding Records in Skyvia Data Integration

      1.1 Understanding Records in Skyvia Data Integration A record in Data Integration represents a single row in a database table. Every integration process (Import, Replication, Export, Synchronization, etc.) handles individual records. Records also ...
    • Skyvia Query: Easily Verify Data in Your Connection!

      Please follow the steps below to query your data in Skyvia Query: Log in to Skyvia and navigate to + Create New → Query. Select an existing connection or establish a new one for your data source. Choose the desired table or object from the Connection ...
    • Integration Failure Types in Skyvia Data Integration

      When using Skyvia Data Integration product, you may encounter two distinct types of integration failures: 1. Record-Level Errors These occur when one or more individual records fail to process during an integration task. For example, in operations ...
    • Replication: Table '...' Schema Validation Failed (Resolving 'Absent Columns' and 'Redundant Columns' Errors)

      If you encounter the following errors in an integration, it means the schema of your data source no longer matches the schema Skyvia has cached: Error: "Integration failed: Table 'TableName' schema validation failed: Absent columns: 'FieldName1', ...