Overview
n8n ships a native Perplexity node with full API coverage — Chat Completions, Agent, Search, and Embeddings — all configurable from the visual canvas. Models load dynamically from the API, so the dropdown always reflects the latest options.n8n is a node-based workflow automation platform. It supports both self-hosted and cloud deployments — all examples below work in either. If you’re self-hosting, make sure your instance can reach
api.perplexity.ai outbound. Learn more at n8n.io.- Chat Completion — Sonar models with built-in web search, citations, and search controls
- Agent — Third-party models (OpenAI, Anthropic, Google, xAI) with tool-calling and structured output
- Search — Raw ranked web results for your own processing
- Embeddings — Vector generation for RAG and retrieval pipelines
Prerequisites
- n8n 2.14.0+ (cloud at app.n8n.cloud or self-hosted)
- A Perplexity API key
Get API Key
Generate your Perplexity API key from the console.
Credential Setup

Chat Completion
Use Sonar models with built-in web search. This is the most common starting point — send a question, get a grounded answer with citations. Add a Perplexity node, set Resource toChat Completion, and choose a model:
| Parameter | Description |
|---|---|
| Model | sonar, sonar-pro, sonar-reasoning-pro, or sonar-deep-research |
| User Message | The question or prompt — supports n8n expressions like ={{ $json.question }} |

Search Controls
The node exposes Perplexity’s full search filtering in the Options section:
Extracting Citations
The response includes acitations array of source URLs. Use a Code node after the Perplexity node to format them:
Agent
Use the Agent resource to route through third-party models (OpenAI, Anthropic, Google, xAI) with Perplexity’sweb_search and fetch_url tools.
Set Resource to Agent and configure:
| Parameter | Description |
|---|---|
| Model | Any model from the dynamic dropdown (e.g. openai/gpt-5.4, anthropic/claude-sonnet-4-6) |
| Input | Your prompt — supports n8n expressions |
| Tools | Select web_search, fetch_url, or both |
| System Instructions | Optional system prompt for the agent |
| Response Format | Optional JSON schema for structured output |

Search
Get raw ranked web results without LLM processing. Set Resource toSearch:
| Parameter | Description |
|---|---|
| Query | The search query — supports n8n expressions |
| Recency | day, week, month, or year |
| Domain Filter | Limit to specific domains |
| Language | ISO 639-1 language code |
| Country | Two-letter country code |
title, url, snippet, and date.

Embeddings
Generate vectors for RAG and retrieval pipelines. Set Resource toEmbeddings:
| Parameter | Description |
|---|---|
| Model | pplx-embed-v1-4b (2560 dims) or pplx-embed-v1-0.6b (1024 dims) |
| Input | Text to embed — supports n8n expressions |
POST /v1/contextualizedembeddings for document-chunk-aware vectors.

Error Handling
Use n8n’s Error Trigger workflow or the built-in Retry on Fail setting (node settings → Retry on Fail) to handle transient errors:- 429 Too Many Requests — add a Wait node with exponential backoff before retrying
- 401 Unauthorized — verify your Perplexity API credential is saved correctly
- 500 errors — enable Retry on Fail in the node settings
Links & Resources
n8n Docs
Official n8n documentation
n8n Community
Templates, workflows, and community support
Perplexity API Reference
Full API reference
Sonar Models
Available models and capabilities