ActiveCampaign · Arazzo Workflow

ActiveCampaign Find or Create Tag, Then Apply to Contact

Version 1.0.0

Resolve a tag by name, creating it if needed, then tag a contact.

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

Provider

activecampaign

Workflows

find-or-create-tag-and-apply
Resolve a tag by name or create it, then apply it to a contact.
Searches tags by name and either uses the matched tag or creates a new contact-type tag, then applies the resolved tag to the supplied contact.
4 steps inputs: apiToken, contactId, tagDescription, tagName outputs: contactTagId, matchedTagId, tagId
1
findTag
Search existing tags for one matching the supplied name.
2
applyExistingTag
Apply the matched existing tag to the contact.
3
createTag
Create a new contact-type tag when no match was found.
4
applyNewTag
Apply the newly created tag to the contact.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: ActiveCampaign Find or Create Tag, Then Apply to Contact
  summary: Resolve a tag by name, creating it if needed, then tag a contact.
  description: >-
    Ensures a tag exists before applying it. The workflow lists existing tags
    and branches: when a tag matching the supplied name is found it applies that
    tag, and when no tag is found it creates the tag first and then applies it
    to the contact. 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: tagsApi
  url: ../openapi/activecampaign-tags-api-openapi.yml
  type: openapi
workflows:
- workflowId: find-or-create-tag-and-apply
  summary: Resolve a tag by name or create it, then apply it to a contact.
  description: >-
    Searches tags by name and either uses the matched tag or creates a new
    contact-type tag, then applies the resolved tag to the supplied contact.
  inputs:
    type: object
    required:
    - apiToken
    - tagName
    - contactId
    properties:
      apiToken:
        type: string
        description: ActiveCampaign API token sent in the Api-Token header.
      tagName:
        type: string
        description: Name of the tag to resolve or create.
      tagDescription:
        type: string
        description: Optional description used when creating a new tag.
      contactId:
        type: integer
        description: Identifier of the contact to apply the tag to.
  steps:
  - stepId: findTag
    description: Search existing tags for one matching the supplied name.
    operationId: retrieve-all-tags
    parameters:
    - name: Api-Token
      in: header
      value: $inputs.apiToken
    - name: search
      in: query
      value: $inputs.tagName
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      matchedTagId: $response.body#/tags/0/id
    onSuccess:
    - name: tagExists
      type: goto
      stepId: applyExistingTag
      criteria:
      - context: $response.body
        condition: $.tags.length > 0
        type: jsonpath
    - name: tagMissing
      type: goto
      stepId: createTag
      criteria:
      - context: $response.body
        condition: $.tags.length == 0
        type: jsonpath
  - stepId: applyExistingTag
    description: Apply the matched existing tag to the contact.
    operationId: create-contact-tag
    parameters:
    - name: Api-Token
      in: header
      value: $inputs.apiToken
    requestBody:
      contentType: application/json
      payload:
        contactTag:
          contact: $inputs.contactId
          tag: $steps.findTag.outputs.matchedTagId
    successCriteria:
    - condition: $statusCode == 201
    outputs:
      contactTagId: $response.body#/contactTag/id
    onSuccess:
    - name: done
      type: end
  - stepId: createTag
    description: Create a new contact-type tag when no match was found.
    operationId: create-a-new-tag
    parameters:
    - name: Api-Token
      in: header
      value: $inputs.apiToken
    requestBody:
      contentType: application/json
      payload:
        tag:
          tag: $inputs.tagName
          tagType: contact
          description: $inputs.tagDescription
    successCriteria:
    - condition: $statusCode == 201
    outputs:
      tagId: $response.body#/tag/id
  - stepId: applyNewTag
    description: Apply the newly created tag to the contact.
    operationId: create-contact-tag
    parameters:
    - name: Api-Token
      in: header
      value: $inputs.apiToken
    requestBody:
      contentType: application/json
      payload:
        contactTag:
          contact: $inputs.contactId
          tag: $steps.createTag.outputs.tagId
    successCriteria:
    - condition: $statusCode == 201
    outputs:
      contactTagId: $response.body#/contactTag/id
  outputs:
    tagId: $steps.createTag.outputs.tagId
    matchedTagId: $steps.findTag.outputs.matchedTagId
    contactTagId: $steps.applyNewTag.outputs.contactTagId

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-find-or-create-tag-and-apply-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.