Files
n8n-backup-v2/workflows/cPWZKfrHOUSUZjIp.json
2026-02-05 21:59:40 +00:00

1271 lines
38 KiB
JSON

{
"id": "cPWZKfrHOUSUZjIp",
"name": "MAM General Series List",
"nodes": [
{
"parameters": {},
"id": "workflow-trigger",
"name": "Workflow Trigger",
"position": [
48,
640
],
"type": "n8n-nodes-base.executeWorkflowTrigger",
"typeVersion": 1
},
{
"parameters": {
"authentication": "privateKey",
"command": "find /mnt/nas/audiobooks/Main -mindepth 2 -maxdepth 2 -type d"
},
"id": "ssh-list-general",
"name": "List General Folders",
"position": [
272,
544
],
"type": "n8n-nodes-base.ssh",
"typeVersion": 1,
"credentials": {
"sshPrivateKey": {
"id": "vOzhicmbOwx1XDF8",
"name": "seed-0.local.ben.io"
}
}
},
{
"parameters": {
"jsCode": "const output = $input.item.json.stdout || \"\";\nconst lines = output.split(String.fromCharCode(10)).filter(l => l.trim());\nreturn lines.map(l => ({\n json: {\n smb_path: l.trim(),\n folder_name: l.split('/').pop()\n }\n}));"
},
"id": "code-parse",
"name": "Code",
"position": [
496,
448
],
"type": "n8n-nodes-base.code",
"typeVersion": 2
},
{
"parameters": {
"promptType": "define",
"text": "=### ROLE\nYou are an expert Data Extraction Specialist for a General Audiobook library. You are \"blind\" to the book's details and MUST use the provided tools to discover metadata.\n\n### INPUT DATA\n- **Folder Name:** {{ $json.folder_name }}\n- **SMB Path:** {{ $json.smb_path }}\n\n### ⚠️ CRITICAL PRE-FLIGHT PROTOCOL (EXECUTE FIRST)\n**Before attempting ANY search or strategy, you must perform this check:**\n\n**CONDITION:** Does the `folder_name` contain a string starting with `B0` followed by alphanumeric characters (e.g., `[B079YYJK47]`, `_B00U7H2N5A_`)?\n\n**IF YES (ASIN FOUND):**\n1. **EXTRACT** the ASIN string immediately.\n2. **STOP** all other reasoning. Do not plan a search. Do not clean the title.\n3. **ACTION:** Call `audible_lookup_asin` with the extracted ASIN.\n4. **END** the turn. (Do not call Google/Brave if you have an ASIN).\n\n**IF NO (NO ASIN FOUND):**\n - Proceed to the \"Funnel Search Strategy\" below.\n\n### SEARCH STRATEGY: THE \"FUNNEL METHOD\" (Broad -> Specific)\nYou are dealing with \"noisy\" folder names (e.g., \"Mission Pack 2\", \"Omnibus\", typos). **A hyper-specific search for a messy string will fail.** You must start broad to find the correct terminology, then narrow down.\n\n**Step 1: BROAD DISCOVERY (The Anchor)**\n- **Rule:** If the Folder Name contains complex phrasing (like \"Collection\", \"Set\", \"Pack\") or you are unsure of the Series Name, **DO NOT** search for the full folder string.\n- **Action:** Search for the **Author** (from `smb_path`) and the **Series Name** only.\n- **Query Template:** `site:audible.com \"<Author Name>\" \"<Series Name>\" series list`\n- **Goal:** Find the *Official Audible Series Name* and how they number their books (e.g., does \"Mission Pack 2\" correspond to \"Books 5-8\"?).\n\n**Step 2: NARROW TARGETING (The Strike)**\n- **Action:** Use the *Verified Information* from Step 1 to construct a precise query.\n- **Query Template:** `site:audible.com \"<Official Series Name>\" \"<Correct Volume/Book Title>\" audiobook`\n- **Logic:** Now that you know the official name, you can find the specific ASIN.\n\n**Step 3: FALLBACK (The \"Hail Mary\")**\n- **Condition:** If Step 1 & 2 fail.\n- **Action:** Search for the Author's bibliography to manually match the folder content to a published work.\n- **Query:** `\"<Author Name>\" complete bibliography audiobooks`\n\n3. **Verify:**\n - **Author Match:** Does the tool result match the **Author folder** found in the `smb_path`? (Crucial for generic titles).\n - **Series Logic:** If the book is part of a series, ensure the volume number matches the folder name (e.g., \"Book 3\").\n\n4. **Finalize:**\n Construct the JSON output using strictly the data returned by the tools.\n\n### JSON TEMPLATE\n{\n \"title\": \"<TOOL_RESULT_TITLE>\",\n \"series\": \"<TOOL_RESULT_SERIES_NAME>\",\n \"volume_num\": \"<TOOL_RESULT_SERIES_NUMBER>\",\n \"asin\": \"<TOOL_RESULT_ASIN>\",\n \"author\": \"<TOOL_RESULT_AUTHOR>\",\n \"smb_path\": \" {{ $json.smb_path }} \",\n \"folder_name\": \" {{ $json.folder_name }} \",\n \"identified\": true,\n \"failure_reason\": null\n}",
"hasOutputParser": true,
"options": {
"systemMessage": "You are a helpful assistant",
"maxIterations": 10,
"returnIntermediateSteps": false,
"enableStreaming": true
}
},
"type": "@n8n/n8n-nodes-langchain.agent",
"typeVersion": 3,
"position": [
1648,
368
],
"id": "409e6caa-c009-4b43-9170-e8c3251ef003",
"name": "Lookup Agent",
"retryOnFail": true,
"onError": "continueErrorOutput"
},
{
"parameters": {
"query": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Query', ``, 'string') }}",
"options": {
"topic": "general",
"search_depth": "basic",
"max_results": 3,
"include_domains": [
"audible.com"
]
}
},
"type": "@tavily/n8n-nodes-tavily.tavilyTool",
"typeVersion": 1,
"position": [
1776,
592
],
"id": "b7ce39bf-87d5-4af4-bcf2-2b58381f1956",
"name": "tavily_search",
"credentials": {
"tavilyApi": {
"id": "y1IVnGq2Wiqy3HBf",
"name": "Tavily account"
}
}
},
{
"parameters": {
"operation": "upsert",
"schema": {
"__rl": true,
"mode": "list",
"value": "public"
},
"table": {
"__rl": true,
"value": "smb_general_books",
"mode": "list",
"cachedResultName": "smb_general_books"
},
"columns": {
"mappingMode": "defineBelow",
"value": {
"identified": "={{ $('Merge').item.json.output.identified }}",
"needs_review": false,
"volume_num": "={{ $('Merge').item.json.output.volume_num }}",
"smb_path": "={{ $('Merge').item.json.output.smb_path }}",
"book_folder": "={{ $('Merge').item.json.output.folder_name }}",
"author_folder": "={{ $('Merge').item.json.output.author }}",
"book_name": "={{ $('Merge').item.json.output.title }}",
"series_name": "={{ $('Merge').item.json.output.series }}",
"audible_asin": "={{ $('Merge').item.json.output.asin }}",
"failure_reason": "={{ $('Merge').item.json.output.failure_reason }}",
"category": "general",
"followed_series_id": "={{ $('Call MAM Series Matcher').item.json.series_id }}"
},
"matchingColumns": [
"smb_path"
],
"schema": [
{
"id": "id",
"displayName": "id",
"required": false,
"defaultMatch": true,
"display": true,
"type": "string",
"canBeUsedToMatch": true,
"removed": false
},
{
"id": "smb_path",
"displayName": "smb_path",
"required": true,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true,
"removed": false
},
{
"id": "book_folder",
"displayName": "book_folder",
"required": true,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": false
},
{
"id": "author_folder",
"displayName": "author_folder",
"required": true,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": false
},
{
"id": "book_name",
"displayName": "book_name",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": false
},
{
"id": "series_name",
"displayName": "series_name",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": false
},
{
"id": "audible_asin",
"displayName": "audible_asin",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": false
},
{
"id": "identified",
"displayName": "identified",
"required": false,
"defaultMatch": false,
"display": true,
"type": "boolean",
"canBeUsedToMatch": false
},
{
"id": "needs_review",
"displayName": "needs_review",
"required": false,
"defaultMatch": false,
"display": true,
"type": "boolean",
"canBeUsedToMatch": false
},
{
"id": "retry_stage",
"displayName": "retry_stage",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": false
},
{
"id": "failure_reason",
"displayName": "failure_reason",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": false
},
{
"id": "category",
"displayName": "category",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": false
},
{
"id": "volume_num",
"displayName": "volume_num",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": false
},
{
"id": "created_at",
"displayName": "created_at",
"required": false,
"defaultMatch": false,
"display": true,
"type": "dateTime",
"canBeUsedToMatch": false
},
{
"id": "updated_at",
"displayName": "updated_at",
"required": false,
"defaultMatch": false,
"display": true,
"type": "dateTime",
"canBeUsedToMatch": false
},
{
"id": "followed_series_id",
"displayName": "followed_series_id",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": false,
"removed": false
}
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {}
},
"type": "n8n-nodes-base.postgres",
"typeVersion": 2.6,
"position": [
3200,
480
],
"id": "a85dde4b-2471-4ced-8e3c-f999a6297895",
"name": "Insert or update rows in a table",
"credentials": {
"postgres": {
"id": "9grzZwW7Br6SzdV8",
"name": "n8n-media"
}
},
"onError": "continueErrorOutput"
},
{
"parameters": {
"options": {
"reset": false
}
},
"type": "n8n-nodes-base.splitInBatches",
"typeVersion": 3,
"position": [
1168,
544
],
"id": "3e1127d2-a059-475c-a90e-9cf2dc3a8d46",
"name": "Loop Over Items"
},
{
"parameters": {
"toolDescription": "google_search accepts title and author and returns the first page of google search results.",
"method": "POST",
"url": "https://google.serper.dev/search",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "X-API-KEY",
"value": "dea8a4e00208f156de1253b4dc4d32f56a1d72bd"
}
]
},
"sendBody": true,
"bodyParameters": {
"parameters": [
{
"name": "q",
"value": "=site:audible.com \"/pd/\" {{ $fromAI('title') }} {{ $fromAI('author') }}"
}
]
},
"options": {}
},
"type": "n8n-nodes-base.httpRequestTool",
"typeVersion": 4.3,
"position": [
1904,
592
],
"id": "14c979cf-00b4-4f79-8b49-e3e1b6fe54da",
"name": "google_search"
},
{
"parameters": {
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 3
},
"conditions": [
{
"id": "559c9077-d96f-4577-8b1a-5c872d009265",
"leftValue": "={{ $json.folder_name }}",
"rightValue": "=.@__thumb",
"operator": {
"type": "string",
"operation": "notEquals"
}
},
{
"id": "e7ef444e-015b-466f-b196-a131996f9666",
"leftValue": "={{ $json.smb_path }}",
"rightValue": "Aptiv",
"operator": {
"type": "string",
"operation": "notContains"
}
}
],
"combinator": "and"
},
"options": {}
},
"type": "n8n-nodes-base.filter",
"typeVersion": 2.3,
"position": [
944,
544
],
"id": "8b666e89-b553-42a1-8d91-94fd5404760c",
"name": "Filter Unwanted",
"notesInFlow": true,
"notes": "- Filter non-book folders\n- Filter Aptiv workout audio"
},
{
"parameters": {
"mode": "combine",
"combineBy": "combineByPosition",
"options": {}
},
"type": "n8n-nodes-base.merge",
"typeVersion": 3.2,
"position": [
2400,
544
],
"id": "31313285-3e56-44d1-a79b-c65bd2206460",
"name": "Merge"
},
{
"parameters": {
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 3
},
"conditions": [
{
"id": "0b89f507-1f5c-446b-912c-f94d94320483",
"leftValue": "={{ $json.status }}",
"rightValue": "FAIL",
"operator": {
"type": "string",
"operation": "notEquals"
}
},
{
"id": "d308a2e3-28d8-4922-bfc0-4836a5adc612",
"leftValue": "={{ $('Merge').item.json.output.identified }}",
"rightValue": true,
"operator": {
"type": "boolean",
"operation": "equals"
}
}
],
"combinator": "and"
},
"options": {}
},
"type": "n8n-nodes-base.if",
"typeVersion": 2.3,
"position": [
2976,
544
],
"id": "d0d29d9a-606e-41d4-a8e9-867f51469f1e",
"name": "verified"
},
{
"parameters": {},
"type": "n8n-nodes-base.noOp",
"typeVersion": 1,
"position": [
3424,
720
],
"id": "618a5f45-e4d2-4ba3-a61a-858b7025ab85",
"name": "Formatting"
},
{
"parameters": {
"schemaType": "manual",
"inputSchema": "{\n \"type\": \"object\",\n \"properties\": {\n \"title\": { \"type\": \"string\" },\n \"series\": { \"type\": [\"string\", \"null\"] },\n \"volume_num\": { \n \"type\": [\"string\", \"number\", \"null\"],\n \"description\": \"The volume number (can be string '3' or number 3)\" \n },\n \"asin\": { \"type\": [\"string\", \"null\"] },\n \"author\": { \"type\": \"string\" },\n \"smb_path\": { \n \"type\": \"string\",\n \"description\": \"Must being witn /mnt/nas\"\n },\n \"folder_name\": { \"type\": \"string\" },\n \"identified\": { \"type\": \"boolean\" },\n \"failure_reason\": { \n \"type\": [\"string\", \"null\"],\n \"description\": \"Reason for failure, or null if successful\" \n }\n },\n \"required\": [\n \"title\",\n \"series\",\n \"volume_num\",\n \"asin\",\n \"author\",\n \"smb_path\",\n \"folder_name\",\n \"identified\",\n \"failure_reason\"\n ]\n}",
"autoFix": true
},
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"typeVersion": 1.3,
"position": [
2032,
592
],
"id": "3baa52c0-8ce1-40fb-9b91-cfe6f869e9ae",
"name": "Structured Output Parser",
"retryOnFail": true,
"onError": "continueErrorOutput"
},
{
"parameters": {
"operation": "executeQuery",
"query": "SELECT smb_path FROM smb_general_books WHERE identified = true",
"additionalFields": {}
},
"id": "postgres-filter",
"name": "Fetch Existing",
"position": [
496,
640
],
"type": "n8n-nodes-base.postgres",
"typeVersion": 1,
"credentials": {
"postgres": {
"id": "9grzZwW7Br6SzdV8",
"name": "n8n-media"
}
}
},
{
"parameters": {
"mode": "combine",
"fieldsToMatchString": "smb_path",
"joinMode": "keepNonMatches",
"outputDataFrom": "input1",
"options": {}
},
"id": "merge-check",
"name": "Filter Existing",
"position": [
720,
544
],
"type": "n8n-nodes-base.merge",
"typeVersion": 3.2
},
{
"parameters": {
"rule": {
"interval": [
{}
]
}
},
"type": "n8n-nodes-base.scheduleTrigger",
"typeVersion": 1.3,
"position": [
48,
448
],
"id": "f411d807-43c9-459b-a0bb-1c079a4d8666",
"name": "Schedule Trigger"
},
{
"parameters": {
"sendTo": "me@ben.io",
"subject": "General Series List Update",
"message": "=This is an update that your Anime Audiobook Library, we've identified the following new books:\n\n{{ $json.email_summary }}\n\n",
"options": {
"appendAttribution": true,
"senderName": "n8n Anime Series List"
}
},
"type": "n8n-nodes-base.gmail",
"typeVersion": 2.2,
"position": [
1776,
192
],
"id": "383ff376-cec7-4cde-a9a6-265cee6db626",
"name": "Send a message",
"webhookId": "d5463123-d50d-4eab-86c9-f71d18587d54",
"credentials": {
"gmailOAuth2": {
"id": "VHbUFo39yKkrSroG",
"name": "ben.io-gmail"
}
}
},
{
"parameters": {
"jsCode": "// Get all items from the previous node\nconst items = $input.all();\n\n// Create an HTML list of the books\nconst bookList = items.map(item => {\n return `<li><strong>${item.json.book_name}</strong> by ${item.json.author_folder}</li>`;\n}).join('');\n\n// Return an ARRAY containing the single summary item\nreturn [{\n json: {\n email_summary: `<ul>${bookList}</ul>`,\n count: items.length\n }\n}];"
},
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
1600,
192
],
"id": "b77eac76-096e-40d6-907e-cc861acca2dd",
"name": "Code in JavaScript"
},
{
"parameters": {
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 3
},
"conditions": [
{
"id": "c7daf60b-1af4-4764-a657-a1d66d30e1ee",
"leftValue": "={{ $json.series_name }}",
"rightValue": "PASS",
"operator": {
"type": "string",
"operation": "exists",
"singleValue": true
}
}
],
"combinator": "and"
},
"options": {}
},
"type": "n8n-nodes-base.if",
"typeVersion": 2.3,
"position": [
1376,
416
],
"id": "e357ecd8-c8e7-48e0-9505-7044f883dc14",
"name": "If"
},
{
"parameters": {
"promptType": "define",
"text": "=### ROLE\nYou are a Quality Assurance Auditor for a library database. Your job is to compare a \"Source Folder\" against a \"Candidate Metadata\" JSON object and REJECT any match that is not strictly accurate.\n\n### INPUTS\n1. **Source Folder:** {{ $json.folder_name }}\n2. **Source Path:** {{ $json.smb_path }}\n3. **Candidate Metadata:**\n{{ JSON.stringify($json.output) }}\n\n### VALIDATION RULES (Pass/Fail Criteria)\nYou must evaluate the Candidate Metadata against the Source Folder on these specific points. If ANY point fails, the entire validation fails.\n\n1. **Title Alignment:**\n - Does the candidate title conceptually match the folder text?\n - *Example Fail:* Folder is \"Harry Potter 1\", Candidate is \"Lord of the Rings\".\n - *Allow:* Slight variations (e.g., \"Project Hail Mary\" vs \"Project Hail Mary: A Novel\").\n\n2. **Author Alignment:**\n - Does the candidate author name match the folder text?\n - *Allow:* Additive information, (e.g one author listed, a second author added while first is still kept.)\n - *Example Fail:* Folder is \"King, Stephen\", Candidate is \"Koontz, Dean\".\n - *Example Fail:*: John Doe is never an acceptable author.\n\n3. **Volume/Series Logic (Conflict Check ONLY):**\n - **Enrichment is Allowed:** If the folder does NOT mention a series or volume, but the Candidate DOES, this is ACCEPTABLE. Do not fail.\n - **Contradiction Check:** Only fail if the folder *explicitly* lists a number that conflicts with the Candidate.\n - *Example FAIL:* Folder says \"Book 4\", Candidate says \"volume_num: 1\".\n - *Example PASS:* Folder says \"Star Wars\", Candidate says \"Series: Star Wars, Vol: 1\". (Enrichment).\n\n4. **ASIN Presence:**\n - ASIN MUST exist in our canidate metadata or validation has failed. \n\n5. **No Failures Reported:**\n - If failures are reported, consider the attempt a failure and fail. Include the failure in your reason.\n\n### OUTPUT FORMAT\nOutput a single JSON object. Do not output markdown or text.\n\n{\n \"status\": \"PASS\" | \"FAIL\",\n \"reason\": \"Brief explanation of why it failed (or 'Verified' if passed)\",\n}",
"batching": {}
},
"type": "@n8n/n8n-nodes-langchain.chainLlm",
"typeVersion": 1.7,
"position": [
2624,
544
],
"id": "273ae694-f28a-456c-ad24-0dcd4e64e710",
"name": "QA Agent"
},
{
"parameters": {
"model": {
"__rl": true,
"value": "openai/gpt-oss-120b",
"mode": "list",
"cachedResultName": "openai/gpt-oss-120b"
},
"responsesApiEnabled": false,
"options": {
"responseFormat": "json_object",
"temperature": 0
}
},
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"typeVersion": 1.3,
"position": [
2176,
768
],
"id": "8198be70-fcae-44f1-8643-a6b97d7a33b0",
"name": "gpt-oss:120b - Validator",
"credentials": {
"openAiApi": {
"id": "QRBx9RMx4KoFwGgl",
"name": "Nvidia account"
}
}
},
{
"parameters": {
"description": "Call this tool to lookup an ASIN from Audible.",
"workflowId": {
"__rl": true,
"value": "Z_YHsJaf_pyFQR6e7VuLo",
"mode": "list",
"cachedResultUrl": "/workflow/Z_YHsJaf_pyFQR6e7VuLo",
"cachedResultName": "search_audible"
},
"workflowInputs": {
"mappingMode": "defineBelow",
"value": {
"asin": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('asin', ``, 'string') }}"
},
"matchingColumns": [],
"schema": [
{
"id": "book-name",
"displayName": "book-name",
"required": false,
"defaultMatch": false,
"display": true,
"canBeUsedToMatch": true,
"type": "string",
"removed": true
},
{
"id": "author",
"displayName": "author",
"required": false,
"defaultMatch": false,
"display": true,
"canBeUsedToMatch": true,
"type": "string",
"removed": true
},
{
"id": "asin",
"displayName": "asin",
"required": false,
"defaultMatch": false,
"display": true,
"canBeUsedToMatch": true,
"type": "string",
"removed": false
}
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
}
},
"type": "@n8n/n8n-nodes-langchain.toolWorkflow",
"typeVersion": 2.2,
"position": [
1488,
624
],
"id": "78150d6a-0c28-46e5-ba55-953b063b6872",
"name": "audible_lookup_asin"
},
{
"parameters": {
"description": "Call this tool to lookup an Author and Book Name from Audible.",
"workflowId": {
"__rl": true,
"value": "Z_YHsJaf_pyFQR6e7VuLo",
"mode": "list",
"cachedResultUrl": "/workflow/Z_YHsJaf_pyFQR6e7VuLo",
"cachedResultName": "search_audible"
},
"workflowInputs": {
"mappingMode": "defineBelow",
"value": {
"book-name": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('book-name', ``, 'string') }}",
"author": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('author', ``, 'string') }}"
},
"matchingColumns": [],
"schema": [
{
"id": "book-name",
"displayName": "book-name",
"required": false,
"defaultMatch": false,
"display": true,
"canBeUsedToMatch": true,
"type": "string",
"removed": false
},
{
"id": "author",
"displayName": "author",
"required": false,
"defaultMatch": false,
"display": true,
"canBeUsedToMatch": true,
"type": "string",
"removed": false
},
{
"id": "asin",
"displayName": "asin",
"required": false,
"defaultMatch": false,
"display": true,
"canBeUsedToMatch": true,
"type": "string",
"removed": true
}
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
}
},
"type": "@n8n/n8n-nodes-langchain.toolWorkflow",
"typeVersion": 2.2,
"position": [
1616,
592
],
"id": "a41d0ed6-78a1-401b-9dcb-74f533dedb51",
"name": "audible_search_book"
},
{
"parameters": {
"description": "Call this tool to retrieve a list of the top brave search results.",
"workflowId": {
"__rl": true,
"value": "VUwFjFF2UhNout2T",
"mode": "list",
"cachedResultUrl": "/workflow/VUwFjFF2UhNout2T",
"cachedResultName": "tool_brave_search"
},
"workflowInputs": {
"mappingMode": "defineBelow",
"value": {
"query": "=site:audible.com {{ $fromAI('query') }}"
},
"matchingColumns": [
"query"
],
"schema": [
{
"id": "query",
"displayName": "query",
"required": false,
"defaultMatch": false,
"display": true,
"canBeUsedToMatch": true,
"type": "string",
"removed": false
}
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
}
},
"type": "@n8n/n8n-nodes-langchain.toolWorkflow",
"typeVersion": 2.2,
"position": [
1888,
752
],
"id": "943011b5-1af5-45f9-8146-fcf5069e2fa5",
"name": "brave_search"
},
{
"parameters": {},
"type": "@n8n/n8n-nodes-langchain.toolWikipedia",
"typeVersion": 1,
"position": [
1760,
752
],
"id": "c31ac1dc-4653-4d01-98dc-0b20f83f7c01",
"name": "Wikipedia"
},
{
"parameters": {
"content": "## README\n** MAM General Series List Overview**\nThis workflow lists out all books in the Main (general audiobooks) folder on our NAS. It then checks our neo.db inventory database of books. When new books are found, we search and clean the book name, author, series information and ASIN for insertion into our audiobook inventory database.",
"height": 320,
"width": 480
},
"type": "n8n-nodes-base.stickyNote",
"typeVersion": 1,
"position": [
-48,
112
],
"id": "83bb9595-37ee-47ee-a3b2-ab034cc75333",
"name": "Sticky Note"
},
{
"parameters": {
"model": {
"__rl": true,
"value": "openai/gpt-oss-120b",
"mode": "list",
"cachedResultName": "openai/gpt-oss-120b"
},
"responsesApiEnabled": false,
"options": {}
},
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"typeVersion": 1.3,
"position": [
1632,
736
],
"id": "c69843d8-49d9-43c7-8de9-f67918c87e12",
"name": "gpt/oss-120b",
"credentials": {
"openAiApi": {
"id": "QRBx9RMx4KoFwGgl",
"name": "Nvidia account"
}
}
},
{
"parameters": {
"model": {
"__rl": true,
"value": "antigravity/gemini-3-flash",
"mode": "list",
"cachedResultName": "antigravity/gemini-3-flash"
},
"responsesApiEnabled": false,
"options": {}
},
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"typeVersion": 1.3,
"position": [
1376,
736
],
"id": "ae56277d-f35d-4ece-b6b5-7981e649f242",
"name": "OpenAI Chat Model",
"credentials": {
"openAiApi": {
"id": "sxSUdecXdMfKPuTu",
"name": "llm-proxy.ben.io"
}
}
},
{
"parameters": {
"workflowId": {
"__rl": true,
"value": "WkAdUd9jXTtPagGO",
"mode": "list",
"cachedResultUrl": "/workflow/WkAdUd9jXTtPagGO",
"cachedResultName": "MAM Series Matcher"
},
"workflowInputs": {
"mappingMode": "defineBelow",
"value": {},
"matchingColumns": [],
"schema": [],
"attemptToConvertTypes": false,
"convertFieldsToString": true
},
"options": {
"waitForSubWorkflow": true
}
},
"type": "n8n-nodes-base.executeWorkflow",
"typeVersion": 1.3,
"position": [
2112,
352
],
"id": "5e966fb1-22e6-405c-b2cb-14cc7ae53cb1",
"name": "Call 'MAM Series Matcher'"
}
],
"connections": {
"Code": {
"main": [
[
{
"index": 0,
"node": "Filter Existing",
"type": "main"
}
]
]
},
"List General Folders": {
"main": [
[
{
"index": 0,
"node": "Code",
"type": "main"
},
{
"node": "Fetch Existing",
"type": "main",
"index": 0
}
]
]
},
"Workflow Trigger": {
"main": [
[
{
"index": 0,
"node": "List General Folders",
"type": "main"
}
]
]
},
"tavily_search": {
"ai_tool": [
[
{
"node": "Lookup Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Lookup Agent": {
"main": [
[
{
"node": "Call 'MAM Series Matcher'",
"type": "main",
"index": 0
}
]
]
},
"Loop Over Items": {
"main": [
[
{
"node": "If",
"type": "main",
"index": 0
}
],
[
{
"node": "Lookup Agent",
"type": "main",
"index": 0
},
{
"node": "Merge",
"type": "main",
"index": 1
}
]
]
},
"google_search": {
"ai_tool": [
[
{
"node": "Lookup Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Filter Unwanted": {
"main": [
[
{
"node": "Loop Over Items",
"type": "main",
"index": 0
}
]
]
},
"Merge": {
"main": [
[
{
"node": "QA Agent",
"type": "main",
"index": 0
}
]
]
},
"verified": {
"main": [
[
{
"node": "Insert or update rows in a table",
"type": "main",
"index": 0
}
],
[
{
"node": "Formatting",
"type": "main",
"index": 0
}
]
]
},
"Insert or update rows in a table": {
"main": [
[
{
"node": "Formatting",
"type": "main",
"index": 0
}
],
[
{
"node": "Formatting",
"type": "main",
"index": 0
}
]
]
},
"Formatting": {
"main": [
[
{
"node": "Loop Over Items",
"type": "main",
"index": 0
}
]
]
},
"Structured Output Parser": {
"ai_outputParser": [
[
{
"node": "Lookup Agent",
"type": "ai_outputParser",
"index": 0
}
]
]
},
"Fetch Existing": {
"main": [
[
{
"index": 1,
"node": "Filter Existing",
"type": "main"
}
]
]
},
"Filter Existing": {
"main": [
[
{
"node": "Filter Unwanted",
"type": "main",
"index": 0
}
]
]
},
"Schedule Trigger": {
"main": [
[
{
"node": "List General Folders",
"type": "main",
"index": 0
}
]
]
},
"Code in JavaScript": {
"main": [
[
{
"node": "Send a message",
"type": "main",
"index": 0
}
]
]
},
"If": {
"main": [
[
{
"node": "Code in JavaScript",
"type": "main",
"index": 0
}
]
]
},
"QA Agent": {
"main": [
[
{
"node": "verified",
"type": "main",
"index": 0
}
]
]
},
"gpt-oss:120b - Validator": {
"ai_languageModel": [
[
{
"node": "Structured Output Parser",
"type": "ai_languageModel",
"index": 0
},
{
"node": "QA Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"audible_lookup_asin": {
"ai_tool": [
[
{
"node": "Lookup Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"audible_search_book": {
"ai_tool": [
[
{
"node": "Lookup Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"brave_search": {
"ai_tool": [
[
{
"node": "Lookup Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Wikipedia": {
"ai_tool": [
[
{
"node": "Lookup Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"gpt/oss-120b": {
"ai_languageModel": [
[]
]
},
"OpenAI Chat Model": {
"ai_languageModel": [
[
{
"node": "Lookup Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Call 'MAM Series Matcher'": {
"main": [
[
{
"node": "Merge",
"type": "main",
"index": 0
}
]
]
}
},
"settings": {
"executionOrder": "v1",
"callerPolicy": "workflowsFromSameOwner",
"availableInMCP": false
},
"triggerCount": 1,
"versionId": "7e06408b-8b2a-4d35-83fa-00ffadece2f8",
"owner": {
"type": "personal",
"projectId": "FeLO36wNUAcn61Wj",
"projectName": "Ben W <admin@ben.io>",
"personalEmail": "admin@ben.io"
},
"parentFolderId": "6tDyZCwqELStb6Ik",
"isArchived": false
}