FlowKit

Connecting Perplexity to n8n: sourced answers and verifiable citations in your AI workflows

Published 29 July 2026 · 6 min read

Wiring an LLM into an n8n workflow to write, classify, or summarize works great — until the question involves a recent fact, a price that changed last week, or industry news. Claude, GPT, Gemini, or Mistral will answer with the same confidence as when they actually know the answer, without always flagging that they're guessing. Perplexity tackles this differently: its Sonar models run a real web search on every call and return verifiable citations alongside the answer. Since version 2 of its node, n8n covers the entire Perplexity API natively. This guide covers how to connect it and when it beats a classic LLM connector.

Why Perplexity isn't just another LLM connector

Our guides on Claude/GPT, Gemini, and Mistral cover models that answer from knowledge frozen at training time, optionally topped up with whatever context you feed them. Perplexity flips that: its Sonar models query the live web before answering, then cite their sources — at no extra cost on the standard Sonar models.

In practice, this skips building your own scraping-plus-summary pipeline for up-to-date information needs, as described in our guides on AI web scraping or RSS-based competitive monitoring. Perplexity doesn't replace those for tightly targeted source monitoring, but it covers the "ask a question, get an up-to-date sourced answer" case very well, with no pipeline to maintain.

Creating a Perplexity API key

API access goes through a developer space separate from the consumer Perplexity Pro subscription:

  1. Create an account on the Perplexity API platform and set up a payment method (usage-based billing, no fixed subscription).
  2. Generate an API key from the dedicated section of your account and copy it immediately.
  3. In n8n, open Credentials, create a Perplexity API credential, and paste the key.

Once created, the credential is reusable on any Perplexity node in the workflow, with no reconfiguration.

The Perplexity node and its four resources

n8n's Perplexity node covers four distinct resources, each matching a different use case:

  • Chat Completion: the equivalent of a standard chat call — you send a message, the Sonar model answers backed by a web search and returns the associated citations. It's the resource closest to what you already know from a Basic LLM Chain wired to another provider.
  • Agent: an agentic response able to use third-party models and tools, with structured JSON-schema output — useful when the answer needs to feed a downstream node directly without manual reformatting, in the same spirit as a Structured Output Parser.
  • Search: a raw web search with advanced filters, returning a list of results rather than a written answer — relevant when you want to keep control over the final synthesis, for instance by handing it to another LLM already used in the workflow.
  • Embeddings: an embeddings model, including contextualized embeddings, for RAG cases where you want to vectorize content while accounting for surrounding context rather than isolated sentences — worth weighing alongside the criteria in our guide to choosing an embeddings model.

Example: a monitoring agent that answers with its sources in Slack

A concrete use case: a workflow triggered by a daily Schedule Trigger sends the Chat Completion resource a question like "what are the main developments in this tool or this market this week." The answer, along with its citations, gets formatted and posted to a Slack channel — the same channel used for the urgent alert in the AI Inbox Pack (€79) can just as well receive this sourced digest. The advantage over classic RSS monitoring: no need to identify the right feeds in advance, the web search does that work on every run.

Filtering and hardening the search

Two settings are worth knowing before shipping a workflow to production:

  • Domain filter: up to 20 domains or URLs, either allowlist mode (only these sources) or denylist mode (everything except these sources, prefixed with a minus sign) — the two modes don't combine. Restricting the search to a set of trusted sources (official sites, documentation, specialized press) meaningfully lowers the risk of citing an unreliable source.
  • Recency filter: hour, day, week, month, or year. For breaking news, "hour" or "day"; for weekly product monitoring, "week" is plenty. This filter doesn't combine with other custom date bounds.

Both settings are the web-search equivalent of the metadata filtering applied on the vector store side in RAG: the tighter the scope set upstream, the more reliable the final answer.

Using Perplexity as an AI Agent tool

