AutomationFlowsWeb Scraping › Dynamic Media Library with On-demand Downloads for Radarr/sonarr and Plex

Dynamic Media Library with On-demand Downloads for Radarr/sonarr and Plex

ByArjan ter Heegde @arjanterheegde on n8n.io

This flow creates dummy files for every item added in your *Arrs (Radarr/Sonarr) with the tag .

Webhook trigger★★★★★ complexity87 nodesHTTP RequestSsh
Web Scraping Trigger: Webhook Nodes: 87 Complexity: ★★★★★ Added:
Dynamic Media Library with On-demand Downloads for Radarr/sonarr and Plex — n8n workflow card showing HTTP Request, Ssh integration

This workflow corresponds to n8n.io template #6980 — we link there as the canonical source.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "id": "014f2F9hjeY0Ixps",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "n8n Placeholdarr for Plex",
  "tags": [],
  "nodes": [
    {
      "id": "816067dc-1c5c-42e4-a6f6-06cdd6a92365",
      "name": "Respond to Webhook",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        848,
        -224
      ],
      "parameters": {
        "options": {
          "responseCode": 200,
          "responseHeaders": {
            "entries": [
              {
                "name": "Content-Type",
                "value": " application/json"
              }
            ]
          }
        },
        "respondWith": "json",
        "responseBody": "={{ $('Format JustWatch results').all().map(item => item.json) }}"
      },
      "executeOnce": true,
      "typeVersion": 1.4
    },
    {
      "id": "625beae8-71a6-4b52-8cb6-022ee08ef7fd",
      "name": "Format JustWatch results",
      "type": "n8n-nodes-base.code",
      "position": [
        -128,
        -144
      ],
      "parameters": {
        "jsCode": "const edges = items[0].json.data.popularTitles.edges;\n\nreturn edges.map(edge => {\n  const node = edge.node;\n\n  return {\n    json: {\n      ...($('Webhook Arrs custom list JustWatch').first().json.params.objectType === \"MOVIE\" && {\n        id: Number(node.content.externalIds.tmdbId)\n      }),\n      imdbId: node.content.externalIds.imdbId\n    }\n  };\n});"
      },
      "executeOnce": false,
      "typeVersion": 2
    },
    {
      "id": "22af297a-8b1b-436c-aed6-4ebac97b93cb",
      "name": "Call JustWatch API",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -592,
        128
      ],
      "parameters": {
        "url": "https://apis.justwatch.com/graphql",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n    \"operationName\": \"GetPopularTitles\",\n    \"variables\": {\n        \"first\": {{ $json.params.limit }},\n        \"popularTitlesSortBy\": \"POPULAR\",\n        \"sortRandomSeed\": 0,\n        \"offset\": null,\n        \"creditsRole\": \"DIRECTOR\",\n        \"after\": \"\",\n        \"popularTitlesFilter\": {\n            \"ageCertifications\": [],\n            \"excludeGenres\": [],\n            \"excludeProductionCountries\": [],\n            \"objectTypes\": [\n                \"{{ $json.params.objectType }}\"\n            ],\n            \"productionCountries\": [],\n            \"subgenres\": [],\n            \"genres\": [],\n            \"packages\": [\n                \"{{ $json.params.filter }}\"\n            ],\n            \"excludeIrrelevantTitles\": false,\n            \"presentationTypes\": [],\n            \"monetizationTypes\": [],\n            \"searchQuery\": \"\"\n        },\n        \"watchNowFilter\": {\n            \"packages\": [\n                \"{{ $json.params.filter }}\"\n            ],\n            \"monetizationTypes\": []\n        },\n        \"language\": \"en\",\n        \"country\": \"NL\"\n    },\n    \"query\": \"query GetPopularTitles($backdropProfile: BackdropProfile, $country: Country!, $first: Int! = 70, $format: ImageFormat, $language: Language!, $after: String, $popularTitlesFilter: TitleFilter, $popularTitlesSortBy: PopularTitlesSorting! = POPULAR, $profile: PosterProfile, $sortRandomSeed: Int! = 0, $watchNowFilter: WatchNowOfferFilter!, $offset: Int = 0, $creditsRole: CreditRole! = DIRECTOR) {\\n  popularTitles(\\n    country: $country\\n    filter: $popularTitlesFilter\\n    first: $first\\n    sortBy: $popularTitlesSortBy\\n    sortRandomSeed: $sortRandomSeed\\n    offset: $offset\\n    after: $after\\n  ) {\\n    __typename\\n    edges {\\n      cursor\\n      node {\\n        ...PopularTitleGraphql\\n        __typename\\n      }\\n      __typename\\n    }\\n    pageInfo {\\n      startCursor\\n      endCursor\\n      hasPreviousPage\\n      hasNextPage\\n      __typename\\n    }\\n    totalCount\\n  }\\n}\\n\\nfragment PopularTitleGraphql on MovieOrShow {\\n  __typename\\n  id\\n  objectId\\n  objectType\\n  content(country: $country, language: $language) {\\n      externalIds {\\n        tmdbId\\n    imdbId\\n      }\\n   title\\n    fullPath\\n    originalReleaseYear\\n    shortDescription\\n    interactions {\\n      likelistAdditions\\n      dislikelistAdditions\\n      __typename\\n    }\\n    scoring {\\n      imdbVotes\\n      imdbScore\\n      tmdbPopularity\\n      tmdbScore\\n      tomatoMeter\\n      certifiedFresh\\n      jwRating\\n      __typename\\n    }\\n    interactions {\\n      votesNumber\\n      __typename\\n    }\\n    dailymotionClips: clips(providers: [DAILYMOTION]) {\\n      sourceUrl\\n      externalId\\n      provider\\n      streamUrl\\n      __typename\\n    }\\n    posterUrl(profile: $profile, format: $format)\\n    ... on MovieOrShowOrSeasonContent {\\n      backdrops(profile: $backdropProfile, format: $format) {\\n        backdropUrl\\n        __typename\\n      }\\n      __typename\\n    }\\n    isReleased\\n    credits(role: $creditsRole) {\\n      name\\n      personId\\n      __typename\\n    }\\n    runtime\\n    genres {\\n      translation(language: $language)\\n      shortName\\n      __typename\\n    }\\n    __typename\\n  }\\n  likelistEntry {\\n    createdAt\\n    __typename\\n  }\\n  dislikelistEntry {\\n    createdAt\\n    __typename\\n  }\\n  watchlistEntryV2 {\\n    createdAt\\n    __typename\\n  }\\n  customlistEntries {\\n    createdAt\\n    __typename\\n  }\\n  freeOffersCount: offerCount(\\n    country: $country\\n    platform: WEB\\n    filter: {monetizationTypes: [FREE, ADS]}\\n  )\\n  watchNowOffer(country: $country, platform: WEB, filter: $watchNowFilter) {\\n    ...WatchNowOffer\\n    __typename\\n  }\\n  ... on Movie {\\n    seenlistEntry {\\n      createdAt\\n      __typename\\n    }\\n    __typename\\n  }\\n  ... on Show {\\n    tvShowTrackingEntry {\\n      createdAt\\n      __typename\\n    }\\n    seenState(country: $country) {\\n      seenEpisodeCount\\n      progress\\n      __typename\\n    }\\n    __typename\\n  }\\n}\\n\\nfragment WatchNowOffer on Offer {\\n  __typename\\n  id\\n  standardWebURL\\n  preAffiliatedStandardWebURL\\n  streamUrl\\n  package {\\n    id\\n    icon\\n    packageId\\n    clearName\\n    shortName\\n    technicalName\\n    iconWide(profile: S160)\\n    hasRectangularIcon(country: $country, platform: WEB)\\n    __typename\\n  }\\n  retailPrice(language: $language)\\n  retailPriceValue\\n  lastChangeRetailPriceValue\\n  currency\\n  presentationType\\n  monetizationType\\n  availableTo\\n  dateCreated\\n  newElementCount\\n}\\n\"\n}",
        "sendBody": true,
        "specifyBody": "json"
      },
      "executeOnce": true,
      "typeVersion": 4.2
    },
    {
      "id": "8039e353-f1d3-4a73-89b0-4c5d30c85670",
      "name": "Remove unmonitored tag",
      "type": "n8n-nodes-base.httpRequest",
      "onError": "continueRegularOutput",
      "position": [
        272,
        912
      ],
      "parameters": {
        "url": "=http://192.168.1.237:7878/api/v3/movie/editor",
        "method": "PUT",
        "options": {},
        "jsonBody": "={\n          \"movieIds\": [{{ $json.body.movie.id }}],\n          \"tags\": [8],\n          \"applyTags\": \"remove\"\n}",
        "sendBody": true,
        "specifyBody": "json",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth"
      },
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      },
      "notesInFlow": false,
      "retryOnFail": false,
      "typeVersion": 4.2,
      "alwaysOutputData": false
    },
    {
      "id": "e42ca5e0-2faa-4b32-b936-c75b1f05431b",
      "name": "If tag unmonitored exists",
      "type": "n8n-nodes-base.if",
      "position": [
        -32,
        928
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "2dc69335-707d-49bc-9619-cfc96f136229",
              "operator": {
                "type": "array",
                "operation": "contains",
                "rightType": "any"
              },
              "leftValue": "={{ $json.body.movie.tags }}",
              "rightValue": "dummy-unprocessed"
            },
            {
              "id": "03106293-e896-4d87-ac98-45acbd7b863b",
              "operator": {
                "name": "filter.operator.equals",
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "f87cdfc2-30fc-47df-8b0e-57e49512f516",
      "name": "If Radarr",
      "type": "n8n-nodes-base.if",
      "position": [
        -384,
        1008
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "5f57e6ef-c3fa-4127-bca7-6c490a05edb9",
              "operator": {
                "type": "object",
                "operation": "exists",
                "singleValue": true
              },
              "leftValue": "={{ $json.body.movie }}",
              "rightValue": 0
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "26bdba3f-9d3c-41b8-8298-63d4963928da",
      "name": "If tag unmonitored exists Sonarr",
      "type": "n8n-nodes-base.if",
      "position": [
        -32,
        1104
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "2dc69335-707d-49bc-9619-cfc96f136229",
              "operator": {
                "type": "array",
                "operation": "contains",
                "rightType": "any"
              },
              "leftValue": "={{ $json.body.series.tags }}",
              "rightValue": "dummy-unprocessed"
            },
            {
              "id": "03106293-e896-4d87-ac98-45acbd7b863b",
              "operator": {
                "name": "filter.operator.equals",
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "22a88278-8dfc-4f37-87f8-c3af8f8cbef8",
      "name": "Remove unmonitored tag Sonarr",
      "type": "n8n-nodes-base.httpRequest",
      "onError": "continueRegularOutput",
      "position": [
        256,
        1104
      ],
      "parameters": {
        "url": "=http://192.168.1.237:8989/api/v3/series/editor",
        "method": "PUT",
        "options": {},
        "jsonBody": "={\n          \"seriesIds\": [{{ $json.body.series.id }}],\n          \"tags\": [5],\n          \"applyTags\": \"remove\"\n}",
        "sendBody": true,
        "specifyBody": "json",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth"
      },
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      },
      "notesInFlow": false,
      "retryOnFail": false,
      "typeVersion": 4.2,
      "alwaysOutputData": false
    },
    {
      "id": "5e98925d-ba4d-4820-86d7-ed2f93f79f36",
      "name": "Webhook Arrs Dummy file update",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -1056,
        1216
      ],
      "parameters": {
        "path": "bd5102ad-9dc5-4415-b779-89d002c6e448",
        "options": {},
        "httpMethod": "POST"
      },
      "typeVersion": 2
    },
    {
      "id": "77b1f379-da9a-42c2-83fb-5a87b2e101bb",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        448,
        592
      ],
      "parameters": {
        "height": 96,
        "content": "To-do: \nControleren of er geen dummy files meer zijn dan pas tag verwijderen."
      },
      "typeVersion": 1
    },
    {
      "id": "e71ea25f-7684-475f-bb4f-b4e7c62d2902",
      "name": "Switch eventType",
      "type": "n8n-nodes-base.switch",
      "position": [
        -800,
        1184
      ],
      "parameters": {
        "rules": {
          "values": [
            {
              "outputKey": "Download",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "7752997b-3746-4386-88a1-68c305b40aee",
                    "operator": {
                      "name": "filter.operator.equals",
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.body.eventType }}",
                    "rightValue": "Download"
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "MovieAdded",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "1ab6c3fc-c6d6-4940-882c-cc839b48f25f",
                    "operator": {
                      "name": "filter.operator.equals",
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.body.eventType }}",
                    "rightValue": "MovieAdded"
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "SeriesAdd",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "4c985af1-84a0-47c7-8a55-8889cc08b333",
                    "operator": {
                      "name": "filter.operator.equals",
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.body.eventType }}",
                    "rightValue": "SeriesAdd"
                  }
                ]
              },
              "renameOutput": true
            }
          ]
        },
        "options": {
          "fallbackOutput": "none"
        }
      },
      "typeVersion": 3.2
    },
    {
      "id": "26b16a0c-15fc-458c-860d-11c69ae08d2b",
      "name": "Create dummy file for movie1",
      "type": "n8n-nodes-base.ssh",
      "position": [
        -224,
        1344
      ],
      "parameters": {
        "command": "=mkdir -p \"{{ $('Radarr movie').item.json.path }}\"\n\nffmpeg -ss 0 -i \"/mnt/user/Media/Plex/Placeholdarr/dummy-file.mp4\" \\\n  -t {{ Math.min($('Radarr movie').item.json.runtime * 60, 14400) }} -c copy \"{{ $('Radarr movie').item.json.path }}/dummy.mp4\"\n\nchmod -R 777 \"{{ $('Radarr movie').item.json.path }}\"\nchown -R nobody:users \"{{ $('Radarr movie').item.json.path }}\""
      },
      "credentials": {
        "sshPassword": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "6d1e2297-fbdd-4d25-ae9b-b3dbefb3d6ca",
      "name": "Refresh movie1",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        16,
        1344
      ],
      "parameters": {
        "url": "=http://192.168.1.237:7878/api/v3/command",
        "method": "POST",
        "options": {},
        "jsonBody": "={\"name\":\"RefreshMovie\",\"movieIds\":[{{ $('Radarr movie').item.json.id }}]}",
        "sendBody": true,
        "specifyBody": "json",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth"
      },
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      },
      "notesInFlow": false,
      "retryOnFail": false,
      "typeVersion": 4.2,
      "alwaysOutputData": false
    },
    {
      "id": "7854e9a9-5f77-4bf0-8f33-e3314572ac3a",
      "name": "Refresh series1",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        272,
        1616
      ],
      "parameters": {
        "url": "=http://192.168.1.237:8989/api/v3/command",
        "method": "POST",
        "options": {},
        "jsonBody": "={\"name\":\"RefreshSeries\",\"seriesId\":{{ $('Sonarr series').item.json.id }}}",
        "sendBody": true,
        "specifyBody": "json",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth"
      },
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      },
      "notesInFlow": false,
      "retryOnFail": false,
      "typeVersion": 4.2,
      "alwaysOutputData": false
    },
    {
      "id": "47b6a9ef-06dc-4168-ad70-62da2fef0696",
      "name": "Refresh Plex",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        224,
        1344
      ],
      "parameters": {
        "url": "=http://192.168.1.237:32400/library/sections/7/refresh?path={{\n  encodeURIComponent(\n   $('Radarr movie').item.json.path\n)\n}}",
        "method": "POST",
        "options": {},
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth"
      },
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      },
      "executeOnce": false,
      "typeVersion": 4.2
    },
    {
      "id": "d84732c8-09b7-4a9b-bf00-9449ec4c523b",
      "name": "Refresh Plex Series",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        560,
        1616
      ],
      "parameters": {
        "url": "=http://192.168.1.237:32400/library/sections/8/refresh?path={{\n  encodeURIComponent(\n  $('Sonarr series').item.json.path\n  )\n}}",
        "method": "POST",
        "options": {},
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth"
      },
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      },
      "executeOnce": false,
      "typeVersion": 4.2
    },
    {
      "id": "bb3647c8-0586-4c3e-975a-120dda6f7b89",
      "name": "Sonarr runtime s01e01",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -208,
        1616
      ],
      "parameters": {
        "url": "=http://192.168.1.237:8989/api/v3/episode",
        "options": {},
        "sendQuery": true,
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "queryParameters": {
          "parameters": [
            {
              "name": "seriesId",
              "value": "={{ $('Sonarr series').first().json.id }}"
            },
            {
              "name": "seasonNumber",
              "value": "1"
            }
          ]
        }
      },
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      },
      "notesInFlow": false,
      "retryOnFail": false,
      "typeVersion": 4.2,
      "alwaysOutputData": false
    },
    {
      "id": "33e771ed-2b6a-4046-9ffe-dd71df1577a7",
      "name": "Create dummy file for series with runtime",
      "type": "n8n-nodes-base.ssh",
      "position": [
        16,
        1616
      ],
      "parameters": {
        "command": "=mkdir -p \"{{ $('Webhook Arrs Dummy file update').item.json.body.series.path }}/Season 1\"\n\nffmpeg -ss 0 -i \"/mnt/user/Media/Plex/Placeholdarr/dummy-file.mp4\" \\\n  -t {{ Math.min($('Sonarr runtime s01e01').first().json.runtime * 60, 14400) }} -c copy \"{{ $('Webhook Arrs Dummy file update').item.json.body.series.path }}/Season 1/Dummy s01e01.mp4\"\n\nchmod -R 777 \"{{ $('Webhook Arrs Dummy file update').item.json.body.series.path }}\"\nchown -R nobody:users \"{{ $('Webhook Arrs Dummy file update').item.json.body.series.path }}\""
      },
      "credentials": {
        "sshPassword": {
          "name": "<your credential>"
        }
      },
      "executeOnce": true,
      "typeVersion": 1
    },
    {
      "id": "d743cb61-8351-4854-b668-b023432f19b6",
      "name": "Radarr movie",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -400,
        1344
      ],
      "parameters": {
        "url": "=http://192.168.1.237:7878/api/v3/movie/{{ $('Webhook Arrs Dummy file update').item.json.body.movie.id }}",
        "options": {},
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth"
      },
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      },
      "notesInFlow": false,
      "retryOnFail": false,
      "typeVersion": 4.2,
      "alwaysOutputData": false
    },
    {
      "id": "1d5a3a61-c2af-4b1f-8d02-c32078368f21",
      "name": "Sonarr series",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -416,
        1616
      ],
      "parameters": {
        "url": "=http://192.168.1.237:8989/api/v3/series/{{ $('Webhook Arrs Dummy file update').item.json.body.series.id }}",
        "options": {},
        "sendQuery": true,
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "queryParameters": {
          "parameters": [
            {
              "name": "seriesId",
              "value": "={{ $('Webhook Arrs Dummy file update').item.json.body.series.id }}"
            },
            {
              "name": "seasonNumber",
              "value": "1"
            }
          ]
        }
      },
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      },
      "notesInFlow": false,
      "retryOnFail": false,
      "typeVersion": 4.2,
      "alwaysOutputData": false
    },
    {
      "id": "eeda8469-cb18-458a-a12a-1bc21639aca7",
      "name": "Create dummy file",
      "type": "n8n-nodes-base.ssh",
      "position": [
        -848,
        1648
      ],
      "parameters": {
        "command": "=docker run --rm \\\n  --device /dev/dri \\\n  -v /mnt/user/Media/Plex:/mnt/user/Media/Plex \\\n  akashisn/ffmpeg:7.0.2 \\\n  -hwaccel qsv -f lavfi -i color=black:s=640x480:d=14400:r=1 \\\n  -loop 1 -t 120 -i /mnt/user/Media/Plex/Placeholdarr/dummy-download.png \\\n  -filter_complex \"[1:v]scale=640:480:force_original_aspect_ratio=decrease,pad=640:480:(ow-iw)/2:(oh-ih)/2:black[img];[0:v][img]overlay=enable='lte(t,120)'\" \\\n  -c:v h264_qsv -b:v 300k -pix_fmt yuv420p \\\n  \"/mnt/user/Media/Plex/Placeholdarr/dummy-file.mp4\""
      },
      "credentials": {
        "sshPassword": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "77e79179-fe4b-4c00-95db-59a25f399dfb",
      "name": "Search movie",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -112,
        2112
      ],
      "parameters": {
        "url": "=http://192.168.1.237:7878/api/v3/command",
        "method": "POST",
        "options": {},
        "jsonBody": "={\"name\":\"MoviesSearch\",\"movieIds\":[{{ $('Get Radarr information from tmdbId').item.json.id }}]}",
        "sendBody": true,
        "specifyBody": "json",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth"
      },
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      },
      "notesInFlow": false,
      "retryOnFail": false,
      "typeVersion": 4.2,
      "alwaysOutputData": false
    },
    {
      "id": "1454fdb3-6d54-402e-8595-83e9d00fe3e1",
      "name": "Respond 200",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        96,
        2112
      ],
      "parameters": {
        "options": {
          "responseCode": 200
        },
        "respondWith": "noData"
      },
      "typeVersion": 1.4
    },
    {
      "id": "ff692460-8be9-4f64-99e4-e233a6a7e1c2",
      "name": "Monitor movie",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -368,
        2112
      ],
      "parameters": {
        "url": "=http://192.168.1.237:7878/api/v3/movie/editor",
        "method": "PUT",
        "options": {},
        "jsonBody": "={\"monitored\": true, \"movieIds\":[{{ $('Get Radarr information from tmdbId').item.json.id }}]}",
        "sendBody": true,
        "specifyBody": "json",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth"
      },
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      },
      "notesInFlow": false,
      "retryOnFail": false,
      "typeVersion": 4.2,
      "alwaysOutputData": false
    },
    {
      "id": "46fcd496-4c0a-474c-ba8c-a8d694bc15a8",
      "name": "Respond ",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        320,
        2432
      ],
      "parameters": {
        "options": {
          "responseCode": 200
        },
        "respondWith": "noData"
      },
      "executeOnce": true,
      "typeVersion": 1.4
    },
    {
      "id": "2a1590b8-5e59-4835-8de4-5dca41c7da40",
      "name": "Monitor series",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -400,
        2336
      ],
      "parameters": {
        "url": "=http://192.168.1.237:8989/api/v3/series/{{ $json.id }}",
        "method": "PUT",
        "options": {},
        "jsonBody": "={{ Object.assign({}, $json, { \"monitored\": true }) }}",
        "sendBody": true,
        "specifyBody": "json",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth"
      },
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      },
      "notesInFlow": false,
      "retryOnFail": false,
      "typeVersion": 4.2,
      "alwaysOutputData": false
    },
    {
      "id": "96b3c1d1-c6e4-4915-bd9b-ad2bb940494b",
      "name": "Monitor all seasons",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -192,
        2336
      ],
      "parameters": {
        "url": "=http://192.168.1.237:8989/api/v3/seasonPass",
        "method": "POST",
        "options": {},
        "jsonBody": "={\"series\":[{\"id\":{{ $json.id }}}],\"monitoringOptions\":{\"monitor\":\"all\", \"monitorNewItems\": \"all\"}}",
        "sendBody": true,
        "specifyBody": "json",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth"
      },
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      },
      "notesInFlow": false,
      "retryOnFail": false,
      "typeVersion": 4.2,
      "alwaysOutputData": false
    },
    {
      "id": "6993d242-0e3d-4252-9f04-f6b80ecb02a1",
      "name": "If movie4",
      "type": "n8n-nodes-base.if",
      "position": [
        -880,
        2224
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "4ae3bfa3-1f34-4423-96d6-97e3ec90fb9b",
              "operator": {
                "name": "filter.operator.equals",
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.body.media.type }}",
              "rightValue": "movie"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "53f09ea8-0ba4-4866-8705-b36add60e6c9",
      "name": "Get Radarr information from tmdbId",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -624,
        2112
      ],
      "parameters": {
        "url": "=http://192.168.1.237:7878/api/v3/movie?tmdbId={{ $json.body.media.ids.tmdb }}",
        "options": {},
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth"
      },
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      },
      "notesInFlow": false,
      "retryOnFail": false,
      "typeVersion": 4.2,
      "alwaysOutputData": false
    },
    {
      "id": "e8da3276-5493-4605-a382-f4228d95cc8f",
      "name": "Get Sonarr information from tvdbId",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -640,
        2336
      ],
      "parameters": {
        "url": "=http://192.168.1.237:8989/api/v3/series?tvdbId={{ $json.body.media.ids.tvdb }}",
        "options": {},
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth"
      },
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      },
      "notesInFlow": false,
      "retryOnFail": false,
      "typeVersion": 4.2,
      "alwaysOutputData": false
    },
    {
      "id": "53ecfd80-a81c-4976-ae4a-1ce6ba506bcc",
      "name": "Webhook Tautulli",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -1120,
        2224
      ],
      "parameters": {
        "path": "9cc04992-377c-40fc-a0a9-810c08438224",
        "options": {},
        "httpMethod": "POST",
        "responseMode": "responseNode"
      },
      "typeVersion": 2
    },
    {
      "id": "0749d0c5-74c7-47d7-bfef-75aeaa088ebb",
      "name": "Check if collection is not empty",
      "type": "n8n-nodes-base.if",
      "position": [
        1056,
        -48
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "a8db1849-58af-4664-90a1-33c9db27458e",
              "operator": {
                "type": "string",
                "operation": "notEmpty",
                "singleValue": true
              },
              "leftValue": "={{ $('Webhook Arrs custom list JustWatch').item.json.params.collectionId }}",
              "rightValue": ""
            }
          ]
        }
      },
      "executeOnce": true,
      "typeVersion": 2.2
    },
    {
      "id": "1c1ae591-c96e-41ba-968f-745ccefb1465",
      "name": "If objectType is movie",
      "type": "n8n-nodes-base.if",
      "position": [
        96,
        -64
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "be18535d-6e4b-42b1-a32a-a43cdd96ffac",
              "operator": {
                "name": "filter.operator.equals",
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $('Webhook Arrs custom list JustWatch').item.json.params.objectType }}",
              "rightValue": "MOVIE"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "fd6fe507-a8b5-4d18-8617-8b106ecbcaa3",
      "name": "Respond to Webhook1",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        848,
        112
      ],
      "parameters": {
        "options": {
          "responseCode": 200,
          "responseHeaders": {
            "entries": [
              {
                "name": "Content-Type",
                "value": " application/json"
              }
            ]
          }
        },
        "respondWith": "json",
        "responseBody": "={{ $('Format JustWatch results add tvdbId').all().map(item => item.json) }}"
      },
      "executeOnce": true,
      "typeVersion": 1.4
    },
    {
      "id": "ff7cf84f-cf82-43f3-ba6c-5e753d401c2e",
      "name": "Format JustWatch results add tvdbId",
      "type": "n8n-nodes-base.code",
      "position": [
        512,
        144
      ],
      "parameters": {
        "jsCode": "return items.map(item => {\n  return {\n    json: {\n      tvdbId: String(item.json.tvdbId)\n    }\n  };\n});"
      },
      "typeVersion": 2
    },
    {
      "id": "18551931-2df8-44a2-9875-e49521d608ca",
      "name": "Sonarr serie lookup1",
      "type": "n8n-nodes-base.httpRequest",
      "onError": "continueRegularOutput",
      "position": [
        304,
        32
      ],
      "parameters": {
        "url": "=http://192.168.1.237:8989/api/v3/series/lookup?term={{ $json.imdbId }}",
        "options": {},
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth"
      },
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      },
      "notesInFlow": false,
      "retryOnFail": false,
      "typeVersion": 4.2,
      "alwaysOutputData": true
    },
    {
      "id": "cae3b989-28b5-4c8a-96e6-474d73554621",
      "name": "Webhook Arrs custom list JustWatch",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -912,
        128
      ],
      "parameters": {
        "path": ":filter/:limit/:objectType/:collectionId",
        "options": {},
        "responseMode": "responseNode"
      },
      "typeVersion": 2
    },
    {
      "id": "1217b066-2dab-47ae-bd05-e291b3d1d45f",
      "name": "Webhook Arrs custom list Trakt",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -912,
        384
      ],
      "parameters": {
        "path": ":username/:list/:limit/:objectType/:collectionId",
        "options": {},
        "responseMode": "responseNode"
      },
      "typeVersion": 2
    },
    {
      "id": "264a1dfb-2bd8-4686-9b70-643aa452cf40",
      "name": "Call Trakt API",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -656,
        384
      ],
      "parameters": {
        "url": "=https://api.trakt.tv/users/{{ $json.params.username }}/lists/{{ $json.params.list }}/items/movies",
        "options": {},
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth"
      },
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      },
      "executeOnce": true,
      "typeVersion": 4.2
    },
    {
      "id": "7c648a25-cb1c-411b-8f80-7cf1ae35c7de",
      "name": "Format JustWatch results1",
      "type": "n8n-nodes-base.code",
      "position": [
        -432,
        384
      ],
      "parameters": {
        "jsCode": "const limit = $('Webhook Arrs custom list Trakt').first().json.params.limit || 100;\n\nreturn items.slice(0, limit).map(({ json }) => {\n  const movie = json.movie;\n\n  return {\n    json: {\n      id: Number(movie.ids.tmdb),\n      imdbId: movie.ids.imdb\n    }\n  };\n});\n"
      },
      "executeOnce": false,
      "typeVersion": 2
    },
    {
      "id": "b9178b4b-f165-4021-bac5-54a34d990013",
      "name": "Respond to Webhook2",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        -128,
        432
      ],
      "parameters": {
        "options": {
          "responseCode": 200,
          "responseHeaders": {
            "entries": [
              {
                "name": "Content-Type",
                "value": "application/json"
              }
            ]
          }
        },
        "respondWith": "json",
        "responseBody": "={{ $('Format JustWatch results1').all().map(item => item.json) }}"
      },
      "executeOnce": true,
      "typeVersion": 1.4
    },
    {
      "id": "3a965e43-7abc-4ee3-af8f-7e1ab20d42f8",
      "name": "Get all items in collection1",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2928,
        320
      ],
      "parameters": {
        "url": "=http://192.168.1.237:32400/library/collections/{{ $json.MediaContainer.Metadata[0].ratingKey }}/children",
        "options": {},
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth"
      },
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      },
      "executeOnce": true,
      "typeVersion": 4.2
    },
    {
      "id": "03062dc7-10b6-4193-b75c-4042b9ecdb5f",
      "name": "Check if collection contains items1",
      "type": "n8n-nodes-base.if",
      "position": [
        3120,
        560
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "a54234bd-6c15-41b2-8c09-d6a35efce840",
              "operator": {
                "type": "number",
                "operation": "gt"
              },
              "leftValue": "={{ $('Get all items in collection1').item.json.MediaContainer.size }}",
              "rightValue": 0
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "3d411a66-a5ba-4cfe-8e61-203330f73473",
      "name": "Split Out Collection Items1",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        3296,
        272
      ],
      "parameters": {
        "options": {},
        "fieldToSplitOut": "MediaContainer.Metadata"
      },
      "typeVersion": 1
    },
    {
      "id": "a8d9bc15-4707-480f-ac20-5dcdde3bba97",
      "name": "Loop Over Items1",
      "type": "n8n-nodes-base.splitInBatches",
      "onError": "continueRegularOutput",
      "position": [
        3584,
        272
      ],
      "parameters": {
        "options": {}
      },
      "executeOnce": false,
      "typeVersion": 3
    },
    {
      "id": "160f4407-be37-464f-9c17-bc7013232aeb",
      "name": "Remove item from collection1",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        3840,
        288
      ],
      "parameters": {
        "url": "=http://192.168.1.237:32400/library/sections/{{ $('Get collection1').item.json.MediaContainer.librarySectionID }}/all?type=1&id={{ $json.ratingKey }}&includeExternalMedia=1&collection[].tag.tag-={{ encodeURIComponent($('Get collection1').item.json.MediaContainer.Metadata[0].title) }}",
        "method": "PUT",
        "options": {},
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth"
      },
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "178927b9-459a-47b6-8f8e-cac49487870a",
      "name": "Get collection1",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2496,
        384
      ],
      "parameters": {
        "url": "=http://192.168.1.237:32400/library/collections/{{ $json.collectionId }}",
        "options": {},
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth"
      },
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "c00d0eed-6e07-4004-829d-2b9774a71087",
      "name": "Loop Over Items3",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        4272,
        576
      ],
      "parameters": {
        "options": {
          "reset": false
        }
      },
      "typeVersion": 3
    },
    {
      "id": "677ffe8c-2f71-4ce5-b011-9c5756e3abd7",
      "name": "Get GUID from imdbId",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        4496,
        592
      ],
      "parameters": {
        "url": "=http://192.168.1.237:32400/library/metadata/{{ $('Set fields for collection').first().json.objectType == \"MOVIE\" ? 121583 : 117877 }}/matches?manual=1&title={{ $('Loop Over Items3').item.json.imdbId }}",
        "options": {},
        "sendHeaders": true,
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "headerParameters": {
          "parameters": [
            {
              "name": "Accept",
              "value": "application/json"
            }
          ]
        }
      },
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "d2ba9998-5b36-44a2-bd62-37ec6847ff94",
      "name": "Add item to collection2",
      "type": "n8n-nodes-base.httpRequest",
      "onError": "continueRegularOutput",
      "position": [
        5664,
        576
      ],
      "parameters": {
        "url": "=http://192.168.1.237:32400/library/collections/{{ $('Get collection1').first().json.MediaContainer.Metadata[0].ratingKey }}/items",
        "method": "PUT",
        "options": {
          "lowercaseHeaders": true
        },
        "sendQuery": true,
        "sendHeaders": true,
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "queryParameters": {
          "parameters": [
            {
              "name": "uri",
              "value": "=server://14279b2fa6259250db471223f9a8fa2056e31c65/com.plexapp.plugins.library/library/metadata/{{ $json.MediaContainer.Metadata[0].ratingKey }}"
            }
          ]
        },
        "headerParameters": {
          "parameters": [
            {
              "name": "Accept",
              "value": "application/json, text/plain, */*"
            }
          ]
        }
      },
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.2,
      "alwaysOutputData": true
    },
    {
      "id": "90e4e4db-335d-4402-8b55-f68f4b0481de",
      "name": "Add item to collection3",
      "type": "n8n-nodes-base.httpRequest",
      "onError": "continueRegularOutput",
      "position": [
        5184,
        464
      ],
      "parameters": {
        "url": "=http://192.168.1.237:32400/library/collections/{{ $('Get collection1').first().json.MediaContainer.Metadata[0].ratingKey }}/items",
        "method": "OPTIONS",
        "options": {
          "lowercaseHeaders": true
        },
        "sendQuery": true,
        "sendHeaders": true,
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "queryParameters": {
          "parameters": [
            {
              "name": "uri",
              "value": "=server://14279b2fa6259250db471223f9a8fa2056e31c65/com.plexapp.plugins.library/library/metadata/{{ $json.MediaContainer.Metadata[0].ratingKey }}"
            }
          ]
        },
        "headerParameters": {
          "parameters": [
            {
              "name": "Accept",
              "value": "application/json, text/plain, */*"
            },
            {
              "name": "access-control-request-method",
              "value": "PUT"
            }
          ]
        }
      },
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.2,
      "alwaysOutputData": true
    },
    {
      "id": "7aeda33a-58d7-4a62-991e-3654da9bc5b2",
      "name": "Get ratingKey from GUID1",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        4960,
        576
      ],
      "parameters": {
        "url": "=http://192.168.1.237:32400/library/all?guid={{ $json.MediaContainer.SearchResult[0].guid }}",
        "options": {},
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth"
      },
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "ebbaf071-2bee-40a2-afe1-719acc9a8959",
      "name": "Move collection item2",
      "type": "n8n-nodes-base.httpRequest",
      "onError": "continueRegularOutput",
      "position": [
        6192,
        576
      ],
      "parameters": {
        "url": "=http://192.168.1.237:32400/library/collections/{{ $('Get collection1').first().json.MediaContainer.Metadata[0].ratingKey }}/items/{{ $json.MediaContainer.Metadata[0].ratingKey }}/move",
        "method": "PUT",
        "options": {
          "lowercaseHeaders": true
        },
        "sendQuery": true,
        "sendHeaders": true,
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "queryParameters": {
          "parameters": [
            {}
          ]
        },
        "headerParameters": {
          "parameters": [
            {
              "name": "Accept",
              "value": "application/json, text/plain, */*"
            }
          ]
        }
      },
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.2,
      "alwaysOutputData": true
    },
    {
      "id": "4206a64b-417f-4227-89a6-069b56022c22",
      "name": "If found Plex GUID1",
      "type": "n8n-nodes-base.if",
      "position": [
        4688,
        592
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "bd0f098a-9fee-46ad-8c82-8bf2d99583ad",
              "operator": {
                "type": "number",
                "operation": "gt"
              },
              "leftValue": "={{ $json.MediaContainer.size }}",
              "rightValue": 0
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "12ccd64d-4ea8-4d65-9778-f067866b2c12",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1504,
        -192
      ],
      "parameters": {
        "width": 528,
        "height": 944,
        "content": "## *Arrs Import List for Plex Collection\n### You can use either **Trakt.TV** lists or **JustWatch.com** lists to populate your Plex collections.  \n### Add a new import list inside your *Arrs application.\n### Once set up, choose one of the nodes in **n8n** to retrieve the flow URL (GUID).\n\n### JustWatch Webhook Format\n\n```http://127.0.0.1:5678/webhook/<Node_GUID>/<Provider_ID>/<Count>/<Type>/<Plex_Collection_ID>```\n\n\n- **Provider_ID**: Leave empty to include all, or use codes like `NFX` (Netflix), `ATP`, `DNP`, `PRV`, etc.\n- **Count**: Number of items to fetch.\n- **Type**: Use `MOVIE` or `SHOW`.\n- **Plex_Collection_ID**: The collection ID in Plex.\n\n---\n\n### Trakt.TV Webhook Format\n\n```http://192.168.1.237:5678/webhook/<Node_GUID>/<Trakt_Username>/<Trakt_List_Name>/<Count>/<Type>/<Plex_Collection_ID>```\n\n- **Trakt_Username**: Your Trakt.tv username.\n- **Trakt_List_Name**: The list name, e.g., `watchlist`, `favorites`, or a custom list.\n- **Count**: Number of items to fetch.\n- **Type**: Use `MOVIE` or `SHOW`.\n- **Plex_Collection_ID**: The collection ID in Plex.\n\n---\n\n### *Arrs Settings\n\nIn your *Arrs application (e.g., Radarr or Sonarr):\n\n- Add tags: `dummy`, `dummy-unprocessed`\n- **Disable** \"search on add\"\n- Set **monitor** to `none`\n"
      },
      "typeVersion": 1
    },
    {
      "id": "21f623a7-2cb7-47bf-ba01-71e511b05159",
      "name": "Merge1",
      "type": "n8n-nodes-base.merge",
      "position": [
        1440,
        368
      ],
      "parameters": {
        "mode": "chooseBranch",
        "useDataOfInput": 2
      },
      "typeVersion": 3.2
    },
    {
      "id": "6580c82a-1c1c-468d-9c6d-c57698ea4c8e",
      "name": "Code",
      "type": "n8n-nodes-base.code",
      "position": [
        3984,
        576
      ],
      "parameters": {
        "jsCode": "//const items = $('When Executed by Another Workflow create Plex collection').first().json.data\n\n//return items.map(item => ({ json: item }));\n\nconst items = $('Set fields for collection').first().json.data;\n\nreturn items.reverse().map(item => ({ json: item }));\n"
      },
      "typeVersion": 2
    },
    {
      "id": "3b563589-1a7e-4b45-9901-4e2a3d243b08",
      "name": "Merge",
      "type": "n8n-nodes-base.merge",
      "position": [
        5440,
        576
      ],
      "parameters": {
        "mode": "chooseBranch",
        "useDataOfInput": 2
      },
      "typeVersion": 3.2
    },
    {
      "id": "cec8d612-b961-4139-aa4d-7e22ff3e6fde",
      "name": "Merge2",
      "type": "n8n-nodes-base.merge",
      "position": [
        5888,
        576
      ],
      "parameters": {
        "mode": "chooseBranch",
        "useDataOfInput": 2
      },
      "typeVersion": 3.2
    },
    {
      "id": "9c5987df-1c2e-4c72-84a8-0d35714700b1",
      "name": "Create dummy file for movie",
      "type": "n8n-nodes-base.ssh",
      "position": [
        -832,
        1664
      ],
      "parameters": {
        "command": "=mkdir -p \"{{ $('Radarr movie').item.json.path }}\"\n\n//docker run --rm \\\n//  -v /mnt/user/Media/Plex:/mnt/user/Media/Plex \\\n//  akashisn/ffmpeg:7.0.2 \\\n//  -ss 0 -i \"/mnt/user/Media/Plex/Placeholdarr/dummy-file.mp4\" \\\n//  -t {{ Math.min($('Radarr movie').item.json.runtime * 60, 14400) }} -c //copy \"{{ $('Radarr movie').item.json.path }}/dummy.mp4\"\n\n\nffmpeg -ss 0 -i \"/mnt/user/Media/Plex/Placeholdarr/dummy-file.mp4\" \\\n  -t {{ Math.min($('Radarr movie').item.json.runtime * 60, 14400) }} -c copy \"{{ $('Radarr movie').item.json.path }}/dummy.mp4\"\n\nchmod -R 777 \"{{ $('Radarr movie').item.json.path }}\"\nchown -R nobody:users \"{{ $('Radarr movie').item.json.path }}\""
      },
      "credentials": {
        "sshPassword": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "d0df6640-6aaa-413b-8873-49bf532f93ce",
      "name": "Get Overseerr users",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        640,
        2208
      ],
      "parameters": {
        "url": "http://0.0.0.0:5055/api/v1/user",
        "options": {},
        "sendQuery": true,
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "queryParameters": {
          "parameters": [
            {
              "name": "take",
              "value": "1000"
            }
          ]
        }
      },
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "969c7ef1-03d2-4507-8a23-2202e7d04d96",
      "name": "Filter Overseerr user",
      "type": "n8n-nodes-base.code",
      "position": [
        848,
        2208
      ],
      "parameters": {
        "jsCode": "const searchEmail = $('Webhook Tautulli').first().json.body.user_email;\nconst users = $json[\"results\"] || [];\nconst match = users.find(u => u.email.toLowerCase() === searchEmail.toLowerCase());\nif (match) {\n  return [{ json: match }];\n} else {\n  return [];\n}\n"
      },
      "typeVersion": 2
    },
    {
      "id": "d3a3fdf7-60e4-4caf-b141-aae32159c8c6",
      "name": "Check if Overseerr user is found",
      "type": "n8n-nodes-base.if",
      "position": [
        1088,
        2208
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "5a828786-9372-421f-97c8-16dda5fc3a02",
              "operator": {
                "type": "number",
                "operation": "notEmpty",
                "singleValue": true
              },
              "leftValue": "={{ $json.id }}",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "81f50586-3ac4-44b6-814d-10c5b057140d",
      "name": "Make Overseerr request",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2032,
        2176
      ],
      "parameters": {
        "url": "http://0.0.0.0:5055/api/v1/request",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n  \"mediaType\": \"{{ $('Webhook Tautulli').item.json.body.media.type === 'movie' ? 'movie' : 'tv' }}\",\n  \"mediaId\": {{ $('Webhook Tautulli').item.json.body.media.ids.tmdb }},\n  \"tvdbId\": {{ $('Webhook Tautulli').item.json.body.media.ids.tvdb }},\n  \"seasons\": [\n  ],\n  \"userId\": {{ $('Filter Overseerr user').item.json.id }}\n}",
        "sendBody": true,
        "specifyBody": "json",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth"
      },
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "e31c803c-65d1-4d1e-859e-12421c56b125",
      "name": "Get last 20 Overseerr requests from user",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1344,
        2192
      ],
      "parameters": {
        "url": "http://0.0.0.0:5055/api/v1/request",
        "options": {},
        "sendQuery": true,
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "queryParameters": {
          "parameters": [
            {
              "name": "requestedBy",
              "value": "={{ $json.id }}"
            },
            {
              "name": "take",
              "value": "20"
            },
            {
              "name": "sort",
              "value": "added"
            }
          ]
        }
      },
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "c8c13788-8731-4a40-a806-844a14794030",
      "name": "Check if request already exists",
      "type": "n8n-nodes-base.code",
      "position": [
        1552,
        2192
      ],
      "parameters": {
        "jsCode": "const targetTmdbId = $('Webhook Tautulli').first().json.body.media.ids.tmdb;\nconst targetTvdbId = $('Webhook Tautulli').first().json.body.media.ids.tvdb;\n\nconst requests = $json.results || [];\n\nconst match = requests.find(r => {\n  const media = r.media || {};\n\n  const tmdb = media.tmdbId;\n  const tvdb = media.tvdbId;\n\n  // Altijd als string vergelijken om typeverschillen te voorkomen\n  const tmdbHit = tmdb != null && String(tmdb) === String(targetTmdbId);\n  const tvdbHit = tvdb != null && String(tvdb) === String(targetTvdbId);\n\n  return tmdbHit || tvdbHit;\n});\n\nif (match) {\n  return [{ json: match }];\n}\n\nreturn [];"
      },
      "typeVersion": 2,
      "alwaysOutputData": true
    },
    {
      "id": "6853798e-5cc7-4d80-bc38-bb964e84f119",
      "name": "Check if no existing request for media exist for Overseerr user",
      "type": "n8n-nodes-base.if",
      "position": [
        1760,
        2192
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "4cc89c3b-5e22-441a-8784-fc1980d11f41",
              "operator": {
                "type": "object",
                "operation": "empty",
                "singleValue": true
              },
              "leftValue": "={{ $json }}",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "db815a78-9775-475c-a118-6ce8340509e3",
      "name": "Terminate Tautulli sessions for dummy",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1552,
        992
      ],
      "parameters": {
        "url": "http://0.0.0.0:8181/api/v2",
        "options": {},
        "sendQuery": true,
        "authentication": "genericCredentialType",
        "genericAuthType": "httpQueryAuth",
        "queryParameters": {
          "parameters": [
            {
              "name": "cmd",
              "value": "terminate_session"
            },
            {
              "name": "session_key",
              "value": "={{ $json.session_key }}"
            },
            {
              "name": "message",
              "value": "De film of serie is beschikbaar om te kijken."
            }
          ]
        }
      },
      "credentials": {
        "httpQueryAuth": {
          "name": "<your credential>"
        },
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "54f60bf2-07f1-4293-a310-9b5109f10b6f",
      "name": "Get all active sessions for file",
      "type": "n8n-nodes-base.code",
      "position": [
        1312,
        1008
      ],
      "parameters": {
        "jsCode": "const targetFile = $('Webhook Arrs Dummy file update').first().json.body.deletedFiles[0].path;\n\n// Haal de JSON op van de vorige stap\nconst data = items[0].json; // in n8n is dit meestal de response al als object\n\n// Als jouw HTTP Request node een string geeft, gebruik dan:\n// const data = JSON.parse(items[0].json);\n\n// Pak de sessies array\nconst sessions = data?.response?.data?.sessions || [];\nconsole.log(sessions)\n\n// Filter de sessies\nconst matching = sessions.filter(s => s.file === targetFile);\n\n// n8n wil dat je een array van items teruggeeft\nreturn matching.map(s => ({ json: s }));"
      },
      "typeVersion": 2
    },
    {
      "id": "c8cc229c-a522-4178-b59c-b819bb4308a5",
      "name": "Monitor all seasons1",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1200,
        1264
      ],
      "parameters": {
        "url": "=http://192.168.1.237:8989/api/v3/seasonPass",
        "method": "POST",
        "options": {},
        "jsonBody": "={\"series\":[{\"id\":{{ $('Webhook Arrs Dummy file update').item.json.body.series.id }}}],\"monitoringOptions\":{\"monitor\":\"all\", \"monitorNewItems\": \"all\"}}",
        "sendBody": true,
        "specifyBody": "json",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth"
      },
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      },
      "notesInFlow": false,
      "retryOnFail": false,
      "typeVersion": 4.2,
      "alwaysOu

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

