{
  "name": "HVACAutomate — Estimate Follow-Up (3-Touch over 10 Days)",
  "flow": [
    {
      "id": 1,
      "module": "google-sheets:getValues",
      "version": 2,
      "parameters": { "spreadsheetId": "YOUR_SPREADSHEET_ID", "sheetName": "Estimates" },
      "filter": {
        "name": "Only unsent follow-ups",
        "conditions": [[{ "a": "{{1.followup_sent}}", "b": "", "o": "text:equal" }]]
      },
      "mapper": {},
      "metadata": {
        "designer": { "x": 0, "y": 0 },
        "notes": "Reads from Google Sheet: columns = customer_name, phone, email, job_type, estimate_date, followup_sent. Schedule this scenario to run daily."
      }
    },
    {
      "id": 2,
      "module": "builtin:BasicRouter",
      "version": 1,
      "parameters": {},
      "mapper": {},
      "metadata": { "designer": { "x": 300, "y": 0 } },
      "routes": [
        {
          "flow": [
            {
              "id": 3,
              "module": "twilio:ActionCreateMessage",
              "version": 1,
              "parameters": { "account": 1 },
              "filter": {
                "name": "Day 2 — send if 2 days since estimate",
                "conditions": [[{ "a": "{{dateDifference(now, parseDate(1.estimate_date,'YYYY-MM-DD'),'days')}}", "b": "2", "o": "number:equal" }]]
              },
              "mapper": {
                "to": "{{1.phone}}",
                "from": "YOUR_TWILIO_NUMBER",
                "body": "Hi {{1.customer_name}}, just wanted to make sure you received the estimate I sent for your {{1.job_type}}. Happy to answer any questions or walk you through the scope. What works best for you?"
              },
              "metadata": { "designer": { "x": 600, "y": -100 } }
            }
          ]
        },
        {
          "flow": [
            {
              "id": 4,
              "module": "twilio:ActionCreateMessage",
              "version": 1,
              "parameters": { "account": 1 },
              "filter": {
                "name": "Day 5 — nudge",
                "conditions": [[{ "a": "{{dateDifference(now, parseDate(1.estimate_date,'YYYY-MM-DD'),'days')}}", "b": "5", "o": "number:equal" }]]
              },
              "mapper": {
                "to": "{{1.phone}}",
                "from": "YOUR_TWILIO_NUMBER",
                "body": "Hey {{1.customer_name}}, following up on the estimate for {{1.job_type}}. We have a few openings next week I could hold for you if you're ready to move forward. Otherwise no pressure — just let me know either way."
              },
              "metadata": { "designer": { "x": 600, "y": 0 } }
            }
          ]
        },
        {
          "flow": [
            {
              "id": 5,
              "module": "twilio:ActionCreateMessage",
              "version": 1,
              "parameters": { "account": 1 },
              "filter": {
                "name": "Day 10 — final close",
                "conditions": [[{ "a": "{{dateDifference(now, parseDate(1.estimate_date,'YYYY-MM-DD'),'days')}}", "b": "10", "o": "number:equal" }]]
              },
              "mapper": {
                "to": "{{1.phone}}",
                "from": "YOUR_TWILIO_NUMBER",
                "body": "Hi {{1.customer_name}}, last check-in on the estimate from {{1.estimate_date}}. If the timing isn't right or you went another direction, totally understand — just reply 'no thanks' and I'll close it out. If you still need the work done, I'm here."
              },
              "metadata": { "designer": { "x": 600, "y": 100 } }
            }
          ]
        }
      ]
    },
    {
      "id": 6,
      "module": "google-sheets:updateRow",
      "version": 2,
      "parameters": { "spreadsheetId": "YOUR_SPREADSHEET_ID", "sheetName": "Estimates" },
      "mapper": { "followup_sent": "{{formatDate(now,'YYYY-MM-DD')}}" },
      "metadata": { "designer": { "x": 900, "y": 0 }, "notes": "Mark followup_sent with today's date to prevent re-sending" }
    }
  ],
  "metadata": {
    "version": 1,
    "scenario": {
      "roundtrips": 1,
      "maxErrors": 3,
      "autoCommit": true,
      "autoCommitTriggerLast": true,
      "sequential": false,
      "confidential": false,
      "dataloss": false,
      "dlq": false,
      "freshVariables": false
    },
    "designer": { "orphans": [] },
    "zone": "us1.make.com"
  }
}
