{
  "workflow_name": "Tag LearnDash course graduates in ActiveCampaign",
  "workflow_steps": {
    "steps": [
      {
        "id": "1",
        "position": {
          "x": 0,
          "y": 0
        },
        "data": {
          "label": "Course Completed",
          "app": {
            "key": "learndash",
            "fm_app": "learndash"
          },
          "eventSlug": "course_completed",
          "eventTitle": "Course Completed",
          "layoutDirection": "horizontal",
          "stepNumber": 1
        },
        "targetPosition": "bottom",
        "type": "trigger",
        "stepNumber": 1,
        "expanded": true,
        "style": {
          "transition": "all 150ms ease-in-out"
        },
        "measured": {
          "width": 82,
          "height": 82
        },
        "application": "learndash",
        "stepID": "1",
        "action": "course_completed",
        "nodeType": "step",
        "actionAppArgs": [],
        "captureResponse": {
          "course_id": "412",
          "course_title": "Email Marketing Foundations",
          "course_link": "https://example.com/courses/email-marketing-foundations/",
          "user_id": "87",
          "user_email": "maya.chen@example.com",
          "first_name": "Maya",
          "last_name": "Chen",
          "display_name": "Maya Chen",
          "date_completed": "2026-10-22 16:40:12"
        },
        "responses": [
          {
            "letter": "A",
            "time": "01/07/2026, 10:00:00",
            "response": {
              "course_id": "412",
              "course_title": "Email Marketing Foundations",
              "course_link": "https://example.com/courses/email-marketing-foundations/",
              "user_id": "87",
              "user_email": "maya.chen@example.com",
              "first_name": "Maya",
              "last_name": "Chen",
              "display_name": "Maya Chen",
              "date_completed": "2026-10-22 16:40:12"
            }
          }
        ],
        "activeResponseIndex": 0
      },
      {
        "id": "2",
        "position": {
          "x": 175,
          "y": 0
        },
        "type": "action",
        "data": {
          "label": "Create/Update ActiveCampaign contact",
          "layoutDirection": "horizontal",
          "stepNumber": 2,
          "app": {
            "key": "activecampaign",
            "fm_app": "activecampaign"
          },
          "eventSlug": "create_or_update_contact",
          "eventTitle": "Create or Update Contact"
        },
        "parentType": "step",
        "style": {
          "transition": "all 150ms ease-in-out"
        },
        "measured": {
          "width": 82,
          "height": 82
        },
        "actionAppArgs": {
          "email": "{learndash1.user_email}",
          "firstName": "{learndash1.first_name}",
          "lastName": "{learndash1.last_name}"
        },
        "application": "activecampaign",
        "action": "create_or_update_contact",
        "nodeType": "step",
        "stepID": "2"
      },
      {
        "id": "3",
        "position": {
          "x": 350,
          "y": 0
        },
        "type": "action",
        "data": {
          "label": "Tag as course graduate",
          "layoutDirection": "horizontal",
          "stepNumber": 3,
          "app": {
            "key": "activecampaign",
            "fm_app": "activecampaign"
          },
          "eventSlug": "add_tag_to_contact",
          "eventTitle": "Add/Remove Tag From Contact"
        },
        "parentType": "step",
        "style": {
          "transition": "all 150ms ease-in-out"
        },
        "measured": {
          "width": 82,
          "height": 82
        },
        "actionAppArgs": {
          "contact_id": "{activecampaign2.contact_id}",
          "tag_id": "",
          "tag_action": "add"
        },
        "application": "activecampaign",
        "action": "add_tag_to_contact",
        "nodeType": "step",
        "stepID": "3"
      },
      {
        "id": "4",
        "position": {
          "x": 525,
          "y": 0
        },
        "type": "action",
        "data": {
          "label": "Log the completed course",
          "layoutDirection": "horizontal",
          "stepNumber": 4,
          "app": {
            "key": "activecampaign",
            "fm_app": "activecampaign"
          },
          "eventSlug": "add_contact_note",
          "eventTitle": "Add Contact Note"
        },
        "parentType": "step",
        "style": {
          "transition": "all 150ms ease-in-out"
        },
        "measured": {
          "width": 82,
          "height": 82
        },
        "actionAppArgs": {
          "contact_id": "{activecampaign2.contact_id}",
          "note": "Completed the LearnDash course \"{learndash1.course_title}\" on {learndash1.date_completed}."
        },
        "application": "activecampaign",
        "action": "add_contact_note",
        "nodeType": "step",
        "stepID": "4"
      },
      {
        "id": "main_end_placeholder",
        "position": {
          "x": 700,
          "y": 0
        },
        "type": "placeholder",
        "data": {
          "label": "+",
          "layoutDirection": "horizontal",
          "stepNumber": null,
          "app": []
        },
        "measured": {
          "width": 40,
          "height": 82
        },
        "stepID": "main_end_placeholder",
        "nodeType": "placeholder",
        "actionAppArgs": []
      }
    ],
    "edges": [
      {
        "id": "e-1-2",
        "source": "1",
        "target": "2",
        "type": "step",
        "data": []
      },
      {
        "id": "e-2-3",
        "source": "2",
        "target": "3",
        "type": "step",
        "data": []
      },
      {
        "id": "e-3-4",
        "source": "3",
        "target": "4",
        "type": "step",
        "data": []
      },
      {
        "id": "e-4-main_end_placeholder",
        "source": "4",
        "target": "main_end_placeholder",
        "type": "placeholder",
        "data": []
      }
    ]
  },
  "workflow_settings": {
    "name": "Tag LearnDash course graduates in ActiveCampaign",
    "folder": "all",
    "description": "When a student completes a LearnDash course, this workflow creates or updates their ActiveCampaign contact, adds a tag and logs a note with the course name and completion date. Course creators can use the tag to start an upsell or review-request automation. After import, pick the course in the trigger and choose the tag in the ActiveCampaign step.",
    "status": "off",
    "user_email": "",
    "webhook_queue": "disabled",
    "workflow_auth_key": "",
    "builder_version": "v2",
    "time": "",
    "ai_generated": "yes"
  }
}