{ "kind": "open-flow-workflow", "version": 1, "name": "Compare Workflow Tools with Perplexity", "content": { "modelVersion": 14, "document": { "bindings": {}, "graph": { "nodes": { "n_44a3b10da7676746": { "name": "Run the comparison", "kind": "start", "inputDefs": [] }, "n_786858917fee4b6b": { "inputs": { "model": { "kind": "value", "value": "sonar" }, "messages": { "kind": "value", "value": [ { "role": "system", "content": "You are an n8n fanboy." }, { "role": "user", "content": "What are the differences between n8n and Make?" } ] }, "temperature": { "kind": "value", "value": 0.2 }, "top_p": { "kind": "value", "value": 0.9 }, "top_k": { "kind": "value", "value": 0 }, "search_domain_filter": { "kind": "value", "value": [ "n8n.io", "make.com" ] }, "return_images": { "kind": "value", "value": false }, "search_recency_filter": { "kind": "value", "value": "month" }, "stream": { "kind": "value", "value": false }, "presence_penalty": { "kind": "value", "value": 0 }, "frequency_penalty": { "kind": "value", "value": 1 } }, "name": "Ask Perplexity Sonar", "kind": "task", "task": { "inputs": [ { "description": "The Sonar model to use for the chat completion.", "jsonSchema": { "type": "string", "description": "The Sonar model to use for the chat completion." }, "nullable": false, "handle": "model" }, { "description": "The ordered conversation messages.", "jsonSchema": { "type": "array", "items": { "type": "object", "properties": { "role": { "type": "string", "enum": [ "system", "user", "assistant" ], "description": "The role of the message author." }, "content": { "type": "string", "description": "The plain-text message content." } }, "required": [ "role", "content" ], "additionalProperties": false, "description": "A chat message." }, "minItems": 1, "description": "The ordered conversation messages." }, "nullable": false, "handle": "messages" }, { "description": "The maximum number of tokens to generate.", "jsonSchema": { "type": "integer", "minimum": 1, "description": "The maximum number of tokens to generate." }, "nullable": true, "handle": "max_tokens", "value": null }, { "description": "The sampling temperature for generation.", "jsonSchema": { "type": "number", "minimum": 0, "maximum": 2, "description": "The sampling temperature for generation." }, "nullable": true, "handle": "temperature", "value": null }, { "description": "The nucleus sampling threshold.", "jsonSchema": { "type": "number", "minimum": 0, "maximum": 1, "description": "The nucleus sampling threshold." }, "nullable": true, "handle": "top_p", "value": null }, { "description": "The number of top tokens to consider per step.", "jsonSchema": { "type": "integer", "minimum": 0, "description": "The number of top tokens to consider per step." }, "nullable": true, "handle": "top_k", "value": null }, { "description": "Whether to stream the response. This connector only accepts false or an omitted value.", "jsonSchema": { "type": "boolean", "description": "Whether to stream the response. This connector only accepts false or an omitted value." }, "nullable": true, "handle": "stream", "value": null }, { "description": "Whether to include image references in the response.", "jsonSchema": { "type": "boolean", "description": "Whether to include image references in the response." }, "nullable": true, "handle": "return_images", "value": null }, { "description": "Whether to include citations in the response.", "jsonSchema": { "type": "boolean", "description": "Whether to include citations in the response." }, "nullable": true, "handle": "return_citations", "value": null }, { "description": "Whether to disable web search grounding for this request.", "jsonSchema": { "type": "boolean", "description": "Whether to disable web search grounding for this request." }, "nullable": true, "handle": "disable_search", "value": null }, { "description": "Only search within these domains or URL prefixes.", "jsonSchema": { "type": "array", "items": { "type": "string", "minLength": 1, "description": "A domain or URL prefix used to limit web search." }, "description": "Only search within these domains or URL prefixes." }, "nullable": true, "handle": "search_domain_filter", "value": null }, { "description": "A recency filter such as day, week, month, or year.", "jsonSchema": { "type": "string", "description": "A recency filter such as day, week, month, or year." }, "nullable": true, "handle": "search_recency_filter", "value": null }, { "description": "The penalty applied to tokens that have already appeared.", "jsonSchema": { "type": "number", "minimum": -2, "maximum": 2, "description": "The penalty applied to tokens that have already appeared." }, "nullable": true, "handle": "presence_penalty", "value": null }, { "description": "The penalty applied based on token frequency.", "jsonSchema": { "type": "number", "minimum": 0, "maximum": 2, "description": "The penalty applied based on token frequency." }, "nullable": true, "handle": "frequency_penalty", "value": null } ], "outputs": [ { "description": "The response payload for the chat completion action.", "jsonSchema": { "type": "object", "properties": { "id": { "type": "string", "description": "The completion identifier." }, "model": { "type": "string", "description": "The model that generated the completion." }, "created": { "type": "integer", "description": "The Unix timestamp when the completion was created." }, "choices": { "type": "array", "items": { "type": "object", "properties": { "index": { "type": "integer", "description": "The choice index." }, "finish_reason": { "type": "string", "description": "The reason why generation stopped." }, "message": { "type": "object", "properties": { "role": { "type": "string", "description": "The role of the generated message." }, "content": { "type": "string", "description": "The generated message content." } }, "required": [ "role" ], "additionalProperties": true, "description": "The generated message." } }, "required": [ "index", "message" ], "additionalProperties": true, "description": "A single generated completion choice." }, "description": "The completion choices." }, "citations": { "type": "array", "items": { "type": "string", "description": "A citation URL returned with the response." }, "description": "The citation URLs referenced by the answer." }, "search_results": { "type": "array", "items": { "type": "object", "properties": { "title": { "type": "string", "description": "The search result title." }, "url": { "type": "string", "description": "The canonical URL of the result." }, "snippet": { "type": "string", "description": "A short snippet extracted from the result page." }, "date": { "type": "string", "description": "The published date reported for the result." }, "last_updated": { "type": "string", "description": "The last updated date reported for the result." } }, "additionalProperties": true, "description": "A raw search result returned by Perplexity." }, "description": "The search results used to ground the response." }, "usage": { "type": "object", "properties": { "prompt_tokens": { "type": "integer", "description": "The number of prompt tokens consumed." }, "completion_tokens": { "type": "integer", "description": "The number of completion tokens generated." }, "total_tokens": { "type": "integer", "description": "The total number of tokens consumed." } }, "additionalProperties": true, "description": "Usage information for the completion." } }, "required": [ "choices" ], "additionalProperties": true, "description": "The response payload for the chat completion action." }, "nullable": false, "handle": "output" } ], "name": "Ask Perplexity Sonar", "executor": { "kind": "connector", "action": "perplexity.create_chat_completion", "outputMode": "value" } } }, "n_23cfe823b97b25f9": { "inputs": { "response": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_786858917fee4b6b", "output": "output" } ] } }, "name": "Extract answer and citations", "kind": "task", "task": { "inputs": [ { "jsonSchema": { "type": "object", "properties": { "id": { "type": "string", "description": "The completion identifier." }, "model": { "type": "string", "description": "The model that generated the completion." }, "created": { "type": "integer", "description": "The Unix timestamp when the completion was created." }, "choices": { "type": "array", "items": { "type": "object", "properties": { "index": { "type": "integer", "description": "The choice index." }, "finish_reason": { "type": "string", "description": "The reason why generation stopped." }, "message": { "type": "object", "properties": { "role": { "type": "string", "description": "The role of the generated message." }, "content": { "type": "string", "description": "The generated message content." } }, "required": [ "role" ], "additionalProperties": true, "description": "The generated message." } }, "required": [ "index", "message" ], "additionalProperties": true, "description": "A single generated completion choice." }, "description": "The completion choices." }, "citations": { "type": "array", "items": { "type": "string", "description": "A citation URL returned with the response." }, "description": "The citation URLs referenced by the answer." }, "search_results": { "type": "array", "items": { "type": "object", "properties": { "title": { "type": "string", "description": "The search result title." }, "url": { "type": "string", "description": "The canonical URL of the result." }, "snippet": { "type": "string", "description": "A short snippet extracted from the result page." }, "date": { "type": "string", "description": "The published date reported for the result." }, "last_updated": { "type": "string", "description": "The last updated date reported for the result." } }, "additionalProperties": true, "description": "A raw search result returned by Perplexity." }, "description": "The search results used to ground the response." }, "usage": { "type": "object", "properties": { "prompt_tokens": { "type": "integer", "description": "The number of prompt tokens consumed." }, "completion_tokens": { "type": "integer", "description": "The number of completion tokens generated." }, "total_tokens": { "type": "integer", "description": "The total number of tokens consumed." } }, "additionalProperties": true, "description": "Usage information for the completion." } }, "required": [ "choices" ], "additionalProperties": true, "description": "The response payload for the chat completion action." }, "nullable": false, "handle": "response" } ], "outputs": [ { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "output" }, { "jsonSchema": { "type": "array", "items": { "type": "string" } }, "nullable": false, "handle": "citations" } ], "name": "Extract answer and citations", "moduleId": "n_d0b0a275d1c1e5bd", "capabilities": [ { "kind": "connector", "mode": "independent", "actions": [] } ] } }, "n_8fd995577da09458": { "name": "Answer and citations", "kind": "outputs", "outputDefs": [ { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "output" }, { "jsonSchema": { "type": "array", "items": { "type": "string" } }, "nullable": false, "handle": "citations" } ], "outputMappings": { "output": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_23cfe823b97b25f9", "output": "output" } ] }, "citations": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_23cfe823b97b25f9", "output": "citations" } ] } } } }, "edges": [ { "source": "n_44a3b10da7676746", "target": "n_786858917fee4b6b" }, { "source": "n_786858917fee4b6b", "target": "n_23cfe823b97b25f9" }, { "source": "n_23cfe823b97b25f9", "target": "n_8fd995577da09458" } ] } }, "modules": { "n_d0b0a275d1c1e5bd": { "name": "Extract answer and citations", "imports": [], "source": "export default function answer({response}){const text=response?.choices?.[0]?.message?.content;if(typeof text!=='string')throw Error('Missing completion text');return{output:text,citations:Array.isArray(response.citations)?response.citations:[]}}\n" } } }, "presentation": { "designer": { "version": 1, "flow": { "direction": "vertical" } } } }