{
  "name": "FlowPantry - w9-chase-1099-prep",
  "flow": [
    {
      "id": 1,
      "module": "gateway:CustomWebHook",
      "version": 1,
      "parameters": {
        "hook": null,
        "maxResults": 1
      },
      "mapper": {},
      "metadata": {
        "designer": {
          "x": 0,
          "y": 0
        }
      }
    },
    {
      "id": 2,
      "module": "builtin:BasicRouter",
      "version": 1,
      "parameters": {},
      "metadata": {
        "designer": {
          "x": 300,
          "y": 0
        }
      },
      "routes": [
        {
          "flow": [
            {
              "id": 3,
              "module": "http:ActionSendData",
              "version": 3,
              "parameters": {},
              "filter": {
                "name": "Send a W-9 request",
                "conditions": [
                  [
                    {
                      "a": "{{1.w9_on_file}}",
                      "o": "text:notequal:ci",
                      "b": "yes"
                    },
                    {
                      "a": "{{1.email}}",
                      "o": "exist"
                    },
                    {
                      "a": "{{ifempty(1.reminders_sent; 0)}}",
                      "o": "number:less",
                      "b": "4"
                    },
                    {
                      "a": "{{1.last_reminder}}",
                      "o": "notexist"
                    }
                  ],
                  [
                    {
                      "a": "{{1.w9_on_file}}",
                      "o": "text:notequal:ci",
                      "b": "yes"
                    },
                    {
                      "a": "{{1.email}}",
                      "o": "exist"
                    },
                    {
                      "a": "{{ifempty(1.reminders_sent; 0)}}",
                      "o": "number:less",
                      "b": "4"
                    },
                    {
                      "a": "{{1.last_reminder}}",
                      "o": "date:less",
                      "b": "{{addDays(now; -7)}}"
                    }
                  ]
                ]
              },
              "mapper": {
                "url": "https://api.resend.com/emails",
                "method": "post",
                "headers": [
                  {
                    "name": "Authorization",
                    "value": "Bearer YOUR_RESEND_API_KEY"
                  }
                ],
                "qs": [],
                "serializeUrl": false,
                "parseResponse": true,
                "shareCookies": false,
                "rejectUnauthorized": true,
                "followRedirect": true,
                "useQuerystring": false,
                "gzip": true,
                "useMtls": false,
                "timeout": "",
                "bodyType": "raw",
                "contentType": "application/json",
                "inputMethod": "jsonString",
                "data": "{\"from\": \"YOUR BUSINESS <billing@yourdomain.com>\", \"to\": \"{{1.email}}\", \"reply_to\": \"OWNER_EMAIL\", \"subject\": \"W-9 request from YOUR BUSINESS ({{ifempty(1.reminders_sent; 0) + 1}} of 4)\", \"text\": \"Hi {{1.vendor}},\\n\\nWe need a current Form W-9 from you for our 2026 records.\\n\\n1. Blank form from the IRS: https://www.irs.gov/pub/irs-pdf/fw9.pdf\\n2. Upload the signed form here: W9_UPLOAD_URL\\n\\nPlease do not email your Social Security number or EIN, and please do not reply with the form attached. Use the upload link instead.\\nIf you already sent it, just reply \\\"sent\\\" and we will update our records.\\n\\nThanks,\\nYOUR BUSINESS\"}"
              },
              "metadata": {
                "designer": {
                  "x": 600,
                  "y": -150
                }
              }
            },
            {
              "id": 4,
              "module": "http:ActionSendData",
              "version": 3,
              "parameters": {},
              "mapper": {
                "url": "SHEET_WEBHOOK_URL",
                "method": "post",
                "headers": [],
                "qs": [],
                "serializeUrl": false,
                "parseResponse": true,
                "shareCookies": false,
                "rejectUnauthorized": true,
                "followRedirect": true,
                "useQuerystring": false,
                "gzip": true,
                "useMtls": false,
                "timeout": "",
                "bodyType": "raw",
                "contentType": "application/json",
                "inputMethod": "jsonString",
                "data": "{\"row_number\": \"{{1.row_number}}\", \"reminders_sent\": \"{{ifempty(1.reminders_sent; 0) + 1}}\", \"last_reminder\": \"{{formatDate(now; \\\"YYYY-MM-DD\\\")}}\", \"resend_id\": \"{{3.data.id}}\"}"
              },
              "metadata": {
                "designer": {
                  "x": 900,
                  "y": -150
                }
              }
            }
          ]
        },
        {
          "flow": [
            {
              "id": 5,
              "module": "http:ActionSendData",
              "version": 3,
              "parameters": {},
              "filter": {
                "name": "Out of reminders or no email",
                "conditions": [
                  [
                    {
                      "a": "{{1.w9_on_file}}",
                      "o": "text:notequal:ci",
                      "b": "yes"
                    },
                    {
                      "a": "{{ifempty(1.reminders_sent; 0)}}",
                      "o": "number:greaterorequal",
                      "b": "4"
                    }
                  ],
                  [
                    {
                      "a": "{{1.w9_on_file}}",
                      "o": "text:notequal:ci",
                      "b": "yes"
                    },
                    {
                      "a": "{{1.email}}",
                      "o": "notexist"
                    }
                  ]
                ]
              },
              "mapper": {
                "url": "https://api.resend.com/emails",
                "method": "post",
                "headers": [
                  {
                    "name": "Authorization",
                    "value": "Bearer YOUR_RESEND_API_KEY"
                  }
                ],
                "qs": [],
                "serializeUrl": false,
                "parseResponse": true,
                "shareCookies": false,
                "rejectUnauthorized": true,
                "followRedirect": true,
                "useQuerystring": false,
                "gzip": true,
                "useMtls": false,
                "timeout": "",
                "bodyType": "raw",
                "contentType": "application/json",
                "inputMethod": "jsonString",
                "data": "{\"from\": \"YOUR BUSINESS <billing@yourdomain.com>\", \"to\": \"OWNER_EMAIL\", \"subject\": \"W-9 still missing: {{1.vendor}}\", \"text\": \"{{1.vendor}} still has no W-9 on file after {{ifempty(1.reminders_sent; 0)}} reminder(s) (email on file: {{ifempty(1.email; \\\"none\\\")}}). Paid so far in 2026 (non-card): ${{1.reportable_ytd}}. Call or text them, or ask your CPA about backup withholding.\"}"
              },
              "metadata": {
                "designer": {
                  "x": 600,
                  "y": 50
                }
              }
            }
          ]
        },
        {
          "flow": [
            {
              "id": 6,
              "module": "http:ActionSendData",
              "version": 3,
              "parameters": {},
              "filter": {
                "name": "Over $2,000 and still no W-9",
                "conditions": [
                  [
                    {
                      "a": "{{1.w9_on_file}}",
                      "o": "text:notequal:ci",
                      "b": "yes"
                    },
                    {
                      "a": "{{1.reportable_ytd}}",
                      "o": "number:greaterorequal",
                      "b": "2000"
                    }
                  ]
                ]
              },
              "mapper": {
                "url": "https://api.resend.com/emails",
                "method": "post",
                "headers": [
                  {
                    "name": "Authorization",
                    "value": "Bearer YOUR_RESEND_API_KEY"
                  }
                ],
                "qs": [],
                "serializeUrl": false,
                "parseResponse": true,
                "shareCookies": false,
                "rejectUnauthorized": true,
                "followRedirect": true,
                "useQuerystring": false,
                "gzip": true,
                "useMtls": false,
                "timeout": "",
                "bodyType": "raw",
                "contentType": "application/json",
                "inputMethod": "jsonString",
                "data": "{\"from\": \"YOUR BUSINESS <billing@yourdomain.com>\", \"to\": \"OWNER_EMAIL\", \"subject\": \"Over $2,000, no W-9: {{1.vendor}}\", \"text\": \"You've paid {{1.vendor}} ${{1.reportable_ytd}} (non-card) in 2026, which is at or over the $2,000 1099-NEC threshold, and there's no W-9 on file. Get it before January.\"}"
              },
              "metadata": {
                "designer": {
                  "x": 600,
                  "y": 250
                }
              }
            }
          ]
        }
      ]
    }
  ],
  "metadata": {
    "instant": true,
    "version": 1,
    "scenario": {
      "roundtrips": 1,
      "maxErrors": 3,
      "autoCommit": true,
      "autoCommitTriggerLast": true,
      "sequential": false,
      "slots": null,
      "confidential": false,
      "dataloss": false,
      "dlq": false,
      "freshVariables": false
    },
    "designer": {
      "orphans": []
    },
    "zone": "us1.make.com"
  }
}
