{
    "name": "Creator Ops: Closed-Loop AI -> WP Pipeline",
    "description": "Architected by Creator Ops Matrix. Get the full system at creatoropsmatrix.com",
    "flow": [
        {
            "id": 1,
            "module": "google-sheets:watchRows",
            "version": 1,
            "parameters": {},
            "mapper": {
                "limit": 1
            },
            "metadata": {
                "designer": {
                    "x": 0,
                    "y": 0,
                    "name": "1. Watch New Keywords"
                }
            }
        },
        {
            "id": 2,
            "module": "openai:createCompletion",
            "version": 1,
            "parameters": {},
            "mapper": {
                "model": "gpt-4o-mini",
                "messages": [
                    {
                        "role": "system",
                        "content": "You are an elite SEO copywriter. Write a highly authoritative, comprehensive article for the target keyword. Use strict HTML tags (h2, h3, ul, blockquote). Output RAW HTML only. Do not wrap in markdown."
                    },
                    {
                        "role": "user",
                        "content": "Keyword: {{1.Keyword}}"
                    }
                ]
            },
            "metadata": {
                "designer": {
                    "x": 300,
                    "y": 0,
                    "name": "2. Generate SEO HTML"
                }
            }
        },
        {
            "id": 3,
            "module": "wordpress:createPost",
            "version": 1,
            "parameters": {},
            "mapper": {
                "title": "{{1.Keyword}} - The Definitive Guide",
                "content": "{{2.choices[].message.content}}",
                "status": "draft"
            },
            "metadata": {
                "designer": {
                    "x": 600,
                    "y": 0,
                    "name": "3. Push to WordPress API"
                }
            }
        },
        {
            "id": 4,
            "module": "google-sheets:updateRow",
            "version": 1,
            "parameters": {},
            "mapper": {
                "rowId": "{{1.`__IMTROW__`}}",
                "Status": "Drafted Successfully",
                "WP_Post_ID": "{{3.id}}"
            },
            "metadata": {
                "designer": {
                    "x": 900,
                    "y": 0,
                    "name": "4. Log Telemetry (Close Loop)"
                }
            }
        }
    ],
    "metadata": {
        "version": 1,
        "scenario": {
            "roundtrips": 1,
            "maxErrors": 3,
            "autoCommit": true,
            "sequential": false,
            "confidential": false,
            "dataloss": false,
            "dlq": false
        }
    }
}