{
  "flow": [
    {
      "id": 1,
      "mapper": {},
      "module": "gateway:CustomWebHook",
      "version": 1,
      "metadata": {
        "designer": {
          "x": 0,
          "y": 0,
          "name": "Webhook \u2014 ManyChat DM Capture"
        }
      },
      "parameters": {
        "__IMTHOOK__": null
      }
    },
    {
      "id": 2,
      "mapper": {
        "id": "YOUR_KIT_TAG_ID",
        "email": "{{1.email}}"
      },
      "module": "convertkit:addTagToCustomer",
      "onerror": [
        {
          "id": 10,
          "mapper": {
            "base": "YOUR_AIRTABLE_BASE_ID",
            "table": "YOUR_AIRTABLE_TABLE_ID",
            "record": {
              "YOUR_FIELD_1": "{{now}}",
              "YOUR_FIELD_2": "Todo",
              "YOUR_FIELD_3": "Kit tag failed for {{1.email}} in Capture Machine: {{2.error.message}}",
              "YOUR_FIELD_4": "Capture Machine \u2014 ManyChat to Kit to Airtable"
            },
            "typecast": false,
            "useColumnId": true
          },
          "module": "airtable:ActionCreateRecord",
          "version": 3,
          "metadata": {
            "designer": {
              "x": 300,
              "y": 300,
              "name": "Log Error"
            }
          },
          "parameters": {
            "__IMTCONN__": null
          }
        },
        {
          "id": 11,
          "mapper": {
            "text": "\u26a0\ufe0f Capture Machine \u2014 Kit tag failed for {{1.email}}. Error: {{2.error.message}}. Check Make's execution history.",
            "chatId": "YOUR_TELEGRAM_CHAT_ID"
          },
          "module": "telegram:SendReplyMessage",
          "version": 1,
          "metadata": {
            "designer": {
              "x": 600,
              "y": 300,
              "name": "Alert \u2014 Kit Tag Failed"
            }
          },
          "parameters": {
            "__IMTCONN__": null
          }
        }
      ],
      "version": 1,
      "metadata": {
        "designer": {
          "x": 300,
          "y": 0,
          "name": "Kit \u2014 Tag ch7-capture"
        }
      },
      "parameters": {
        "__IMTCONN__": null
      }
    },
    {
      "id": 3,
      "mapper": {
        "base": "YOUR_AIRTABLE_BASE_ID",
        "table": "YOUR_AIRTABLE_TABLE_ID",
        "record": {
          "YOUR_FIELD_1": "{{1.email}}",
          "YOUR_FIELD_2": "{{now}}",
          "YOUR_FIELD_3": [
            "Lead"
          ],
          "YOUR_FIELD_4": "{{if(1.postId; 1.postId; 1.keyword)}}",
          "YOUR_FIELD_5": "{{1.name}}",
          "YOUR_FIELD_6": "New"
        },
        "typecast": true,
        "useColumnId": true
      },
      "module": "airtable:ActionCreateRecord",
      "onerror": [
        {
          "id": 20,
          "mapper": {
            "base": "YOUR_AIRTABLE_BASE_ID",
            "table": "YOUR_AIRTABLE_TABLE_ID",
            "record": {
              "YOUR_FIELD_1": "{{now}}",
              "YOUR_FIELD_2": "Todo",
              "YOUR_FIELD_3": "Airtable Contacts log failed for {{1.email}} in Capture Machine: {{3.error.message}}",
              "YOUR_FIELD_4": "Capture Machine \u2014 ManyChat to Kit to Airtable"
            },
            "typecast": false,
            "useColumnId": true
          },
          "module": "airtable:ActionCreateRecord",
          "version": 3,
          "metadata": {
            "designer": {
              "x": 900,
              "y": 300,
              "name": "Log Error"
            }
          },
          "parameters": {
            "__IMTCONN__": null
          }
        },
        {
          "id": 21,
          "mapper": {
            "text": "\u26a0\ufe0f Capture Machine \u2014 Airtable Contacts log failed for {{1.email}}. Error: {{3.error.message}}. Kit tag was still applied \u2014 check Make's execution history.",
            "chatId": "YOUR_TELEGRAM_CHAT_ID"
          },
          "module": "telegram:SendReplyMessage",
          "version": 1,
          "metadata": {
            "designer": {
              "x": 1200,
              "y": 300,
              "name": "Alert \u2014 Airtable Log Failed"
            }
          },
          "parameters": {
            "__IMTCONN__": null
          }
        }
      ],
      "version": 3,
      "metadata": {
        "designer": {
          "x": 600,
          "y": 0,
          "name": "Airtable \u2014 Log to Contacts"
        }
      },
      "parameters": {
        "__IMTCONN__": null
      }
    }
  ],
  "name": "Capture Machine \u2014 ManyChat to Kit to Airtable",
  "metadata": {
    "instant": true,
    "version": 1
  },
  "scheduling": {
    "type": "immediately"
  }
}