{
  "name": "RSS feed to social media with Ampost",
  "nodes": [
    {
      "parameters": {
        "pollTimes": {
          "item": [
            {
              "mode": "everyHour"
            }
          ]
        },
        "feedUrl": "https://example.com/feed.xml"
      },
      "id": "7c2e1f40-3a9b-4d6e-8f10-2a3b4c5d6e01",
      "name": "New feed item",
      "type": "n8n-nodes-base.rssFeedReadTrigger",
      "typeVersion": 1,
      "position": [0, 0]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://api.ampost.io/api/posts",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Idempotency-Key",
              "value": "=rss-{{ ($json.guid || $json.link).hash('sha256').slice(0, 40) }}"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={{ JSON.stringify(Object.assign({ targets: [{ platforms: ['bluesky', 'threads'] }], text: $json.title, publishNow: true }, /^https?:\\/\\//.test($json.link || '') ? { linkUrl: $json.link } : {})) }}",
        "options": {}
      },
      "id": "7c2e1f40-3a9b-4d6e-8f10-2a3b4c5d6e02",
      "name": "Ampost: create post",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [240, 0],
      "retryOnFail": true,
      "maxTries": 3,
      "waitBetweenTries": 5000,
      "credentials": {
        "httpHeaderAuth": {
          "id": "ampostApiKey",
          "name": "Ampost API key"
        }
      }
    }
  ],
  "connections": {
    "New feed item": {
      "main": [[{ "node": "Ampost: create post", "type": "main", "index": 0 }]]
    }
  },
  "settings": {
    "executionOrder": "v1"
  },
  "pinData": {},
  "meta": {
    "templateCredsSetupCompleted": false
  }
}
