{
  "flow": [
    {
      "id": 1,
      "mapper": {},
      "module": "gateway:CustomWebHook",
      "version": 1,
      "metadata": {
        "designer": {
          "x": 0,
          "y": 0,
          "name": "Webhook \u2014 Tally Quiz Submission"
        }
      },
      "parameters": {
        "hook": null,
        "maxResults": 1
      }
    },
    {
      "id": 2,
      "mapper": {
        "scope": "roundtrip",
        "variables": [
          {
            "name": "email",
            "value": "{{get(map(1.data.fields; \"value\"; \"label\"; \"Email\"); 1)}}"
          },
          {
            "name": "name",
            "value": "{{get(map(1.data.fields; \"value\"; \"label\"; \"Name\"); 1)}}"
          },
          {
            "name": "d1",
            "value": "{{get(map(1.data.fields; \"value\"; \"label\"; \"Digital delivery\"); 1)}}"
          },
          {
            "name": "d2",
            "value": "{{get(map(1.data.fields; \"value\"; \"label\"; \"Asynchronous sales\"); 1)}}"
          },
          {
            "name": "d3",
            "value": "{{get(map(1.data.fields; \"value\"; \"label\"; \"Repeatable output\"); 1)}}"
          },
          {
            "name": "d4",
            "value": "{{get(map(1.data.fields; \"value\"; \"label\"; \"Low support surface\"); 1)}}"
          },
          {
            "name": "d5",
            "value": "{{get(map(1.data.fields; \"value\"; \"label\"; \"No inventory\"); 1)}}"
          }
        ]
      },
      "module": "util:SetVariables",
      "version": 1,
      "metadata": {
        "designer": {
          "x": 300,
          "y": 0,
          "name": "Extract Tally Fields"
        }
      },
      "parameters": {}
    },
    {
      "id": 3,
      "mapper": {
        "scope": "roundtrip",
        "variables": [
          {
            "name": "total",
            "value": "{{2.d1 + 2.d2 + 2.d3 + 2.d4 + 2.d5}}"
          },
          {
            "name": "band",
            "value": "{{if((2.d1+2.d2+2.d3+2.d4+2.d5) >= 22; \"build_it\"; if((2.d1+2.d2+2.d3+2.d4+2.d5) >= 18; \"build_it_but\"; if((2.d1+2.d2+2.d3+2.d4+2.d5) >= 14; \"service\"; \"walk_away\")))}}"
          }
        ]
      },
      "module": "util:SetVariables",
      "version": 1,
      "metadata": {
        "designer": {
          "x": 600,
          "y": 0,
          "name": "Compute Score + Band"
        }
      },
      "parameters": {}
    },
    {
      "id": 4,
      "mapper": {
        "model": "claude-sonnet-5",
        "system": "You write personalized verdicts for the Automation Quotient Scorecard, a free tool from the book The 4-Hour Side Hustle. A reader has self-scored a side-hustle idea on 5 axes, 1-5 each: Digital delivery, Asynchronous sales, Repeatable output, Low support surface, No inventory. Total ranges 5-25.\n\nBands: 22-25 = Build it, this runs on four hours a week. 18-21 = Build it, but one axis needs fixing. 14-17 = This is a service, not a product, and it will not run on four hours a week no matter what. Under 14 = Walk away, this specific idea will not work.\n\nVoice: plainspoken, direct, no hype, no exclamation points, never flatter a low score. Be willing to tell someone bluntly that their idea will not work as scored -- that honesty is the entire point of this tool. Draw on the book's own reasoning: repeatable output and low support surface are the two axes that determine what happens as a business adds customers, since a service business's hours scale with revenue and a product's do not -- weigh those two more heavily than the others when picking the single weakest axis on a tie. Asynchronous sales is the axis people most often inflate, telling themselves a quick call will go away eventually -- treat it at face value.\n\nGiven the reader's 5 scores, total, and band, respond with the single weakest axis by exact name as listed above, and a 3-4 sentence verdict paragraph in second person ('you') that names the weak axis and briefly explains why it matters using the book's own reasoning above, without inventing any detail about their actual idea beyond the 5 scores given.",
        "max_tokens": 500,
        "messages": [
          {
            "role": "user",
            "inputType": "single",
            "content": "Axis scores (1-5 each):\nDigital delivery: {{2.d1}}\nAsynchronous sales: {{2.d2}}\nRepeatable output: {{2.d3}}\nLow support surface: {{2.d4}}\nNo inventory: {{2.d5}}\n\nTotal: {{3.total}}/25\nBand: {{3.band}}\n\nWrite the verdict."
          }
        ],
        "outputFormat": {
          "type": "json_schema",
          "schema": {
            "type": "object",
            "required": [
              "weak_axis",
              "verdict_text"
            ],
            "properties": {
              "weak_axis": {
                "type": "string"
              },
              "verdict_text": {
                "type": "string"
              }
            },
            "additionalProperties": false
          }
        }
      },
      "module": "anthropic-claude:createAMessage",
      "onerror": [
        {
          "id": 8,
          "mapper": {
            "base": "YOUR_AIRTABLE_BASE_ID",
            "table": "YOUR_AIRTABLE_TABLE_ID",
            "record": {
              "YOUR_FIELD_1": "{{now}}",
              "YOUR_FIELD_2": "Todo",
              "YOUR_FIELD_3": "Claude verdict failed for {{2.email}} in Scorecard Chain: {{4.error.message}}",
              "YOUR_FIELD_4": "Scorecard Chain \u2014 Tally to Claude to Kit"
            },
            "typecast": false,
            "useColumnId": true
          },
          "module": "airtable:ActionCreateRecord",
          "version": 3,
          "metadata": {
            "designer": {
              "x": 900,
              "y": 300,
              "name": "Log Error"
            }
          },
          "parameters": {
            "__IMTCONN__": null
          }
        },
        {
          "id": 9,
          "mapper": {
            "text": "\u26a0\ufe0f Scorecard Chain \u2014 Claude verdict failed for {{2.email}}. Error: {{4.error.message}}.",
            "chatId": "YOUR_TELEGRAM_CHAT_ID"
          },
          "module": "telegram:SendReplyMessage",
          "version": 1,
          "metadata": {
            "designer": {
              "x": 1200,
              "y": 300,
              "name": "Alert"
            }
          },
          "parameters": {
            "__IMTCONN__": null
          }
        }
      ],
      "version": 1,
      "metadata": {
        "designer": {
          "x": 900,
          "y": 0,
          "name": "Claude Verdict"
        }
      },
      "parameters": {
        "__IMTCONN__": null
      }
    },
    {
      "id": 6,
      "mapper": {
        "id": "{{if(3.band=\"build_it\";YOUR_KIT_TAG_ID_1;if(3.band=\"build_it_but\";YOUR_KIT_TAG_ID_2;if(3.band=\"service\";YOUR_KIT_TAG_ID_3;YOUR_KIT_TAG_ID_4)))}}",
        "email": "{{2.email}}",
        "fields": {
          "automation_quotient": "{{3.total}}"
        },
        "first_name": "{{2.name}}"
      },
      "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 {{2.email}} in Scorecard Chain: {{6.error.message}}",
              "YOUR_FIELD_4": "Scorecard Chain \u2014 Tally to Claude to Kit"
            },
            "typecast": false,
            "useColumnId": true
          },
          "module": "airtable:ActionCreateRecord",
          "version": 3,
          "metadata": {
            "designer": {
              "x": 1500,
              "y": 300,
              "name": "Log Error"
            }
          },
          "parameters": {
            "__IMTCONN__": null
          }
        },
        {
          "id": 11,
          "mapper": {
            "text": "\u26a0\ufe0f Scorecard Chain \u2014 Kit tag failed for {{2.email}}. Error: {{6.error.message}}.",
            "chatId": "YOUR_TELEGRAM_CHAT_ID"
          },
          "module": "telegram:SendReplyMessage",
          "version": 1,
          "metadata": {
            "designer": {
              "x": 1800,
              "y": 300,
              "name": "Alert"
            }
          },
          "parameters": {
            "__IMTCONN__": null
          }
        }
      ],
      "version": 1,
      "metadata": {
        "designer": {
          "x": 1500,
          "y": 0,
          "name": "Kit \u2014 Tag by Band + Score"
        }
      },
      "parameters": {
        "__IMTCONN__": null
      }
    },
    {
      "id": 7,
      "mapper": {
        "base": "YOUR_AIRTABLE_BASE_ID",
        "table": "YOUR_AIRTABLE_TABLE_ID",
        "record": {
          "YOUR_FIELD_1": "{{2.email}}",
          "YOUR_FIELD_2": "{{now}}",
          "YOUR_FIELD_3": [
            "Lead",
            "Scorecard"
          ],
          "YOUR_FIELD_4": "scorecard: {{3.band}} ({{3.total}}/25) \u2014 weak axis: {{4.jsonResponse.weak_axis}}",
          "YOUR_FIELD_5": "{{2.name}}",
          "YOUR_FIELD_6": "New"
        },
        "typecast": true,
        "useColumnId": true
      },
      "module": "airtable:ActionCreateRecord",
      "onerror": [
        {
          "id": 12,
          "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 {{2.email}} in Scorecard Chain: {{7.error.message}}",
              "YOUR_FIELD_4": "Scorecard Chain \u2014 Tally to Claude to Kit"
            },
            "typecast": false,
            "useColumnId": true
          },
          "module": "airtable:ActionCreateRecord",
          "version": 3,
          "metadata": {
            "designer": {
              "x": 2100,
              "y": 300,
              "name": "Log Error"
            }
          },
          "parameters": {
            "__IMTCONN__": null
          }
        },
        {
          "id": 13,
          "mapper": {
            "text": "\u26a0\ufe0f Scorecard Chain \u2014 Airtable Contacts log failed for {{2.email}}. Kit tag was still applied.",
            "chatId": "YOUR_TELEGRAM_CHAT_ID"
          },
          "module": "telegram:SendReplyMessage",
          "version": 1,
          "metadata": {
            "designer": {
              "x": 2400,
              "y": 300,
              "name": "Alert"
            }
          },
          "parameters": {
            "__IMTCONN__": null
          }
        }
      ],
      "version": 3,
      "metadata": {
        "designer": {
          "x": 1800,
          "y": 0,
          "name": "Airtable \u2014 Log to Contacts"
        }
      },
      "parameters": {
        "__IMTCONN__": null
      }
    }
  ],
  "name": "Scorecard Chain \u2014 Tally to Claude Verdict to Kit to Airtable",
  "metadata": {
    "instant": true,
    "version": 1,
    "designer": {
      "orphans": []
    },
    "scenario": {
      "dlq": false,
      "maxErrors": 3,
      "autoCommit": true,
      "roundtrips": 1,
      "sequential": false,
      "confidential": false,
      "freshVariables": false,
      "autoCommitTriggerLast": true
    }
  },
  "scheduling": {
    "type": "immediately",
    "maximum_runs_per_minute": 100
  }
}