{
  "openruna_format": "flow-graph-v1",
  "title": "0963_Mautic_Webhook_Update_Webhook",
  "slug": "0963-mautic-webhook-update-webhook",
  "source_filename": "0963_Mautic_Webhook_Update_Webhook.json",
  "nodes": [
    {
      "id": "Webhook",
      "name": "Webhook",
      "integration": "webhook",
      "kind": "trigger"
    },
    {
      "id": "Mautic",
      "name": "Mautic",
      "integration": "mautic",
      "kind": "action"
    },
    {
      "id": "Find User",
      "name": "Find User",
      "integration": "mautic",
      "kind": "action"
    },
    {
      "id": "Update User",
      "name": "Update User",
      "integration": "mautic",
      "kind": "action"
    },
    {
      "id": "Tag User",
      "name": "Tag User",
      "integration": "mautic",
      "kind": "action"
    },
    {
      "id": "Unsubscribe User",
      "name": "Unsubscribe User",
      "integration": "mautic",
      "kind": "action"
    },
    {
      "id": "Split Full Name",
      "name": "Split Full Name",
      "integration": "function",
      "kind": "action"
    },
    {
      "id": "If not found return -1",
      "name": "If not found return -1",
      "integration": "function",
      "kind": "action"
    },
    {
      "id": "@MAIN STUDENT DATA",
      "name": "@MAIN STUDENT DATA",
      "integration": "merge",
      "kind": "logic"
    },
    {
      "id": "Remove unsubscribe",
      "name": "Remove unsubscribe",
      "integration": "mautic",
      "kind": "action"
    },
    {
      "id": "Find User To Tag Sale",
      "name": "Find User To Tag Sale",
      "integration": "mautic",
      "kind": "action"
    },
    {
      "id": "Set userFound",
      "name": "Set userFound",
      "integration": "set",
      "kind": "logic"
    },
    {
      "id": "Switch Webhook Types",
      "name": "Switch Webhook Types",
      "integration": "switch",
      "kind": "logic"
    },
    {
      "id": "Set Webhook Request",
      "name": "Set Webhook Request",
      "integration": "set",
      "kind": "logic"
    },
    {
      "id": "IF NOT userFound",
      "name": "IF NOT userFound",
      "integration": "if",
      "kind": "logic"
    },
    {
      "id": "Switch User.type",
      "name": "Switch User.type",
      "integration": "switch",
      "kind": "logic"
    },
    {
      "id": "IF unsubscribe_from_marketing_emails",
      "name": "IF unsubscribe_from_marketing_emails",
      "integration": "if",
      "kind": "logic"
    }
  ],
  "edges": [
    {
      "from": "Webhook",
      "to": "Set Webhook Request"
    },
    {
      "from": "Find User",
      "to": "If not found return -1"
    },
    {
      "from": "Update User",
      "to": "IF unsubscribe_from_marketing_emails"
    },
    {
      "from": "Set userFound",
      "to": "@MAIN STUDENT DATA"
    },
    {
      "from": "Split Full Name",
      "to": "@MAIN STUDENT DATA"
    },
    {
      "from": "IF NOT userFound",
      "to": "Mautic"
    },
    {
      "from": "IF NOT userFound",
      "to": "Switch User.type"
    },
    {
      "from": "Switch User.type",
      "to": "Update User",
      "label": "User.updated"
    },
    {
      "from": "Switch User.type",
      "to": "Unsubscribe User",
      "label": "User.unsubscribe_from_marketing_emails"
    },
    {
      "from": "Switch User.type",
      "to": "Remove unsubscribe",
      "label": "=User.subscribe_to_marketing_emails"
    },
    {
      "from": "@MAIN STUDENT DATA",
      "to": "IF NOT userFound"
    },
    {
      "from": "Set Webhook Request",
      "to": "Switch Webhook Types"
    },
    {
      "from": "Switch Webhook Types",
      "to": "Find User",
      "label": "User."
    },
    {
      "from": "Switch Webhook Types",
      "to": "Split Full Name",
      "label": "User."
    },
    {
      "from": "Switch Webhook Types",
      "to": "Find User To Tag Sale",
      "label": "Sale."
    },
    {
      "from": "Find User To Tag Sale",
      "to": "Tag User"
    },
    {
      "from": "If not found return -1",
      "to": "Set userFound"
    },
    {
      "from": "IF unsubscribe_from_marketing_emails",
      "to": "Unsubscribe User"
    },
    {
      "from": "IF unsubscribe_from_marketing_emails",
      "to": "Remove unsubscribe"
    }
  ]
}