{
  "nodes": [
    {
      "id": "b57d7fea-fd4d-417b-bad6-7d28d1968c6f",
      "name": "Setup Instructions",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        0
      ],
      "parameters": {
        "width": 280,
        "height": 200,
        "content": "\u2b50 **SETUP REQUIRED:**\n\n1. **Connect Slack App:**\n   - Create Slack app at api.slack.com\n   - Add OAuth scopes: chat:write, channels:read\n   - Install to workspace\n\n2. **Configure Channel:**\n   - Update channel in 'Send to Slack' node\n   - Default: #general\n\n3. **Timezone:**\n   - Workflow set to America/New_York\n   - Change in workflow settings if needed\n\n\u2728 Uses FREE ZenQuotes.io API - no key needed!"
      },
      "typeVersion": 1
    },
    {
      "id": "279ead2e-17c7-4e58-8d27-40b6de24e969",
      "name": "Daily 8AM Trigger",
      "type": "n8n-nodes-base.cron",
      "position": [
        0,
        224
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "03ed9013-fc5c-4ce7-834b-1ae8f2274834",
      "name": "Fetch Random Quote",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        208,
        224
      ],
      "parameters": {
        "url": "https://zenquotes.io/api/random",
        "options": {}
      },
      "typeVersion": 4.1
    },
    {
      "id": "114fc429-738a-41b7-95a6-06ccbae822b2",
      "name": "Format Quote for Slack",
      "type": "n8n-nodes-base.code",
      "position": [
        400,
        224
      ],
      "parameters": {
        "jsCode": "// Normalize quote data from API response\nconst response = $input.first().json;\nconst quoteData = Array.isArray(response) ? response[0] : response;\n\n// Format the motivational message\nconst formattedQuote = {\n  text: `\ud83c\udf1f *Daily Motivation* \ud83c\udf1f\\n\\n\"${quoteData.q || quoteData.quote || 'Stay positive and keep moving forward!'}\"\\n\\n\u2014 ${quoteData.a || quoteData.author || 'Unknown'}`,\n  channel: '#general', // Change to your preferred channel\n  username: 'MotivationBot',\n  icon_emoji: ':star2:',\n  raw_quote: quoteData.q || quoteData.quote,\n  raw_author: quoteData.a || quoteData.author\n};\n\nconsole.log('Formatted Quote:', formattedQuote);\n\nreturn {\n  json: formattedQuote\n};"
      },
      "typeVersion": 2
    },
    {
      "id": "a8598192-0075-4ea1-b1a0-8ac2ff7755d1",
      "name": "Send to Slack",
      "type": "n8n-nodes-base.slack",
      "position": [
        608,
        224
      ],
      "parameters": {
        "text": "={{ $json.text }}",
        "select": "channel",
        "channelId": {
          "__rl": true,
          "mode": "name",
          "value": "general"
        },
        "otherOptions": {},
        "authentication": "oAuth2"
      },
      "typeVersion": 2.1
    }
  ],
  "connections": {
    "Daily 8AM Trigger": {
      "main": [
        [
          {
            "node": "Fetch Random Quote",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Random Quote": {
      "main": [
        [
          {
            "node": "Format Quote for Slack",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format Quote for Slack": {
      "main": [
        [
          {
            "node": "Send to Slack",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}