{
  "name": "Content Research Pipeline - DataForSEO + AI Briefs",
  "nodes": [
    {
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "cronExpression",
              "expression": "0 7 * * 1"
            }
          ]
        }
      },
      "id": "schedule-trigger",
      "name": "Weekly Monday 7am",
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1.2,
      "position": [0, 0]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://api.dataforseo.com/v3/keywords_data/google_ads/search_volume/live",
        "authentication": "predefinedCredentialType",
        "nodeCredentialType": "httpBasicAuth",
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "[{\"keywords\": [\"your seed keyword 1\", \"your seed keyword 2\", \"your seed keyword 3\"], \"location_code\": 2826, \"language_code\": \"en\"}]",
        "options": {}
      },
      "id": "dataforseo-keywords",
      "name": "DataForSEO Keywords",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [220, 0],
      "credentials": {
        "httpBasicAuth": {
          "id": "YOUR_DATAFORSEO_CREDENTIAL_ID",
          "name": "DataForSEO API"
        }
      }
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://api.dataforseo.com/v3/serp/google/organic/live",
        "authentication": "predefinedCredentialType",
        "nodeCredentialType": "httpBasicAuth",
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "[{\"keyword\": \"{{ $json.keyword }}\", \"location_code\": 2826, \"language_code\": \"en\", \"depth\": 10}]",
        "options": {}
      },
      "id": "dataforseo-serp",
      "name": "DataForSEO SERP Analysis",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [440, 0],
      "credentials": {
        "httpBasicAuth": {
          "id": "YOUR_DATAFORSEO_CREDENTIAL_ID",
          "name": "DataForSEO API"
        }
      }
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://api.dataforseo.com/v3/on_page/task_post",
        "authentication": "predefinedCredentialType",
        "nodeCredentialType": "httpBasicAuth",
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "[{\"url\": \"{{ $json.target_url }}\", \"enable_javascript\": false, \"load_resources\": false}]",
        "options": {}
      },
      "id": "dataforseo-onpage",
      "name": "DataForSEO On-Page Analysis",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [660, 0],
      "credentials": {
        "httpBasicAuth": {
          "id": "YOUR_DATAFORSEO_CREDENTIAL_ID",
          "name": "DataForSEO API"
        }
      }
    },
    {
      "parameters": {
        "resource": "chat",
        "model": "gpt-4o",
        "messages": {
          "values": [
            {
              "content": "You are an SEO content strategist. Analyse the following SERP data and competitor content, then generate a detailed content brief.\n\nKeyword: {{ $json.keyword }}\nSERP Data: {{ $json.serp_data }}\nCompetitor Content: {{ $json.competitor_content }}\n\nGenerate a content brief with:\n1. Recommended title\n2. Target word count\n3. H2/H3 outline\n4. Key questions to answer\n5. Entities to mention\n6. Internal linking suggestions\n7. Meta description (under 155 chars)\n\nOutput in JSON format.",
              "role": "user"
            }
          ]
        },
        "options": {}
      },
      "id": "openai-brief",
      "name": "Generate Content Brief",
      "type": "n8n-nodes-base.openAi",
      "typeVersion": 1.2,
      "position": [880, 0],
      "credentials": {
        "openAiApi": {
          "id": "YOUR_OPENAI_CREDENTIAL_ID",
          "name": "OpenAI API"
        }
      }
    },
    {
      "parameters": {
        "operation": "append",
        "documentId": { "__rl": true, "mode": "id", "value": "YOUR_GOOGLE_SHEET_ID" },
        "sheetName": "Keywords",
        "columns": {
          "mappingMode": "autoMapInputData"
        }
      },
      "id": "sheets-keywords",
      "name": "Write Keywords",
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.5,
      "position": [220, 200],
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "YOUR_SHEETS_CREDENTIAL_ID",
          "name": "Google Sheets OAuth2"
        }
      }
    },
    {
      "parameters": {
        "operation": "append",
        "documentId": { "__rl": true, "mode": "id", "value": "YOUR_GOOGLE_SHEET_ID" },
        "sheetName": "SERP Data",
        "columns": {
          "mappingMode": "autoMapInputData"
        }
      },
      "id": "sheets-serp",
      "name": "Write SERP Data",
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.5,
      "position": [440, 200],
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "YOUR_SHEETS_CREDENTIAL_ID",
          "name": "Google Sheets OAuth2"
        }
      }
    },
    {
      "parameters": {
        "operation": "append",
        "documentId": { "__rl": true, "mode": "id", "value": "YOUR_GOOGLE_SHEET_ID" },
        "sheetName": "Content Briefs",
        "columns": {
          "mappingMode": "autoMapInputData"
        }
      },
      "id": "sheets-briefs",
      "name": "Write Content Briefs",
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.5,
      "position": [880, 200],
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "YOUR_SHEETS_CREDENTIAL_ID",
          "name": "Google Sheets OAuth2"
        }
      }
    },
    {
      "parameters": {
        "sendTo": "your@email.com",
        "subject": "Weekly Content Research Briefs Ready",
        "message": "Your weekly content research pipeline has completed. Check your Google Sheet for new keyword opportunities, SERP analysis, and content briefs."
      },
      "id": "email-node",
      "name": "Weekly Summary Email",
      "type": "n8n-nodes-base.emailSend",
      "typeVersion": 2.1,
      "position": [1100, 100],
      "credentials": {
        "smtp": {
          "id": "YOUR_SMTP_CREDENTIAL_ID",
          "name": "SMTP"
        }
      }
    }
  ],
  "connections": {
    "Weekly Monday 7am": {
      "main": [
        [
          { "node": "DataForSEO Keywords", "type": "main", "index": 0 }
        ]
      ]
    },
    "DataForSEO Keywords": {
      "main": [
        [
          { "node": "DataForSEO SERP Analysis", "type": "main", "index": 0 },
          { "node": "Write Keywords", "type": "main", "index": 0 }
        ]
      ]
    },
    "DataForSEO SERP Analysis": {
      "main": [
        [
          { "node": "DataForSEO On-Page Analysis", "type": "main", "index": 0 },
          { "node": "Write SERP Data", "type": "main", "index": 0 }
        ]
      ]
    },
    "DataForSEO On-Page Analysis": {
      "main": [
        [
          { "node": "Generate Content Brief", "type": "main", "index": 0 }
        ]
      ]
    },
    "Generate Content Brief": {
      "main": [
        [
          { "node": "Write Content Briefs", "type": "main", "index": 0 },
          { "node": "Weekly Summary Email", "type": "main", "index": 0 }
        ]
      ]
    }
  },
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "staticData": null,
  "tags": [],
  "triggerCount": 1
}
