{
  "name": "RSS Feed to LinkedIn Auto Post",
  "nodes": [
    {
      "parameters": {
        "url": "https://your-blog.com/feed",
        "options": {}
      },
      "id": "e7f8a9b0-c1d2-3456-efab-567890124ef0",
      "name": "Read RSS Feed",
      "type": "n8n-nodes-base.rssFeedRead",
      "typeVersion": 1,
      "position": [250, 300]
    },
    {
      "parameters": {
        "model": "gpt-4o-mini",
        "messages": {
          "values": [
            {
              "role": "system",
              "content": "You are a LinkedIn content strategist. Summarize the given article into a compelling LinkedIn post (150-250 words). Include relevant hashtags at the end. Use a professional but engaging tone."
            },
            {
              "role": "user",
              "content": "=Title: {{ $json.title }}\n\nContent: {{ $json.contentSnippet || $json.content }}"
            }
          ]
        },
        "options": {
          "maxTokens": 500,
          "temperature": 0.7
        }
      },
      "id": "f8a9b0c1-d2e3-4567-fabc-678901235fa1",
      "name": "OpenAI Summarize",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "typeVersion": 1.2,
      "position": [500, 300]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://api.linkedin.com/v2/ugcPosts",
        "authentication": "genericCredentialType",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "=Bearer {{ $env.LINKEDIN_ACCESS_TOKEN }}"
            },
            {
              "name": "X-Restli-Protocol-Version",
              "value": "2.0.0"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n  \"author\": \"urn:li:person:{{ $env.LINKEDIN_PERSON_ID }}\",\n  \"lifecycleState\": \"PUBLISHED\",\n  \"specificContent\": {\n    \"com.linkedin.ugc.ShareContent\": {\n      \"shareCommentary\": {\n        \"text\": \"{{ $json.choices[0].message.content }}\"\n      },\n      \"shareMediaCategory\": \"ARTICLE\",\n      \"media\": [{\n        \"status\": \"READY\",\n        \"originalUrl\": \"{{ $('Read RSS Feed').item.json.link }}\"\n      }]\n    }\n  },\n  \"visibility\": {\n    \"com.linkedin.ugc.MemberNetworkVisibility\": \"PUBLIC\"\n  }\n}"
      },
      "id": "a9b0c1d2-e3f4-5678-abcd-789012346ab2",
      "name": "Post to LinkedIn",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.1,
      "position": [750, 300]
    }
  ],
  "connections": {
    "Read RSS Feed": {
      "main": [[{"node": "OpenAI Summarize", "type": "main", "index": 0}]]
    },
    "OpenAI Summarize": {
      "main": [[{"node": "Post to LinkedIn", "type": "main", "index": 0}]]
    }
  },
  "settings": {"executionOrder": "v1"},
  "staticData": null,
  "tags": []
}
