{
  "name": "Tribal Cowboy - Social",
  "nodes": [
    {
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "cronExpression",
              "expression": "0 8 * * *"
            }
          ]
        }
      },
      "id": "schedule-trigger-social",
      "name": "Daily 8am",
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1.2,
      "position": [
        240,
        300
      ]
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "prompt-var",
              "name": "prompt",
              "value": "=Generate today's social media content plan for Tribal Cowboy. Include: 1 Instagram post idea (with full caption + 15-20 hashtags), 1 Facebook post idea (slightly longer, community-focused), 1 TikTok concept (hook line + video concept). Focus on event highlights, behind-the-scenes moments, or client testimonials. Use today's date for seasonal relevance: {{ $now.toFormat('MMMM d, yyyy') }}.",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "id": "set-prompt-social",
      "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 TribalCowboy Social Media Agent \u2014 a creative strategist and content creator for Tribal Cowboy LLC, a bold event planning and entertainment brand with a Western-Tribal fusion identity.\n\nBrand Identity: Warm, bold, culturally rich, celebration-focused. Colors: Gold, cream, teal, warm amber, deep green, red accents. Tone: confident, authentic, celebratory, never corporate.\n\nPlatforms: Instagram (visual storytelling, Reels, carousels), Facebook (community, events, testimonials), TikTok (viral reach, trending audio, entertainment).\n\nContent Pillars: Event Highlights, Behind the Scenes, Client Testimonials, Education/Value, Culture & Brand, Booking CTAs.\n\nCaption Formula: Hook (stops the scroll) \u2192 Story or value \u2192 Emotion/connection \u2192 Clear CTA \u2192 Hashtags (15-20, mix of niche/mid/broad).\n\nRules: Always write in Tribal Cowboy's warm, celebratory voice. Every post serves a purpose: entertain, inspire, or convert. Always include a CTA. Emojis sparingly and intentionally."
            }
          ]
        },
        "batching": {}
      },
      "id": "llm-chain-social",
      "name": "Social 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-social",
      "name": "Anthropic Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatAnthropic",
      "typeVersion": 1.3,
      "position": [
        680,
        500
      ]
    },
    {
      "parameters": {
        "sendTo": "info@tribalcowboy.com",
        "subject": "=\ud83d\udcf1 Today's Social Content Plan \u2014 {{ $now.toFormat('MMM d, yyyy') }}",
        "emailType": "text",
        "message": "=Your daily social content plan is ready!\n\nDate: {{ $now.toFormat('MMMM d, yyyy') }}\n\n---\n{{ $json.text }}\n\n---\nGenerated by Tribal Cowboy Social Agent"
      },
      "id": "gmail-social",
      "name": "Email Content Plan",
      "type": "n8n-nodes-base.gmail",
      "typeVersion": 2.1,
      "position": [
        900,
        220
      ]
    },
    {
      "parameters": {
        "operation": "append",
        "documentId": {
          "__rl": true,
          "value": "1xy75VdK4NDtVZtjNAzE1ED0vrVLsh7iy9sjnl4URN80",
          "mode": "id"
        },
        "sheetName": {
          "__rl": true,
          "value": "Content Calendar",
          "mode": "name"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "Date": "={{ $now.toFormat('yyyy-MM-dd') }}",
            "Day": "={{ $now.toFormat('EEEE') }}",
            "Content": "={{ $json.text }}",
            "Status": "Drafted",
            "Platform": "IG + FB + TikTok"
          }
        },
        "options": {}
      },
      "id": "sheets-social",
      "name": "Save to Content Calendar",
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.5,
      "position": [
        900,
        380
      ]
    }
  ],
  "connections": {
    "Daily 8am": {
      "main": [
        [
          {
            "node": "Build Prompt",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Build Prompt": {
      "main": [
        [
          {
            "node": "Social Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Anthropic Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Social Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Social Agent": {
      "main": [
        [
          {
            "node": "Email Content Plan",
            "type": "main",
            "index": 0
          },
          {
            "node": "Save to Content Calendar",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  }
}