{
  "name": "Detect toxic backlinks and build a disavow file with DataForSEO, Google Drive, and Gmail",
  "nodes": [
    {
      "id": "2616d002-3206-4b9d-93f2-f75d95ea5bc3",
      "name": "When clicking ‘Execute workflow’",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -16,
        80
      ]
    },
    {
      "id": "bea8a572-2829-440a-a01a-1b2cdc9a2ff9",
      "name": "Create file from text",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        2224,
        -32
      ]
    },
    {
      "id": "4a8b7cad-c624-43b6-b0e3-cfabd0bd8d51",
      "name": "Send a message (success)",
      "type": "n8n-nodes-base.gmail",
      "position": [
        2448,
        -32
      ]
    },
    {
      "id": "e37168db-ad9a-47c8-922c-aaad502ae15d",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        160,
        -144
      ],
      "parameters": {
        "width": 1536,
        "height": 432,
        "content": "## Get spam backlinks with DataForSEO\nCreate a DataForSEO connection, specify a Target Domain, and set up additional parameters if needed.\nCreate a Gmail connection and set a receiver."
      }
    },
    {
      "id": "acf5d358-ef23-4594-a630-75804a3ed1d7",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1728,
        -144
      ],
      "parameters": {
        "width": 848,
        "height": 496,
        "content": "## Generate a disavow file and send it via email\nCreate a Google Drive connection and set a destination folder.\nCreate a Gmail connection and set a receiver."
      }
    },
    {
      "id": "d0c0f064-55f1-4a7c-a7b1-384478947e32",
      "name": "Get spam backlinks",
      "type": "n8n-nodes-dataforseo.dataForSeoBacklinksApi",
      "position": [
        656,
        0
      ]
    },
    {
      "id": "29d1ec3f-a1ae-4f38-ae0a-cf2d2769e0da",
      "name": "Initialize \"items\" field",
      "type": "n8n-nodes-base.set",
      "position": [
        208,
        80
      ]
    },
    {
      "id": "5bf461b0-715e-4179-8050-a8d076f65267",
      "name": "Set \"items\" field",
      "type": "n8n-nodes-base.set",
      "position": [
        432,
        80
      ]
    },
    {
      "id": "11e1be10-2a2c-4d53-9341-d946b388f220",
      "name": "Less than 100K links?",
      "type": "n8n-nodes-base.if",
      "position": [
        880,
        0
      ]
    },
    {
      "id": "19e3b970-0c5c-4d51-8583-0814bcd2021c",
      "name": "Merge \"items\" with DFS response",
      "type": "n8n-nodes-base.set",
      "position": [
        1104,
        -96
      ]
    },
    {
      "id": "6b1aa169-1664-44e3-a1fb-0051acca92f8",
      "name": "Send a message (too many links)",
      "type": "n8n-nodes-base.gmail",
      "position": [
        1104,
        96
      ]
    },
    {
      "id": "fa7af35e-317f-4f22-bb82-9dc379024898",
      "name": "Has more pages?",
      "type": "n8n-nodes-base.if",
      "position": [
        1328,
        80
      ]
    },
    {
      "id": "12f98583-4b4c-4810-b963-8ce8b7d5723b",
      "name": "Merge \"items\" with last response",
      "type": "n8n-nodes-base.set",
      "position": [
        1552,
        80
      ]
    },
    {
      "id": "e7568448-6d60-412c-a054-4296041a5a24",
      "name": "File size < 2MB",
      "type": "n8n-nodes-base.if",
      "position": [
        2000,
        80
      ]
    },
    {
      "id": "f7ffc34c-ab3b-481d-93c8-26ce6840f858",
      "name": "Calculate file size",
      "type": "n8n-nodes-base.code",
      "position": [
        1776,
        80
      ]
    },
    {
      "id": "6bbfc262-aa4c-4711-895c-fb8bb02841d1",
      "name": "Send a message (file too large)",
      "type": "n8n-nodes-base.gmail",
      "position": [
        2224,
        176
      ]
    },
    {
      "id": "6030eef0-942e-44c7-b947-ffd492e343cc",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -464,
        -176
      ],
      "parameters": {
        "width": 400,
        "height": 560,
        "content": "This workflow retrieves toxic backlinks pointing to your domain using the DataForSEO Backlinks API, automatically generates a Google-compliant disavow file, and emails you a link to the file, ready fo"
      }
    }
  ],
  "connections": {
    "File size < 2MB": {
      "main": [
        [
          {
            "node": "Create file from text",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Send a message (file too large)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Has more pages?": {
      "main": [
        [
          {
            "node": "Set \"items\" field",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Merge \"items\" with last response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set \"items\" field": {
      "main": [
        [
          {
            "node": "Get spam backlinks",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get spam backlinks": {
      "main": [
        [
          {
            "node": "Less than 100K links?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Calculate file size": {
      "main": [
        [
          {
            "node": "File size < 2MB",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create file from text": {
      "main": [
        [
          {
            "node": "Send a message (success)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Less than 100K links?": {
      "main": [
        [
          {
            "node": "Merge \"items\" with DFS response",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Send a message (too many links)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Initialize \"items\" field": {
      "main": [
        [
          {
            "node": "Set \"items\" field",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge \"items\" with DFS response": {
      "main": [
        [
          {
            "node": "Has more pages?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge \"items\" with last response": {
      "main": [
        [
          {
            "node": "Calculate file size",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking ‘Execute workflow’": {
      "main": [
        [
          {
            "node": "Initialize \"items\" field",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}