{ "id": "xXUnt2hL2FKxzOhBnkd3Z", "name": "MAM Series Checker", "nodes": [ { "parameters": { "rule": { "interval": [ {} ] } }, "type": "n8n-nodes-base.scheduleTrigger", "typeVersion": 1.3, "position": [ -832, -16 ], "id": "279ca2c5-3c3e-4cd6-bc97-e43010fb693c", "name": "Schedule Trigger" }, { "parameters": { "options": {} }, "type": "n8n-nodes-base.splitInBatches", "typeVersion": 3, "position": [ -192, -16 ], "id": "2412dfa0-8362-4cc4-8a18-3f233d5338b2", "name": "Loop Over Items" }, { "parameters": { "method": "POST", "url": "https://www.myanonamouse.net/tor/js/loadSearchJSONbasic.php", "authentication": "genericCredentialType", "genericAuthType": "httpHeaderAuth", "sendBody": true, "specifyBody": "json", "jsonBody": "={\n \"tor\": {\n \"text\": \"{{ $json.series_name }} m4b\",\n \"srchIn\": [\n \"title\",\n \"author\",\n \"filenames\",\n \"fileTypes\"\n ],\n \"main_cat\": [\n \"13\"\n ],\n \"searchType\": \"all\",\n \"sortType\": \"seedersDesc\"\n }\n}", "options": {} }, "type": "n8n-nodes-base.httpRequest", "typeVersion": 4.3, "position": [ 48, 0 ], "id": "f387a918-881e-492c-b41a-1dc621e8e822", "name": "HTTP Request", "credentials": { "httpHeaderAuth": { "id": "G8eA8XeS9P5axwJd", "name": "mam cookie auth header" } } }, { "parameters": { "fieldsToAggregate": { "fieldToAggregate": [ { "fieldToAggregate": "book_name" } ] }, "options": {} }, "type": "n8n-nodes-base.aggregate", "typeVersion": 1, "position": [ 816, 0 ], "id": "019177aa-2c4f-4291-90f7-c58750033e77", "name": "Aggregate" }, { "parameters": { "promptType": "define", "text": "=You are a Librarian Agent tasked with reviewing potential new books that have been made available. Provide no commentary or additional information other than what is requested.\n\nWe are reviewing the series: {{ $('Loop Over Items').item.json.series_name }} by {{ $('Loop Over Items').item.json.author }}\n\nOur current library contains the following:\n{{ $json.book_name }}\n\nOur audiobook provider has the following avalible:\n{{ $('Aggregate Available Books').item.json.title }}\n\nProvide a json formatted list of books we are missing. If none, state \"No books missing\".", "batching": {} }, "type": "@n8n/n8n-nodes-langchain.chainLlm", "typeVersion": 1.9, "position": [ 976, 0 ], "id": "aef43627-3228-42ab-a2fe-9f4b50d1a855", "name": "Basic LLM Chain" }, { "parameters": { "fieldToSplitOut": "data", "options": { "destinationFieldName": "data" } }, "type": "n8n-nodes-base.splitOut", "typeVersion": 1, "position": [ 256, 0 ], "id": "a857682f-9e3d-4e87-8b06-699b9c8039c2", "name": "Split Out" }, { "parameters": { "model": { "__rl": true, "value": "gemini_cli/gemini-2.5-flash-lite", "mode": "list", "cachedResultName": "gemini_cli/gemini-2.5-flash-lite" }, "responsesApiEnabled": false, "options": {} }, "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi", "typeVersion": 1.3, "position": [ 976, 208 ], "id": "c4da46be-36bf-463e-bb4a-756ef57d24d5", "name": "OpenAI Chat Model", "credentials": { "openAiApi": { "id": "sxSUdecXdMfKPuTu", "name": "llm-proxy.ben.io" } } }, { "parameters": { "fieldsToAggregate": { "fieldToAggregate": [ { "fieldToAggregate": "data.title" } ] }, "options": {} }, "type": "n8n-nodes-base.aggregate", "typeVersion": 1, "position": [ 464, 0 ], "id": "d6f24deb-4863-41a7-a703-2c31e2363d45", "name": "Aggregate Available Books" }, { "parameters": { "operation": "select", "schema": { "__rl": true, "value": "public", "mode": "list", "cachedResultName": "public" }, "table": { "__rl": true, "value": "followed_series", "mode": "list", "cachedResultName": "followed_series" }, "returnAll": true, "options": {} }, "type": "n8n-nodes-base.postgres", "typeVersion": 2.6, "position": [ -624, -16 ], "id": "e7bc495c-a3e1-46b8-b0f1-ff49286344e7", "name": "Select Series", "credentials": { "postgres": { "id": "9grzZwW7Br6SzdV8", "name": "n8n-media" } } }, { "parameters": { "operation": "select", "schema": { "__rl": true, "mode": "list", "value": "public" }, "table": { "__rl": true, "value": "smb_general_books", "mode": "list", "cachedResultName": "smb_general_books" }, "returnAll": true, "where": { "values": [ { "column": "series_name", "value": "={{ $('Loop Over Items').item.json.series_name }}" } ] }, "options": {} }, "type": "n8n-nodes-base.postgres", "typeVersion": 2.6, "position": [ 656, 0 ], "id": "62be829f-6d74-4142-9420-eb4f6947df09", "name": "Select Book Titles", "executeOnce": true, "credentials": { "postgres": { "id": "9grzZwW7Br6SzdV8", "name": "n8n-media" } } } ], "connections": { "Schedule Trigger": { "main": [ [ { "node": "Select Series", "type": "main", "index": 0 } ] ] }, "Loop Over Items": { "main": [ [], [ { "node": "HTTP Request", "type": "main", "index": 0 } ] ] }, "HTTP Request": { "main": [ [ { "node": "Split Out", "type": "main", "index": 0 } ] ] }, "Aggregate": { "main": [ [ { "node": "Basic LLM Chain", "type": "main", "index": 0 } ] ] }, "Split Out": { "main": [ [ { "node": "Aggregate Available Books", "type": "main", "index": 0 } ] ] }, "OpenAI Chat Model": { "ai_languageModel": [ [ { "node": "Basic LLM Chain", "type": "ai_languageModel", "index": 0 } ] ] }, "Aggregate Available Books": { "main": [ [ { "node": "Select Book Titles", "type": "main", "index": 0 } ] ] }, "Select Series": { "main": [ [ { "node": "Loop Over Items", "type": "main", "index": 0 } ] ] }, "Select Book Titles": { "main": [ [ { "node": "Aggregate", "type": "main", "index": 0 } ] ] }, "Basic LLM Chain": { "main": [ [] ] } }, "settings": { "executionOrder": "v1", "availableInMCP": false }, "triggerCount": 0, "versionId": "b179028c-8bde-4e62-8183-1464046a348b", "owner": { "type": "personal", "projectId": "FeLO36wNUAcn61Wj", "projectName": "Ben W ", "personalEmail": "admin@ben.io" }, "parentFolderId": "6tDyZCwqELStb6Ik", "isArchived": false }