ActiveCampaign · Arazzo Workflow

ActiveCampaign Find Contact by Email and Create a Deal

Version 1.0.0

Resolve a contact by email, creating it if missing, then open a deal.

1 workflow 2 source APIs 1 provider
View Spec View on GitHub Marketing AutomationEmail MarketingCRMSales AutomationCustomer ExperienceSMS MarketingE-CommerceSegmentationWebhookArazzoWorkflows

Provider

activecampaign

Workflows

create-deal-for-contact-by-email
Resolve a contact by email or create it, then open a deal.
Searches for a contact by email, creates the contact when none is found, and opens a deal against the resolved contact.
4 steps inputs: apiToken, currency, email, firstName, groupId, lastName, ownerId, stageId, title, value outputs: contactId, dealId, matchedContactId
1
findContact
Search for an existing contact whose email matches the supplied value.
2
openDealExisting
Open a deal against the matched existing contact.
3
createContact
Create the contact when no existing match was found.
4
openDealNew
Open a deal against the newly created contact.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: ActiveCampaign Find Contact by Email and Create a Deal
  summary: Resolve a contact by email, creating it if missing, then open a deal.
  description: >-
    A lead-to-opportunity flow keyed on email. The workflow looks up a contact
    by email and branches: when the contact exists it opens a deal against that
    contact, and when no contact is found it creates the contact first and then
    opens the deal. Every step spells out its request inline, including the
    Api-Token authentication header, so the flow can be read and executed
    without opening the underlying OpenAPI description.
  version: 1.0.0
sourceDescriptions:
- name: contactsApi
  url: ../openapi/activecampaign-contacts-api-openapi.yml
  type: openapi
- name: dealsApi
  url: ../openapi/activecampaign-deals-api-openapi.yml
  type: openapi
workflows:
- workflowId: create-deal-for-contact-by-email
  summary: Resolve a contact by email or create it, then open a deal.
  description: >-
    Searches for a contact by email, creates the contact when none is found,
    and opens a deal against the resolved contact.
  inputs:
    type: object
    required:
    - apiToken
    - email
    - title
    - value
    - currency
    - groupId
    - stageId
    - ownerId
    properties:
      apiToken:
        type: string
        description: ActiveCampaign API token sent in the Api-Token header.
      email:
        type: string
        description: Email address used to resolve or create the contact.
      firstName:
        type: string
        description: Optional first name used when creating a new contact.
      lastName:
        type: string
        description: Optional last name used when creating a new contact.
      title:
        type: string
        description: Title of the deal.
      value:
        type: integer
        description: Deal value in cents.
      currency:
        type: string
        description: Three-letter lowercase currency code, such as usd.
      groupId:
        type: string
        description: Identifier of the pipeline the deal belongs to.
      stageId:
        type: string
        description: Identifier of the stage the deal starts in.
      ownerId:
        type: string
        description: Identifier of the user who owns the deal.
  steps:
  - stepId: findContact
    description: Search for an existing contact whose email matches the supplied value.
    operationId: list-all-contacts
    parameters:
    - name: Api-Token
      in: header
      value: $inputs.apiToken
    - name: email
      in: query
      value: $inputs.email
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      matchedContactId: $response.body#/contacts/0/id
    onSuccess:
    - name: contactExists
      type: goto
      stepId: openDealExisting
      criteria:
      - context: $response.body
        condition: $.contacts.length > 0
        type: jsonpath
    - name: contactMissing
      type: goto
      stepId: createContact
      criteria:
      - context: $response.body
        condition: $.contacts.length == 0
        type: jsonpath
  - stepId: openDealExisting
    description: Open a deal against the matched existing contact.
    operationId: create-a-deal-new
    parameters:
    - name: Api-Token
      in: header
      value: $inputs.apiToken
    requestBody:
      contentType: application/json
      payload:
        deal:
          title: $inputs.title
          contact: $steps.findContact.outputs.matchedContactId
          value: $inputs.value
          currency: $inputs.currency
          group: $inputs.groupId
          stage: $inputs.stageId
          owner: $inputs.ownerId
    successCriteria:
    - condition: $statusCode == 201
    outputs:
      dealId: $response.body#/deal/id
    onSuccess:
    - name: done
      type: end
  - stepId: createContact
    description: Create the contact when no existing match was found.
    operationId: create-a-new-contact
    parameters:
    - name: Api-Token
      in: header
      value: $inputs.apiToken
    requestBody:
      contentType: application/json
      payload:
        contact:
          email: $inputs.email
          firstName: $inputs.firstName
          lastName: $inputs.lastName
    successCriteria:
    - condition: $statusCode == 201
    outputs:
      contactId: $response.body#/contact/id
  - stepId: openDealNew
    description: Open a deal against the newly created contact.
    operationId: create-a-deal-new
    parameters:
    - name: Api-Token
      in: header
      value: $inputs.apiToken
    requestBody:
      contentType: application/json
      payload:
        deal:
          title: $inputs.title
          contact: $steps.createContact.outputs.contactId
          value: $inputs.value
          currency: $inputs.currency
          group: $inputs.groupId
          stage: $inputs.stageId
          owner: $inputs.ownerId
    successCriteria:
    - condition: $statusCode == 201
    outputs:
      dealId: $response.body#/deal/id
  outputs:
    matchedContactId: $steps.findContact.outputs.matchedContactId
    contactId: $steps.createContact.outputs.contactId
    dealId: $steps.openDealNew.outputs.dealId

Work with this as data

Every workflow here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for arazzo workflows

4 MCP tools reach this
  • find_arazzoBrowse and filter every workflow in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This workflow
curl "https://apis.io/api/v1/arazzo/activecampaign-create-deal-for-contact-by-email-workflow"
All arazzo workflows
curl "https://apis.io/api/v1/arazzo?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.