{
  "format": "chatigram-workflow",
  "version": 1,
  "metadata": {
    "sourceName": "Find a CRM contact before creating a duplicate",
    "importHelp": {
      "note": "Setup required. Replace the placeholder API URL, authorization, test email, and the query parameter required by your CRM. This starter performs no create action. Placeholder endpoints use example.invalid and cannot call a real business service. Keep the workflow disabled until you finish the setup and review its effects."
    }
  },
  "workflow": {
    "instruction": null,
    "multiLanguageSupport": null,
    "properties": [],
    "trigger": {
      "$tag": "Trigger",
      "type": "MANUAL",
      "data": {}
    },
    "nodes": [
      {
        "$tag": "Node",
        "id": "d0c00000-0000-4000-8000-000000000001",
        "name": "contactLookup",
        "parentId": null,
        "branchIndex": 0,
        "type": "HTTP_REQUEST_NODE_TYPE",
        "data": {
          "request": {
            "method": "GET",
            "path": [
              {
                "$tag": "Constant",
                "value": "https://business-api.example.invalid/crm/contacts"
              }
            ],
            "headers": [
              {
                "key": "Content-Type",
                "value": [
                  {
                    "$tag": "Constant",
                    "value": "application/json"
                  }
                ]
              }
            ],
            "queryStrings": [
              {
                "key": "email",
                "value": [
                  {
                    "$tag": "Constant",
                    "value": "person@example.com"
                  }
                ]
              }
            ],
            "body": [
              {
                "$tag": "Constant",
                "value": ""
              }
            ]
          },
          "responseHandlers": [
            {
              "$tag": "GetWholeAsString",
              "variableName": "response"
            }
          ]
        }
      },
      {
        "$tag": "Node",
        "id": "d0c00000-0000-4000-8000-000000000002",
        "name": "contactResult",
        "parentId": "d0c00000-0000-4000-8000-000000000001",
        "branchIndex": 0,
        "type": "SET_VARIABLE",
        "data": {
          "variableValue": [
            {
              "$tag": "Variable",
              "name": "contactLookup.response"
            }
          ]
        }
      },
      {
        "$tag": "Node",
        "id": "d0c00000-0000-4000-8000-000000000003",
        "name": "lookupFailed",
        "parentId": "d0c00000-0000-4000-8000-000000000001",
        "branchIndex": 1,
        "type": "SET_VARIABLE",
        "data": {
          "variableValue": [
            {
              "$tag": "Constant",
              "value": "Contact lookup unavailable; do not create another contact automatically."
            }
          ]
        }
      }
    ],
    "gotos": []
  }
}
