{
    "name": "LWF daily outliers → Google Sheets",
    "nodes": [
        {
            "parameters": {
                "rule": {
                    "interval": [
                        {
                            "field": "days",
                            "triggerAtHour": 8
                        }
                    ]
                }
            },
            "id": "b1",
            "name": "Every day at 8",
            "type": "n8n-nodes-base.scheduleTrigger",
            "typeVersion": 1.2,
            "position": [
                0,
                0
            ]
        },
        {
            "parameters": {
                "method": "POST",
                "url": "https://learnwithfidelis.com/api/tools/youtube_find_outliers",
                "sendHeaders": true,
                "headerParameters": {
                    "parameters": [
                        {
                            "name": "Authorization",
                            "value": "Bearer YOUR_LWF_API_KEY"
                        }
                    ]
                },
                "sendBody": true,
                "specifyBody": "json",
                "jsonBody": "{\n  \"niche\": \"ai-tools\",\n  \"days\": 7,\n  \"max_subs\": 100000,\n  \"min_score\": 3\n}",
                "options": {}
            },
            "id": "b2",
            "name": "LWF outliers",
            "type": "n8n-nodes-base.httpRequest",
            "typeVersion": 4.2,
            "position": [
                240,
                0
            ]
        },
        {
            "parameters": {
                "fieldToSplitOut": "data.videos",
                "options": {}
            },
            "id": "b3",
            "name": "One row per video",
            "type": "n8n-nodes-base.splitOut",
            "typeVersion": 1,
            "position": [
                480,
                0
            ]
        },
        {
            "parameters": {
                "operation": "append",
                "documentId": {
                    "__rl": true,
                    "mode": "url",
                    "value": ""
                },
                "sheetName": {
                    "__rl": true,
                    "mode": "name",
                    "value": "Sheet1"
                },
                "columns": {
                    "mappingMode": "autoMapInputData",
                    "value": {}
                },
                "options": {}
            },
            "id": "b4",
            "name": "Google Sheets",
            "type": "n8n-nodes-base.googleSheets",
            "typeVersion": 4.5,
            "position": [
                720,
                0
            ]
        }
    ],
    "connections": {
        "Every day at 8": {
            "main": [
                [
                    {
                        "node": "LWF outliers",
                        "type": "main",
                        "index": 0
                    }
                ]
            ]
        },
        "LWF outliers": {
            "main": [
                [
                    {
                        "node": "One row per video",
                        "type": "main",
                        "index": 0
                    }
                ]
            ]
        },
        "One row per video": {
            "main": [
                [
                    {
                        "node": "Google Sheets",
                        "type": "main",
                        "index": 0
                    }
                ]
            ]
        }
    },
    "settings": {
        "executionOrder": "v1"
    }
}