{
  "name": "Missed Call Text Back (Quo + Make)",
  "flow": [
    {
      "id": 1,
      "module": "gateway:CustomWebHook",
      "version": 1,
      "parameters": {},
      "mapper": {},
      "metadata": {
        "designer": {
          "x": 0,
          "y": 0
        },
        "restore": {
          "expect": {
            "label": "Quo missed-call webhook"
          }
        }
      }
    },
    {
      "id": 2,
      "module": "open-phone:sendATextMessageSms",
      "version": 1,
      "parameters": {},
      "mapper": {
        "to": [
          "{{ifempty(1.data.context.participants.external[1]; 1.data.object.from)}}"
        ],
        "from": "YOUR_QUO_PHONE_NUMBER_ID",
        "content": "Sorry we missed you! This is Brightside Plumbing. Is this an emergency? Reply 1 for yes, or tell us what you need. If you smell gas, leave the building and call 911."
      },
      "filter": {
        "name": "Missed incoming calls only",
        "conditions": [
          [
            {
              "a": "{{1.type}}",
              "b": "call.missed",
              "o": "text:equal"
            }
          ],
          [
            {
              "a": "{{1.type}}",
              "b": "call.completed",
              "o": "text:equal"
            },
            {
              "a": "{{1.data.object.direction}}",
              "b": "incoming",
              "o": "text:equal"
            },
            {
              "a": "{{1.data.object.status}}",
              "b": "no-answer",
              "o": "text:equal"
            }
          ],
          [
            {
              "a": "{{1.type}}",
              "b": "call.completed",
              "o": "text:equal"
            },
            {
              "a": "{{1.data.object.direction}}",
              "b": "incoming",
              "o": "text:equal"
            },
            {
              "a": "{{1.data.object.status}}",
              "b": "missed",
              "o": "text:equal"
            }
          ]
        ]
      },
      "metadata": {
        "designer": {
          "x": 300,
          "y": 0
        }
      }
    }
  ],
  "metadata": {
    "instant": true,
    "version": 1,
    "scenario": {
      "roundtrips": 1,
      "maxErrors": 3,
      "autoCommit": true,
      "autoCommitTriggerLast": true,
      "sequential": false,
      "confidential": false,
      "dataloss": false,
      "dlq": false
    },
    "designer": {
      "orphans": []
    },
    "zone": "us2.make.com"
  }
}
