{
  "name": "Custom Discord notifications for Radarr, Sonarr, Bazarr etc.",
  "nodes": [
    {
      "id": "9c0dffb3-46b5-4408-a4e7-31ffeacc8f15",
      "name": "Webhook",
      "type": "n8n-nodes-base.webhook",
      "position": [
        240,
        60
      ]
    },
    {
      "id": "2d5536bc-86cf-434b-9a68-9cd00e70cccf",
      "name": "Switch",
      "type": "n8n-nodes-base.switch",
      "position": [
        460,
        -40
      ]
    },
    {
      "id": "5b9bc9ee-573b-47d5-9459-25040f4a8b76",
      "name": "Notify Discord",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2440,
        60
      ]
    },
    {
      "id": "6daba0b8-2e7b-4156-bc51-748e84f2f3d7",
      "name": "Set subtitle properties",
      "type": "n8n-nodes-base.set",
      "position": [
        1340,
        -240
      ]
    },
    {
      "id": "4640e2d4-0b30-44e0-ab4e-0ce8422bfea5",
      "name": "Set subtitle fields",
      "type": "n8n-nodes-base.code",
      "position": [
        1560,
        -240
      ]
    },
    {
      "id": "eddbc733-db49-4989-b15d-5db1a3f65cb5",
      "name": "Set Radarr properties",
      "type": "n8n-nodes-base.set",
      "position": [
        1120,
        -40
      ]
    },
    {
      "id": "c04f35b2-9811-4c56-9600-781c2e8ba275",
      "name": "Set Bazarr properties",
      "type": "n8n-nodes-base.set",
      "position": [
        1120,
        -240
      ]
    },
    {
      "id": "3ab117bc-a6bc-429a-b26b-932799423767",
      "name": "Set Sonarr properties",
      "type": "n8n-nodes-base.set",
      "position": [
        680,
        235
      ]
    },
    {
      "id": "5fbd3d74-d325-4f39-8c01-83a3f850acd7",
      "name": "Set movie properties",
      "type": "n8n-nodes-base.set",
      "position": [
        1340,
        -40
      ]
    },
    {
      "id": "d33e55bf-873d-47a7-9b09-ace2994f1e01",
      "name": "Set series properties",
      "type": "n8n-nodes-base.set",
      "position": [
        1340,
        235
      ]
    },
    {
      "id": "47489049-0f54-41aa-a9ac-28549ee5c8ac",
      "name": "Set movie fields",
      "type": "n8n-nodes-base.code",
      "position": [
        1560,
        -40
      ]
    },
    {
      "id": "7f07ae01-cea0-4c65-9a3a-7cf18328eeae",
      "name": "Set series fields",
      "type": "n8n-nodes-base.code",
      "position": [
        1560,
        235
      ]
    },
    {
      "id": "d2d94c62-9083-45e7-b766-c9838316c0e5",
      "name": "Split Out",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        1120,
        160
      ]
    },
    {
      "id": "8814e90e-5a5f-40ae-ba2b-95dce6ededac",
      "name": "Is multiple",
      "type": "n8n-nodes-base.if",
      "position": [
        900,
        235
      ]
    },
    {
      "id": "c1ba73f3-7e28-43c5-a893-9803a694e0d4",
      "name": "Translate Bazarr description",
      "type": "n8n-nodes-base.code",
      "position": [
        1780,
        -240
      ]
    },
    {
      "id": "d9c13a65-82fe-4c6d-a3a5-f2066ef3dd3c",
      "name": "Translate Radarr description",
      "type": "n8n-nodes-base.code",
      "position": [
        1780,
        -40
      ]
    },
    {
      "id": "54f24e3b-d753-4f25-887f-8901d98ccabb",
      "name": "Translate Sonarr description",
      "type": "n8n-nodes-base.code",
      "position": [
        1780,
        235
      ]
    },
    {
      "id": "3d23dd8f-e53c-4da7-90ea-08a542685f4c",
      "name": "Evaluation",
      "type": "n8n-nodes-base.evaluation",
      "position": [
        2440,
        -140
      ]
    },
    {
      "id": "9dadae42-c6c8-480b-82aa-6894b55358e3",
      "name": "Is Test",
      "type": "n8n-nodes-base.evaluation",
      "position": [
        2220,
        -40
      ]
    },
    {
      "id": "59b286d5-e7d2-414a-a460-8dba71027079",
      "name": "Run Tests",
      "type": "n8n-nodes-base.evaluationTrigger",
      "position": [
        -200,
        -140
      ]
    },
    {
      "id": "8995967a-058d-4cc5-bae6-894432bda437",
      "name": "Test is enabled",
      "type": "n8n-nodes-base.filter",
      "position": [
        20,
        -140
      ]
    },
    {
      "id": "baf45f74-a84d-4121-83d6-7dc40c940285",
      "name": "Prepare notification JSON",
      "type": "n8n-nodes-base.code",
      "position": [
        2000,
        -40
      ]
    },
    {
      "id": "684c7848-ce07-4b3f-8087-124f89b23c52",
      "name": "Convert to JSON",
      "type": "n8n-nodes-base.code",
      "position": [
        240,
        -140
      ]
    },
    {
      "id": "5693766d-8739-4fbf-bb8b-8f3310a0f5ef",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        820,
        -240
      ],
      "parameters": {
        "width": null,
        "height": 100,
        "content": "Bazarr events:\n- subtitle downloaded\n- subtitle upgraded"
      }
    },
    {
      "id": "935e4ec1-378c-44a2-93d8-3b2c5d7b7c9c",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        820,
        -40
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": "Radarr events:\n- File Import\n- Movie File Delete\n- Movie File Delete for Upgrade\n- Manual Interaction Required"
      }
    },
    {
      "id": "434b22ed-f8e3-4c97-ae6e-de6baa45962b",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        400,
        220
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": "Sonarr events:\n- File Import\n- Movie File Delete\n- Movie File Delete for Upgrade\n- Manual Interaction Required"
      }
    },
    {
      "id": "297a568f-99ad-4b34-a466-c0a43471a62e",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -680,
        -560
      ],
      "parameters": {
        "width": 380,
        "height": 780,
        "content": "### Custom Radarr / Sonarr / Bazarr notifications\n\nIf you are self hosting Radarr / Sonarr / Bazarr or similar you might want to customise the notifications. This workflow allows you to easily make th"
      }
    },
    {
      "id": "9238365a-5b12-4e5e-a969-9d43c790de83",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1980,
        -300
      ],
      "parameters": {
        "width": null,
        "height": 240,
        "content": "### Output\nDiscord format of notification.\n\n- Title (Year) - Episode\n- What happened\n- Thumbnail\n- Quality\n- Size\n- Subtitle count\n- Release name"
      }
    }
  ],
  "connections": {
    "Switch": {
      "main": [
        [
          {
            "node": "Set Bazarr properties",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Set Radarr properties",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Set Sonarr properties",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Is Test": {
      "main": [
        [
          {
            "node": "Evaluation",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Notify Discord",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Webhook": {
      "main": [
        [
          {
            "node": "Switch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Run Tests": {
      "main": [
        [
          {
            "node": "Test is enabled",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Out": {
      "main": [
        [
          {
            "node": "Set series properties",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Is multiple": {
      "main": [
        [
          {
            "node": "Split Out",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Set series properties",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Notify Discord": {
      "main": [
        []
      ]
    },
    "Convert to JSON": {
      "main": [
        [
          {
            "node": "Switch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Test is enabled": {
      "main": [
        [
          {
            "node": "Convert to JSON",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set movie fields": {
      "main": [
        [
          {
            "node": "Translate Radarr description",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set series fields": {
      "main": [
        [
          {
            "node": "Translate Sonarr description",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set subtitle fields": {
      "main": [
        [
          {
            "node": "Translate Bazarr description",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set movie properties": {
      "main": [
        [
          {
            "node": "Set movie fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Bazarr properties": {
      "main": [
        [
          {
            "node": "Set subtitle properties",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Radarr properties": {
      "main": [
        [
          {
            "node": "Set movie properties",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Sonarr properties": {
      "main": [
        [
          {
            "node": "Is multiple",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set series properties": {
      "main": [
        [
          {
            "node": "Set series fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set subtitle properties": {
      "main": [
        [
          {
            "node": "Set subtitle fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare notification JSON": {
      "main": [
        [
          {
            "node": "Is Test",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Translate Bazarr description": {
      "main": [
        [
          {
            "node": "Prepare notification JSON",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Translate Radarr description": {
      "main": [
        [
          {
            "node": "Prepare notification JSON",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Translate Sonarr description": {
      "main": [
        [
          {
            "node": "Prepare notification JSON",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}