{
    "name": "Creator Ops: YouTube -> Beehiiv Pipeline",
    "description": "Architected by Creator Ops Matrix. Get the full system at creatoropsmatrix.com",
    "flow": [
        {
            "id": 1,
            "module": "rss:ActionReadFeed",
            "version": 1,
            "parameters": {
                "url": "https://www.youtube.com/feeds/videos.xml?channel_id="
            },
            "mapper": {
                "limit": 1
            },
            "metadata": {
                "designer": {
                    "x": 0,
                    "y": 0,
                    "name": "YouTube RSS Trigger"
                }
            }
        },
        {
            "id": 2,
            "module": "http:ActionMakeRequest",
            "version": 3,
            "parameters": {
                "url": "https://api.beehiiv.com/v2/publications/ENTER_YOUR_PUBLICATION_ID_HERE/posts",
                "method": "POST",
                "headers": [
                    {
                        "name": "Content-Type",
                        "value": "application/json"
                    },
                    {
                        "name": "Authorization",
                        "value": "Bearer ENTER_YOUR_BEEHIIV_API_KEY_HERE"
                    }
                ],
                "serializeUrl": false,
                "shareCookies": false,
                "parseResponse": true,
                "timeout": 40,
                "useMtls": false
            },
            "mapper": {
                "body": "{\n  \"title\": \"{{1.title}}\",\n  \"status\": \"draft\",\n  \"content_tags\": [\"YouTube Automation\"],\n  \"content_free\": \"<h1>{{1.title}}</h1><br><p>I just published a new video. Watch the full breakdown here:</p><br><a href='{{1.url}}'>{{1.url}}</a>\"\n}"
            },
            "metadata": {
                "designer": {
                    "x": 300,
                    "y": 0,
                    "name": "Beehiiv API: Create Draft"
                }
            }
        }
    ],
    "metadata": {
        "version": 1,
        "scenario": {
            "roundtrips": 1,
            "maxErrors": 3,
            "autoCommit": true,
            "sequential": false,
            "confidential": false,
            "dataloss": false,
            "dlq": false
        }
    }
}