Skip to main content
Question

Unable to trigger "generic" workflow in CX app

  • April 27, 2026
  • 2 replies
  • 3 views

cyberwombat

I am developing a CX app that is supposed to listen to abandoned carts, push the data to my API. I have created as part of this some custom objects. My goal is to receive custom webhook urls from AC and use these to push data at a later time (my app is no synchronous) to the custom objects that will then trigger another automation.

The first part works - I receive the cart. What is not happening is any call to my webhook register url to receive the webhook URLs. It does not happen when I setup the app in my automation (the one that uses abandoned carts as a trigger). Since there are two workflows defined here - one is “automation” which works and the other is “generic” which never gets called because I have no idea how I would trigger it. 

Any idea? For a type: generic inbound workflow with a data_intake, where in the AC UI does the user trigger the connect/select/map setup flow?  Support doesn’t seem to know nor do the docs mention much. 

 

2 replies

cyberwombat
  • Author
  • New Participant
  • April 27, 2026

Adding code here as it would not accept it on initial post.

{
"$version": "2",
"api": {
"base_url": "https://api.myapp.example"
},
"auth": {
"myapp-oauth": {
"type": "oauth2",
"configuration": {
"authorization_base_url": "https://api.myapp.example/activecampaign/oauth/authorize",
"client_id": "myapp-activecampaign",
"client_secret": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"scopes": [],
"token_url": "https://api.myapp.example/activecampaign/oauth/token"
}
}
},
"objects": [
{
"name": "contact",
"labels": {
"singular": "Contact",
"plural": "Contacts"
},
"description": "ActiveCampaign Contact",
"external_id": "id",
"ac_object": "Contact",
"fields": []
},
{
"name": "myapp-record",
"labels": {
"singular": "MyApp Record",
"plural": "MyApp Records"
},
"description": "A record generated by MyApp",
"external_id": ".record_id",
"fields": [
{
"id": "record_id",
"labels": {
"singular": "Record ID",
"plural": "Record IDs"
},
"description": "Unique MyApp record identifier",
"type": "text",
"is_required": true
},
{
"id": "order_id",
"labels": {
"singular": "Order ID",
"plural": "Order IDs"
},
"description": "Order identifier associated with this record",
"type": "text",
"is_required": true
},
{
"id": "created_at",
"labels": {
"singular": "Created At",
"plural": "Created At"
},
"description": "Date the record was created",
"type": "date",
"is_required": true
},
{
"id": "video_url",
"labels": {
"singular": "Video URL",
"plural": "Video URLs"
},
"description": "URL of a generated video asset",
"type": "text",
"is_required": false
},
{
"id": "thumb_url",
"labels": {
"singular": "Thumb URL",
"plural": "Thumb URLs"
},
"description": "URL of a thumbnail image",
"type": "text",
"is_required": false
},
{
"id": "body",
"labels": {
"singular": "Body",
"plural": "Bodies"
},
"description": "Email body content",
"type": "textarea",
"is_required": false
},
{
"id": "subject",
"labels": {
"singular": "Subject",
"plural": "Subjects"
},
"description": "Email subject line",
"type": "text",
"is_required": false
},
{
"id": "preheader",
"labels": {
"singular": "Preheader",
"plural": "Preheaders"
},
"description": "Email preheader text",
"type": "text",
"is_required": false
},
{
"id": "cart_url",
"labels": {
"singular": "Cart URL",
"plural": "Cart URLs"
},
"description": "URL back to the customer cart",
"type": "text",
"is_required": false
}
],
"relationships": [
{
"id": "myapp_record_to_contact",
"labels": {
"singular": "Related contact",
"plural": "Related contacts"
},
"description": "Contact this record belongs to",
"object": "contact",
"has_many": false,
"field": ".contact_id",
"type": "data"
}
],
"event_type_field": ".event_type",
"event_types": [
{
"value": "myapp_created",
"display": "Record created",
"description": "Occurs when MyApp first registers the record"
},
{
"value": "myapp_content_ready",
"display": "Record content ready",
"description": "Occurs when MyApp has generated assets for the record"
},
{
"value": "myapp_record_done",
"display": "Record done",
"description": "Occurs when a record is complete and the AC custom object should be removed by external ID"
}
],
"transform": {
"record_id": ".record_id",
"order_id": ".order_id",
"created_at": ".created_at",
"video_url": ".video_url",
"thumb_url": ".thumb_url",
"body": ".body",
"subject": ".subject",
"preheader": ".preheader",
"cart_url": ".cart_url"
},
"prepare_to_transform": {
"default": {
"!jq": ".myapp_record // ."
}
}
}
],
"data_intake": [
{
"name": "myapp_content_ready",
"type": "webhook",
"scope": "workflow",
"create": {
"!pipe": [
{
"!http": {
"method": "POST",
"path": "/activecampaign/webhooks/register",
"body": {
"url": "${webhook.url}"
}
}
},
{
"!jq": ".body | { webhook_id: .id }"
},
{
"!save": {
"scope": "workflow"
}
}
]
},
"delete": {
"!http": {
"method": "DELETE",
"path": "/activecampaign/webhooks/register/${data.workflow.webhook_id}"
}
}
}
],
"workflows": [
{
"name": "myapp-outbound",
"label": "MyApp - Outbound Event Ingest",
"description": "Send contact and order payloads to MyApp for processing",
"type": "automations",
"auth": "myapp-oauth",
"setup": {
"connect": {
"label": "Connect",
"describe_connection": {
"!pipe": [
{
"!http": {
"method": "GET",
"path": "/activecampaign/auth/verify",
"headers": {
"accept": "application/json"
}
}
},
{
"!jq": "{ account_id: .id, description: .name }"
}
]
}
},
"select": {
"label": "MyApp Settings",
"form_fields": [
{
"id": "store-domain",
"label": "Store domain",
"type": "text",
"required": false,
"placeholder": "my-shop.myshopify.com"
},
{
"id": "notes",
"label": "Workflow notes",
"type": "textarea",
"required": false,
"personalize": "ActiveCampaignContact",
"placeholder": "Optional notes sent with event metadata"
}
]
},
"map": {
"label": "Mapping",
"describe_source": {
"label": "ActiveCampaign",
"options": {
"!resource": "ActiveCampaignContact.fields"
}
},
"describe_target": {
"label": "MyApp Contact",
"options": {
"!pipe": [
{
"!http": {
"method": "GET",
"path": "/activecampaign/workflows/fields"
}
},
{
"!jq": "[\"first_name\", \"email_address\"] as $required | .fields | map( .field_id as $id | { id: .field_id, title: .label, required: (if ($required | index($id)) == null then false else true end)})"
}
]
}
}
}
},
"data_pipeline": {
"source": {
"!resource": "ActiveCampaignContact"
},
"target": {
"!pipe": [
{
"!http": {
"target": "activecampaign",
"method": "GET",
"path": "/api/3/ecomOrders",
"params": {
"filters[email]": "${piped_content.0.email_address}",
"filters[state]": 2,
"limit": 1,
"orders[id]": "DESC"
}
}
},
{
"!http": {
"target": "activecampaign",
"method": "GET",
"path": "/api/3/ecomOrders/${piped_content.1.body.ecomOrders.0.id}/orderProducts"
}
},
{
"!http": {
"method": "POST",
"path": "/activecampaign/workflows/contact-event",
"body": {
"store_domain": "${custom_data.store-domain.value | default}",
"notes": "${custom_data.notes.value | default}",
"contact": "${piped_content.0}",
"ecom_orders": "${piped_content.1.body.ecomOrders | default}",
"ecom_order_products": "${piped_content.2.body.ecomOrderProducts | default}",
"source_data": "${source_data}"
}
}
}
]
}
}
},
{
"name": "myapp-sync-records",
"label": "MyApp - Sync Records",
"description": "Create, update, or delete MyApp Record custom object records from inbound webhooks.",
"type": "generic",
"resource_type": {
"singular": "myapp record",
"plural": "myapp records"
},
"auth": "myapp-oauth",
"data_intake": "myapp_content_ready",
"setup": {
"connect": {
"label": "Connect",
"describe_connection": {
"!pipe": [
{
"!http": {
"method": "GET",
"path": "/activecampaign/auth/verify",
"headers": {
"accept": "application/json"
}
}
},
{
"!jq": "{ account_id: .id, description: .name }"
}
]
}
},
"select": {
"label": "MyApp Record Events",
"description": "Sync MyApp record payloads to ActiveCampaign.",
"form_fields": [],
"describe_selection": {
"resource_id": {
"!jq": "\"myapp-record\""
},
"display": {
"!jq": "\"MyApp Records\""
}
}
},
"map": {
"label": "Mapping",
"describe_source": {
"label": "MyApp Payload",
"options": {
"!jq": "[{ id: \"contact_id\", title: \"Contact ID\", type: \"string\" }, { id: \"record_id\", title: \"Record ID\", type: \"string\" }, { id: \"order_id\", title: \"Order ID\", type: \"string\" }, { id: \"created_at\", title: \"Created At\", type: \"string\" }, { id: \"video_url\", title: \"Video URL\", type: \"string\" }, { id: \"thumb_url\", title: \"Thumb URL\", type: \"string\" }, { id: \"body\", title: \"Body\", type: \"string\" }, { id: \"subject\", title: \"Subject\", type: \"string\" }, { id: \"preheader\", title: \"Preheader\", type: \"string\" }, { id: \"cart_url\", title: \"Cart URL\", type: \"string\" }, { id: \"event_type\", title: \"Event Type\", type: \"string\" }]"
}
},
"describe_target": {
"label": "MyApp Record",
"options": {
"!jq": "[{ id: \"record_id\", title: \"Record ID\", type: \"string\" }, { id: \"order_id\", title: \"Order ID\", type: \"string\" }, { id: \"created_at\", title: \"Created At\", type: \"string\" }, { id: \"video_url\", title: \"Video URL\", type: \"string\" }, { id: \"thumb_url\", title: \"Thumb URL\", type: \"string\" }, { id: \"body\", title: \"Body\", type: \"string\" }, { id: \"subject\", title: \"Subject\", type: \"string\" }, { id: \"preheader\", title: \"Preheader\", type: \"string\" }, { id: \"cart_url\", title: \"Cart URL\", type: \"string\" }]"
}
}
}
},
"data_pipeline": {
"source": {
"!pipe": [
{
"!jq": "{ raw: ., contact_id: .contact_id }"
},
{
"!resource": {
"action": "ActiveCampaignCustomObject.transform",
"object": "myapp-record",
"data": "${piped_content.0.raw}"
}
},
{
"!jq": "{ contact_id: ${piped_content.0.contact_id}, custom_object: { external_id: ${piped_content.0.raw.record_id}, fields: ${piped_content.1} }, event_type: ${piped_content.0.raw.event_type}, should_delete: (${piped_content.0.raw.event_type} == \"myapp_record_done\" or ${piped_content.0.raw.event_type} == \"myapp_deleted\") }"
}
]
},
"target": {
"!switch": {
"jq": "if ${source_data.piped_content.2.should_delete} then 0 else 1 end",
"cases": [
{
"!http": {
"method": "POST",
"path": "/activecampaign/workflows/myapp-record/delete",
"body": {
"external_id": "${source_data.piped_content.2.custom_object.external_id}",
"event_type": "${source_data.piped_content.2.event_type}",
"source_data": "${source_data}"
}
}
},
{
"!pipe": [
{
"!resource": {
"action": "ActiveCampaignCustomObject.sync",
"object": "myapp-record",
"data": {
"external_id": "${source_data.piped_content.2.custom_object.external_id}",
"fields": "${source_data.piped_content.2.custom_object.fields}",
"relationships": [
{
"name": "primary-contact",
"value": [
"${source_data.piped_content.2.contact_id}"
]
}
]
}
}
}
]
}
]
}
}
}
}
]
}

cyberwombat
  • Author
  • New Participant
  • April 27, 2026

ok figured it out. The CX studio was hanging and the button for Test App In Sandbox not working. When I tried the paypal sample I could see it worked.