{
  "name": "AI Social Media Scheduler",
  "nodes": [
    {
      "parameters": {
        "triggerAtTime": "09:00"
      },
      "name": "Run Daily",
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1,
      "position": [
        450,
        300
      ],
      "notes": "Triggers this workflow every day at 9:00 AM. Change the time and frequency as needed in the parameters."
    },
    {
      "parameters": {
        "url": "https://rss.app/feeds/example.xml"
      },
      "name": "Fetch RSS Feed",
      "type": "n8n-nodes-base.rssFeedRead",
      "typeVersion": 1,
      "position": [
        650,
        300
      ],
      "notes": "Fetches the latest items from an RSS feed. Replace the example URL with your desired source for content ideas."
    },
    {
      "parameters": {
        "url": "https://api.example.com/v1/chat/completions",
        "options": {},
        "bodyParameters": {
          "parameters": [
            {
              "name": "model",
              "value": "gpt-4"
            },
            {
              "name": "messages",
              "value": "={{ [ { \"role\": \"system\", \"content\": \"You are a helpful assistant that creates engaging social media posts.&#34; }, { \"role\": \"user\", \"content\": \"Create a short and engaging Twitter post based on the following article title: '''\" + $json[\"title\"] + \"'''.\" } ] }}"
            }
          ]
        },
        "authentication": "headerAuth"
      },
      "name": "Generate Post Content",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 1,
      "position": [
        850,
        300
      ],
      "notes": "Sends the article title to an LLM to generate a social media post. **ACTION REQUIRED:** Replace the URL with your LLM's API endpoint and configure the authentication with your API key.",
      "credentials": {
        "httpHeaderAuth": {
          "id": "placeholder",
          "name": "LLM API Key"
        }
      }
    },
    {
      "parameters": {
        "text": "={{ $json[\"choices\"][0][\"message\"][\"content\"] }}"
      },
      "name": "Post to Twitter",
      "type": "n8n-nodes-base.twitter",
      "typeVersion": 1,
      "position": [
        1050,
        300
      ],
      "notes": "Posts the generated text to Twitter. **ACTION REQUIRED:** Create and select your Twitter credentials.",
      "credentials": {
        "twitterApi": {
          "id": "placeholder",
          "name": "Twitter Account"
        }
      }
    }
  ],
  "connections": {
    "Run Daily": {
      "main": [
        [
          {
            "node": "Fetch RSS Feed",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch RSS Feed": {
      "main": [
        [
          {
            "node": "Generate Post Content",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Post Content": {
      "main": [
        [
          {
            "node": "Post to Twitter",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}