{
  "name": "5-TelePilot: Auto-Reply",
  "nodes": [
    {
      "parameters": {
        "events": [
          "updateNewMessage"
        ]
      },
      "id": "77815aea-5c3d-4f86-bee0-82f91632e320",
      "name": "TelePilot Trigger",
      "type": "@telepilotco/n8n-nodes-telepilot.telePilotTrigger",
      "typeVersion": 1,
      "position": [
        1240,
        -20
      ],
      "credentials": {
        "telePilotApi": {
          "id": "41",
          "name": "Personal Telegram Co-Pilot account"
        }
      }
    },
    {
      "parameters": {
        "amount": 2,
        "unit": "seconds"
      },
      "id": "2f26f51d-b0e8-47a4-b4e8-6552fe55dd0d",
      "name": "Wait",
      "type": "n8n-nodes-base.wait",
      "typeVersion": 1,
      "position": [
        1160,
        400
      ],
      "webhookId": "2efa44b6-c4e5-400b-b095-fb0bb5d5eaea"
    },
    {
      "parameters": {
        "resource": "user",
        "operation": "getUser",
        "user_id": "={{ $json.message.sender_id.user_id }}"
      },
      "id": "20128679-81eb-49aa-90bb-04417259b6a3",
      "name": "Telegram Co-Pilot getUser",
      "type": "@telepilotco/n8n-nodes-telepilot.telePilot",
      "typeVersion": 1,
      "position": [
        1340,
        400
      ],
      "credentials": {
        "telePilotApi": {
          "id": "41",
          "name": "Personal Telegram Co-Pilot account"
        }
      }
    },
    {
      "parameters": {
        "resource": "message",
        "chat_id": "={{ $json.id }}",
        "messageText": "=Hey {{ $json.first_name }}!\n\nI'm currently on a break. If your matter is of importance, please book a call with me on Calendly. \nFind a suitable timeslot using this link: https://my-personal-calendly-link\n\nCheers! "
      },
      "id": "e645bd96-91ba-4a29-8fc3-e8bfb3e298d0",
      "name": "Telegram Co-Pilot: sendMessage",
      "type": "@telepilotco/n8n-nodes-telepilot.telePilot",
      "typeVersion": 1,
      "position": [
        1520,
        400
      ],
      "credentials": {
        "telePilotApi": {
          "id": "41",
          "name": "Personal Telegram Co-Pilot account"
        }
      }
    },
    {
      "parameters": {
        "conditions": {
          "string": [
            {
              "value1": "={{ $json.message.sender_id._ }}",
              "value2": "=messageSenderUser"
            }
          ]
        }
      },
      "id": "ac93063a-eedb-4dd3-bcb8-5b467ad675fb",
      "name": "IF User Message",
      "type": "n8n-nodes-base.if",
      "typeVersion": 1,
      "position": [
        1120,
        200
      ]
    },
    {
      "parameters": {
        "conditions": {
          "boolean": [
            {
              "value1": "={{ Boolean($json.message.is_outgoing) }}"
            }
          ]
        }
      },
      "id": "d520b4d2-f537-46f5-b7cf-74478fbe72a0",
      "name": "IF incoming",
      "type": "n8n-nodes-base.if",
      "typeVersion": 1,
      "position": [
        1520,
        200
      ]
    },
    {
      "parameters": {
        "conditions": {
          "string": [
            {
              "value1": "={{ $json.message.sender_id.user_id }}",
              "value2": "={{ $json.message.chat_id }}"
            }
          ]
        }
      },
      "id": "0ed756d1-ccbb-48c2-a432-39e1890f7775",
      "name": "IF 1-on-1 chat",
      "type": "n8n-nodes-base.if",
      "typeVersion": 1,
      "position": [
        1300,
        180
      ]
    }
  ],
  "pinData": {},
  "connections": {
    "TelePilot Trigger": {
      "main": [
        [
          {
            "node": "IF User Message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait": {
      "main": [
        [
          {
            "node": "Telegram Co-Pilot getUser",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Telegram Co-Pilot getUser": {
      "main": [
        [
          {
            "node": "Telegram Co-Pilot: sendMessage",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "IF User Message": {
      "main": [
        [
          {
            "node": "IF 1-on-1 chat",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "IF incoming": {
      "main": [
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "IF 1-on-1 chat": {
      "main": [
        [
          {
            "node": "IF incoming",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "saveExecutionProgress": true,
    "saveManualExecutions": true,
    "callerPolicy": "workflowsFromSameOwner"
  },
  "versionId": "6f0c0463-d982-41a0-adae-d850a7e02aec",
  "id": "30",
  "meta": {
    "instanceId": "instanceId"
  },
  "tags": [
    {
      "createdAt": "2023-06-13T12:43:46.639Z",
      "updatedAt": "2023-06-13T12:43:46.639Z",
      "id": "10",
      "name": "workflows"
    },
    {
      "createdAt": "2023-06-13T14:47:35.054Z",
      "updatedAt": "2023-06-13T14:47:35.054Z",
      "id": "11",
      "name": "finished"
    }
  ]
}