{
  "name": "Tribal Cowboy - Email Writer",
  "nodes": [
    {
      "parameters": {
        "formTitle": "Tribal Cowboy \u2014 Email Writer",
        "formDescription": "Fill in the details and get a professional, on-brand email drafted for you.",
        "responseMode": "onReceived",
        "formFields": {
          "values": [
            {
              "fieldLabel": "Email Type",
              "fieldType": "select",
              "requiredField": true,
              "fieldOptions": {
                "values": [
                  {
                    "option": "Proposal"
                  },
                  {
                    "option": "Inquiry Response"
                  },
                  {
                    "option": "Follow-Up"
                  },
                  {
                    "option": "Partnership Pitch"
                  },
                  {
                    "option": "Difficult Client"
                  },
                  {
                    "option": "Thank You"
                  },
                  {
                    "option": "Vendor Outreach"
                  }
                ]
              }
            },
            {
              "fieldLabel": "Recipient",
              "fieldType": "text",
              "requiredField": true,
              "placeholder": "e.g. Corporate event planner, school principal, venue manager"
            },
            {
              "fieldLabel": "Context and Details",
              "fieldType": "textarea",
              "requiredField": true,
              "placeholder": "Describe the situation, event details, what you need the email to accomplish..."
            }
          ]
        },
        "options": {
          "respondWithOptions": {
            "values": {
              "formSubmittedText": "Your email is being drafted and will be sent to your inbox shortly. Ready to copy, tweak, and send!"
            }
          }
        }
      },
      "id": "form-trigger-email",
      "name": "Email Request Form",
      "type": "n8n-nodes-base.formTrigger",
      "typeVersion": 2.2,
      "position": [
        240,
        300
      ]
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "prompt-var",
              "name": "prompt",
              "value": "=Draft a professional email from Tribal Cowboy.\n\nEmail type: {{ $json['Email Type'] }}\nRecipient: {{ $json['Recipient'] }}\nContext/details: {{ $json['Context and Details'] }}\n\nProvide: 1) Subject line, 2) Full email body, 3) Suggested signature line.",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "id": "set-prompt-email",
      "name": "Build Prompt",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        460,
        300
      ]
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "={{ $json.prompt }}",
        "messages": {
          "messageValues": [
            {
              "message": "You are the Email Writer Agent for Tribal Cowboy LLC \u2014 a skilled communicator who drafts every email with purpose, personality, and professionalism.\n\nTribal Cowboy Voice: Warm but professional, confident (no hedging or apologizing), clear and concise, action-oriented, authentic (no corporate speak).\n\nEmail Types:\n- Service Proposals: personalized opening \u2192 who we are (brief) \u2192 scope bullets \u2192 investment \u2192 deposit terms \u2192 warm close with CTA\n- Inquiry Responses: appreciate reach-out \u2192 qualify with 2-3 questions \u2192 set next steps \u2192 include booking link\n- Follow-Ups: reference previous convo \u2192 add one new piece of value \u2192 gentle urgency \u2192 single CTA\n- Partnership Pitches: lead with what's in it for them \u2192 explain Tribal Cowboy reach \u2192 propose specific collab \u2192 suggest next step\n- Difficult Client: address scope creep, complaints, refund requests, declining jobs gracefully\n- Thank You: post-event, referral requests, check-ins, vendor appreciation\n\nStructure: Subject (specific, not spammy, include name/event). Opening (1-2 sentences, warm, specific). Body (purpose first, bullets for scope, short paragraphs). Close (one clear ask, warm sign-off).\n\nPricing Language: Lead with value, then investment. Use 'investment' not 'cost.' Never apologize for rates. Frame deposits as 'what secures your date.'\n\nRules: Match formality to recipient. Never send without a clear next step. Use white space and bullets generously. Sign as Tribal Cowboy LLC with phone/website/booking link."
            }
          ]
        },
        "batching": {}
      },
      "id": "llm-chain-email",
      "name": "Email Writer Agent",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "typeVersion": 1.5,
      "position": [
        680,
        300
      ]
    },
    {
      "parameters": {
        "model": "claude-sonnet-4-6",
        "options": {
          "maxTokensToSample": 4096
        }
      },
      "id": "claude-model-email",
      "name": "Anthropic Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatAnthropic",
      "typeVersion": 1.3,
      "position": [
        680,
        500
      ]
    },
    {
      "parameters": {
        "sendTo": "info@tribalcowboy.com",
        "subject": "=\u2709\ufe0f Email Draft \u2014 {{ $('Email Request Form').item.json['Email Type'] }} to {{ $('Email Request Form').item.json['Recipient'] }}",
        "emailType": "text",
        "message": "=Your Email Writer drafted this for you. Copy, personalize if needed, and send!\n\nTYPE: {{ $('Email Request Form').item.json['Email Type'] }}\nFOR: {{ $('Email Request Form').item.json['Recipient'] }}\nCONTEXT: {{ $('Email Request Form').item.json['Context and Details'] }}\n\n---\nDRAFTED EMAIL:\n\n{{ $json.text }}"
      },
      "id": "gmail-email-writer",
      "name": "Send Draft to Inbox",
      "type": "n8n-nodes-base.gmail",
      "typeVersion": 2.1,
      "position": [
        900,
        300
      ]
    }
  ],
  "connections": {
    "Email Request Form": {
      "main": [
        [
          {
            "node": "Build Prompt",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Build Prompt": {
      "main": [
        [
          {
            "node": "Email Writer Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Anthropic Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Email Writer Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Email Writer Agent": {
      "main": [
        [
          {
            "node": "Send Draft to Inbox",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  }
}