How this works

This workflow automatically generates dummy media files for every new film or series added to Radarr or Sonarr, allowing Plex to index them immediately while the real downloads complete. It listens for webhook events from the *Arrs, queries JustWatch for accurate metadata, and then uses SSH to place the placeholder files in the correct library locations. Users with large or slow-torrent setups gain the ability to browse and organise their libraries without waiting for full downloads to finish.

Use it when you need instant library visibility after adding titles, especially if your download queue regularly exceeds a few hours. Avoid it if you prefer to keep only completed files in your storage or if you rely on strict folder naming enforced by the *Arrs themselves. A common variation replaces the dummy-file creation with a simple notification step for users who only want metadata updates.

About this workflow

This flow creates dummy files for every item added in your *Arrs (Radarr/Sonarr) with the tag .

Source: https://n8n.io/workflows/6980/ — original creator credit. Request a take-down →

More Web Scraping workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

Web Scraping

The Docker NextCloud WHMCS module leverages a sophisticated workflow for n8n, designed to automate the comprehensive deployment, configuration, and management processes for NextCloud and NextCloud Off

HTTP Request, Ssh
Web Scraping

n8n_create_caal_tool. Uses ssh, httpRequest. Webhook trigger; 21 nodes.

Ssh, HTTP Request
Web Scraping

This n8n template provides enterprise-level version control for your workflows using GitHub integration. Stop losing hours to broken workflows and manual exports – get proper commit history, visual di

n8n, Execute Workflow Trigger, HTTP Request +1
Web Scraping

This workflow acts as a central API gateway for all technical indicator agents in the Binance Spot Market Quant AI system. It listens for incoming webhook requests and dynamically routes them to the c

HTTP Request
Web Scraping

Sign PDF documents with legally-compliant digital signatures using X.509 certificates. Supports multiple PAdES signature levels (B, T, LT, LTA) with optional visible stamps.

Execute Command, HTTP Request, Read Write File +1