{
  "openruna_format": "flow-graph-v1",
  "title": "Format US Phone Number",
  "slug": "format-us-phone-number",
  "source_filename": "1918_Executeworkflow_Automation_Triggered.json",
  "nodes": [
    {
      "id": "When Executed by Another Workflow",
      "name": "When Executed by Another Workflow",
      "integration": "executeWorkflow",
      "kind": "trigger"
    },
    {
      "id": "Check if first digit is valid country code",
      "name": "Check if first digit is valid country code",
      "integration": "if",
      "kind": "logic"
    },
    {
      "id": "Add valid country code",
      "name": "Add valid country code",
      "integration": "set",
      "kind": "logic"
    },
    {
      "id": "Strip phone number formatting",
      "name": "Strip phone number formatting",
      "integration": "set",
      "kind": "logic"
    },
    {
      "id": "Check number of digits in phone number",
      "name": "Check number of digits in phone number",
      "integration": "switch",
      "kind": "logic"
    },
    {
      "id": "Format phone numbers",
      "name": "Format phone numbers",
      "integration": "set",
      "kind": "logic"
    },
    {
      "id": "Clear invalid number",
      "name": "Clear invalid number",
      "integration": "set",
      "kind": "logic"
    }
  ],
  "edges": [
    {
      "from": "Clear invalid number",
      "to": "Format phone numbers"
    },
    {
      "from": "Add valid country code",
      "to": "Format phone numbers"
    },
    {
      "from": "Strip phone number formatting",
      "to": "Check number of digits in phone number"
    },
    {
      "from": "When Executed by Another Workflow",
      "to": "Strip phone number formatting"
    },
    {
      "from": "Check number of digits in phone number",
      "to": "Check if first digit is valid country code"
    },
    {
      "from": "Check number of digits in phone number",
      "to": "Add valid country code"
    },
    {
      "from": "Check number of digits in phone number",
      "to": "Clear invalid number"
    },
    {
      "from": "Check number of digits in phone number",
      "to": "Clear invalid number"
    },
    {
      "from": "Check if first digit is valid country code",
      "to": "Format phone numbers"
    },
    {
      "from": "Check if first digit is valid country code",
      "to": "Clear invalid number"
    }
  ]
}