{
  "id": "TWgTKZVC7RNEXMsC",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "Article-to-Carousel Draft Pipeline",
  "tags": [],
  "nodes": [
    {
      "id": "1953f10d-1994-48a3-86e4-a4bf96898201",
      "name": "Generate a post from an article URL with AI",
      "type": "@postnitro/n8n-nodes-postnitro-ai.postNitro",
      "notes": "={{ $json.error.message }}",
      "onError": "continueErrorOutput",
      "position": [
        -208,
        -496
      ],
      "parameters": {
        "brandId": "cmrabdq3r003jmf1fkirr1avg",
        "presetId": "cmr96cp9i0001k1040wqqpip9",
        "operation": "aiFromArticle",
        "articleUrl": "={{ $json.link }}",
        "templateId": "cmrnc0pvm000ql504luhyx3at"
      },
      "credentials": {
        "postNitroApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1,
      "alwaysOutputData": false
    },
    {
      "id": "b1935ac6-4c49-40d6-8032-42b259d1aa13",
      "name": "Limit",
      "type": "n8n-nodes-base.limit",
      "position": [
        -480,
        -496
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "5db3d2ce-d129-45ff-a592-02cda9f9745d",
      "name": "Create a scheduled post or draft",
      "type": "@postnitro/n8n-nodes-postnitro-ai.postNitro",
      "position": [
        176,
        -688
      ],
      "parameters": {
        "status": "DRAFT",
        "designId": "={{ $json.data.result.designId }}",
        "resource": "scheduledPost",
        "postContent": {},
        "scheduledAt": "={{ $now.plus({ days: 1 }).toISO() }}",
        "platformSettings": {
          "linkedinPostSettings": "{\n  \"postType\": \"document\",\n  \"postTitle\": null\n}"
        },
        "selectedAccounts": [
          "cmrabkwrp0001jp04tateajp3"
        ]
      },
      "credentials": {
        "postNitroApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "71f66960-c3da-411d-93ab-7bd7739521ab",
      "name": "RSS Feed Trigger",
      "type": "n8n-nodes-base.rssFeedReadTrigger",
      "position": [
        -672,
        -496
      ],
      "parameters": {
        "feedUrl": "https://techcrunch.com/feed/",
        "pollTimes": {
          "item": [
            {
              "mode": "everyMinute"
            }
          ]
        }
      },
      "typeVersion": 1
    },
    {
      "id": "166e9fc7-046b-4fb1-b243-48022a0b58db",
      "name": "Send a message",
      "type": "n8n-nodes-base.gmail",
      "position": [
        432,
        -688
      ],
      "parameters": {
        "sendTo": "user@example.com",
        "message": "=A new carousel draft was generated from a TechCrunch article.\nTitle: {{ $json.designDetails.name }} \nReview it here: https://postnitro.ai/app/...",
        "options": {},
        "subject": "\ud83d\udcdd New draft ready for review"
      },
      "credentials": {
        "gmailOAuth2": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "d5de0915-a798-452e-ab36-54af007a3fad",
      "name": "Send a message1",
      "type": "n8n-nodes-base.gmail",
      "position": [
        272,
        -240
      ],
      "parameters": {
        "sendTo": "user@example.com",
        "message": "=Error: {{ $json.error }} Article: {{ $json.link }}",
        "options": {},
        "subject": "\u26a0\ufe0f Failed to generate draft from article"
      },
      "credentials": {
        "gmailOAuth2": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "c544524c-d7e0-4e3b-8803-11c82f958cec",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1264,
        -800
      ],
      "parameters": {
        "color": "#FFBE6F",
        "width": 496,
        "height": 736,
        "content": "## Article-to-Carousel Draft Pipeline\n\nWatches a TechCrunch RSS feed for new articles, generates a carousel \npost with PostNitro AI from each article, and saves it as a draft for \nreview. Emails a link to review or an error alert.\n\n### How it works\n1. **RSS Feed Trigger** polls the TechCrunch feed every minute for \n   new articles.\n2. **Limit** takes 1 article per trigger.\n3. **PostNitro AI** generates a carousel design from the article URL.\n4. \u2705 Success \u2192 **Create a scheduled post or draft** saves it as a \n   DRAFT for LinkedIn, scheduled 1 day out \u2192 confirmation emailed \n   for review.\n5. \u274c Failure \u2192 error emailed with the article link and error details.\n\n### Setup\n\u2610 Connect **PostNitro Embed** account (templateId, brandId, presetId)\n\u2610 Connect **Gmail** account\n\u2610 Confirm the RSS feed URL (currently TechCrunch)\n\u2610 Update the review link in the success email to the real PostNitro \n  app URL\n\n### Customization\n- Swap `feedUrl` to monitor a different RSS source\n- Change poll frequency (currently every minute)"
      },
      "typeVersion": 1
    },
    {
      "id": "343a4cd1-43fd-4e7f-8139-c9f1a5082d22",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -720,
        -704
      ],
      "parameters": {
        "width": 400,
        "height": 384,
        "content": "## 1. Watch for new articles\nPolls the TechCrunch feed every minute, takes 1 article at a time."
      },
      "typeVersion": 1
    },
    {
      "id": "2c491ac8-4176-448e-841b-afd8f10ae2dc",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -304,
        -704
      ],
      "parameters": {
        "width": 320,
        "height": 384,
        "content": "## 2. Generate carousel with AI\nBuilds a carousel design from the article URL."
      },
      "typeVersion": 1
    },
    {
      "id": "42e2d7fd-bba0-442d-a91d-bdeab318d717",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        96,
        -432
      ],
      "parameters": {
        "color": "#F66151",
        "width": 496,
        "height": 336,
        "content": "## 4. Failure: alert\nEmails the article link and error if generation failed."
      },
      "typeVersion": 1
    },
    {
      "id": "522646e8-7e00-4ed1-9b92-39b19eebf60d",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        96,
        -896
      ],
      "parameters": {
        "width": 496,
        "height": 384,
        "content": "## 3. Success: save draft & notify\nSaves a DRAFT post for LinkedIn, emails a review link."
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "binaryMode": "separate",
    "availableInMCP": false,
    "executionOrder": "v1"
  },
  "versionId": "7ab7c755-2abd-4563-984c-78a4c646861a",
  "nodeGroups": [],
  "connections": {
    "Limit": {
      "main": [
        [
          {
            "node": "Generate a post from an article URL with AI",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "RSS Feed Trigger": {
      "main": [
        [
          {
            "node": "Limit",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create a scheduled post or draft": {
      "main": [
        [
          {
            "node": "Send a message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate a post from an article URL with AI": {
      "main": [
        [
          {
            "node": "Create a scheduled post or draft",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Send a message1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}