{ "nodes": [ { "id": "compare-workflow-tools-with-perplexity-0", "name": "When clicking ‘Test workflow’", "type": "n8n-nodes-base.manualTrigger", "position": [ -460, 80 ], "parameters": {}, "typeVersion": 1 }, { "id": "compare-workflow-tools-with-perplexity-1", "name": "Set Params", "type": "n8n-nodes-base.set", "position": [ -160, -60 ], "parameters": { "options": {}, "assignments": { "assignments": [ { "id": "8b5c6ca0-5ca8-4f67-abc1-44341cf419bc", "name": "system_prompt", "type": "string", "value": "You are an n8n fanboy." }, { "id": "7c36c362-6269-4564-b6fe-f82126bc8f5e", "name": "user_prompt", "type": "string", "value": "What are the differences between n8n and Make?" }, { "id": "4366d2b5-ad22-445a-8589-fddab1caa1ab", "name": "domains", "type": "string", "value": "n8n.io, make.com" } ] } }, "typeVersion": 3.4 }, { "id": "compare-workflow-tools-with-perplexity-2", "name": "Clean Output", "type": "n8n-nodes-base.set", "position": [ 580, -100 ], "parameters": { "options": {}, "assignments": { "assignments": [ { "id": "5859093c-6b22-41db-ac6c-9a9f6f18b7e3", "name": "output", "type": "string", "value": "={{ $json.choices[0].message.content }}" }, { "id": "13208fff-5153-45a7-a1cb-fe49e32d9a03", "name": "citations", "type": "array", "value": "={{ $json.citations || [] }}" } ] } }, "typeVersion": 3.4 }, { "id": "compare-workflow-tools-with-perplexity-3", "name": "Perplexity Request", "type": "n8n-nodes-base.httpRequest", "position": [ 240, 40 ], "parameters": { "url": "https://api.perplexity.ai/chat/completions", "method": "POST", "options": {}, "jsonBody": "={{ {model:'sonar',messages:[{role:'system',content:$json.system_prompt},{role:'user',content:$json.user_prompt}],temperature:0.2,top_p:0.9,search_domain_filter:$json.domains.split(',').map(x=>x.trim()).filter(Boolean),return_images:false,return_related_questions:false,search_recency_filter:'month',top_k:0,stream:false,presence_penalty:0,frequency_penalty:1,response_format:null} }}", "sendBody": true, "specifyBody": "json", "authentication": "genericCredentialType", "genericAuthType": "httpHeaderAuth" }, "typeVersion": 4.2 } ], "pinData": {}, "connections": { "Set Params": { "main": [ [ { "node": "Perplexity Request", "type": "main", "index": 0 } ] ] }, "Perplexity Request": { "main": [ [ { "node": "Clean Output", "type": "main", "index": 0 } ] ] }, "When clicking ‘Test workflow’": { "main": [ [ { "node": "Set Params", "type": "main", "index": 0 } ] ] } }, "name": "Compare Workflow Tools with Perplexity", "active": false }