The Perplexity node isn't a model sub-node that plugs directly into ai_languageModel on an AI Agent: it's a regular action node. For an agent to decide on its own to query it — say, to verify a fact before drafting a reply — the simplest path is still to expose it as a custom tool, exactly as described in our guide on custom tools for AI Agent: a sub-workflow that calls the Perplexity node, with a clear description of when the agent should reach for it ("use this tool to verify a recent or dated fact").

How much the Perplexity API costs

Pricing combines a per-token cost with, depending on the model, a per-request cost tied to search depth:

Model Tokens (input / output) Cost per search
Sonar $1 / million tokens $5 to $12 per 1,000 requests depending on context
Sonar Pro $3 / $15 per million tokens $6 to $14 per 1,000 requests depending on context
Sonar Deep Research $2 / $8 per million tokens + citation tokens, reasoning tokens, and search queries billed separately

Citations are included at no extra cost on Sonar and Sonar Pro. As with any provider, start with standard Sonar for most needs and move up to Sonar Pro or Deep Research only when synthesis quality genuinely requires it — the detailed tracking approach in our guide on AI call costs applies here too, just add a column for cost-per-search on top of cost-per-token.

Why citations change the equation

The problem Perplexity addresses isn't new in AI research. Lewis et al.'s work on retrieval-augmented generation (Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks, NeurIPS 2020 — see on Google Scholar) laid the groundwork for this approach: grounding a language model's generation in documents retrieved at query time meaningfully reduces made-up answers compared to a model answering purely from its learned parameters. Perplexity applies the same principle at the scale of the open web, with the direct benefit of citations exposed to the end user — a verifiability guarantee a classic LLM connector doesn't provide natively.

Perplexity or a classic LLM connector: which to pick

  • Pick Perplexity whenever the answer depends on dated, changing, or recent information: industry news, pricing, product availability, regulatory changes — and you want to be able to cite a source if the question comes up again.
  • Stay with Claude, GPT, Gemini, or Mistral for writing, summarizing, classification, or any reasoning that doesn't depend on up-to-date web information: those tasks gain nothing from a web search on every call, and often cost less on a well-chosen general-purpose model.
  • Combine both: Perplexity to gather sourced facts, another model for final formatting or fitting your brand's editorial tone — a multi-provider setup that stays simple thanks to n8n's interchangeable sub-nodes.

In short

n8n's Perplexity node gives you, in a few minutes, answers grounded in real web search, citations included — a solid complement to classic LLM connectors whenever a workflow needs to answer from recent facts rather than frozen knowledge. FlowKit's packs already rely on interchangeable model sub-nodes: nothing stops you from adding a Perplexity call ahead of a RAG Assistant Pack (€119) to enrich a document base with sourced news, or in the Complete FlowKit Bundle (€269 instead of €347) to cover both your internal documents and your industry's news.

FAQ

Frequently asked questions

Does n8n's Perplexity node require a community node?

No. Since version 2, the Perplexity node (n8n-nodes-langchain.perplexity) ships natively with n8n, with full API coverage: Chat Completion, Agent, Search, and Embeddings, while staying compatible with workflows built on version 1. No third-party package install is needed.

How is Perplexity different from wiring Claude, GPT, or Gemini into an n8n workflow?

A general-purpose LLM answers from what it learned during training: it doesn't know what happened last week and can state a made-up fact with full confidence. Perplexity's Sonar models run a real web search on every call and return citations with each answer, working more like a search engine augmented by an LLM than an LLM simulating a search.

Can you limit which sources Perplexity consults?

Yes, via the domain filter: up to 20 domains or URLs, either allowlist mode (only these sources) or denylist mode (everything except these sources, prefixed with a minus sign), without combining both modes. A recency filter (hour, day, week, month, year) additionally lets you restrict results to recently published content, useful for news or product monitoring.

Do Perplexity citations cost extra?

No, not on the Sonar and Sonar Pro models: web search and citations are included in the token price, with no separate billing. Only the Sonar Deep Research model, built for deep multi-step research, adds its own charges for citation tokens and search queries.

Bundle FlowKit Complet

€269