# Automate Perplexity research with n8n

> Use the Perplexity node in n8n to run scheduled research, citation checks and competitor monitoring, with sheets, Slack and approvals.

Source: https://mentionx.ai/learn/perplexity/perplexity-n8n-automation  
Author: Dipuck Jones, founder of MentionX  
Updated: 5 November 2026  
Level: Practitioner

**n8n has a native Perplexity node that calls the Agent API, the Search API and Perplexity embeddings. That makes it a good home for recurring marketing research: a Schedule trigger reads prompts from a sheet, Perplexity answers or searches, a Code node extracts brands and citations, and results go to a sheet with a Slack draft for review. Perplexity's own guide lists n8n 2.14.0 or later for the current node.**

> **Key takeaways**
>
> - The current Perplexity node has three resources: Agent, Search and Embeddings.
> - Agent returns answers with citations. Search returns ranked results. Use both for visibility tracking.
> - Build the "prompts in a sheet, results in a sheet" pattern first, then add Slack drafts and approvals.
> - Handle 429 rate-limit errors with Retry on Fail and Wait nodes. Log every run.

*Checked 5 November 2026 (CET) against the Perplexity Help Center, Perplexity blog, Perplexity API docs and the outlets cited in Sources. Perplexity renames and moves features often, so confirm labels and limits in your own account. "Our view" marks MentionX opinion. Ledgerline is a fictional company used for illustration.*

## What does the Perplexity node do?

According to Perplexity's n8n integration guide (checked November 2026):

| Resource | What it does | Key options |
|---|---|---|
| Agent | Calls the Agent API and returns an answer with citations | Model or effort, tools (web_search, fetch_url), system instructions, JSON schema output |
| Search | Calls the Search API and returns ranked results | Query, recency (day, week, month, year), domain filter, language, country |
| Embeddings | Creates vectors for semantic search or clustering | pplx-embed-v1-4b (2,560 dimensions), pplx-embed-v1-0.6b (1,024 dimensions) |

Older n8n tutorials show a "Chat" or "Message a Model" operation with Sonar model names. Sonar support ended on 27 September 2026, so update those workflows to the Agent resource.

## How do you set it up?

1. **Update n8n** to 2.14.0 or later (Cloud updates automatically, but self-hosted needs an upgrade).
2. **Create an API key** in the Perplexity API console and set a spend alert.
3. **Add the credential** in n8n: Settings → Credentials → Perplexity API.
4. **Add a Perplexity node** to a test workflow and run one Search and one Agent call.

New to n8n? Start with [n8n for Marketers](https://mentionx.ai/learn/n8n/n8n-for-marketers) and [your first workflow](https://mentionx.ai/learn/n8n/n8n-first-workflow-basics).

## What is the core workflow pattern?

```
Schedule Trigger (Mon 06:00)
  → Google Sheets: read "prompts" tab (prompt, cluster, priority)
  → Loop Over Items (batch of 5)
     → Perplexity (Agent): answer prompt, JSON schema output
     → Perplexity (Search): same prompt as query, top 10
     → Code: extract brands mentioned, cited domains, our rank
     → Google Sheets: append to "results" tab
     → Wait (2s)
  → Code: summarise week vs last week
  → Slack: post summary to #ai-visibility (internal channel)
```

### Use structured output

Ask the Agent resource for JSON so parsing is reliable:

```json
{
  "type": "object",
  "properties": {
    "brands_mentioned": { "type": "array", "items": { "type": "string" } },
    "recommended_first": { "type": "string" },
    "cited_urls": { "type": "array", "items": { "type": "string" } }
  },
  "required": ["brands_mentioned", "cited_urls"]
}
```

System instructions: "Answer as you normally would for a buyer, then fill the schema. List every brand you mention in the order you mention it."

*Our view:* the instruction slightly changes the answer compared with a plain query. Keep the wording fixed so week-on-week comparisons stay fair, and spot-check against the consumer app monthly.

## Which other workflows are worth building?

| Workflow | Trigger | Perplexity resource | Output |
|---|---|---|---|
| Competitor news monitor | Daily | Search, recency = day, domain filter for news sites | Slack digest of new items |
| Content brief citation audit | Form submission with a target question | Agent, then Search | Doc with sources table ([lesson 7](https://mentionx.ai/learn/perplexity/perplexity-content-briefs-seo)) |
| PR mention finder | Weekly | Search, excluding your own domain | Sheet of third-party pages to pitch |
| Topic clustering | Monthly | Embeddings | Clusters of prompts or pages |
| Lead account research | New CRM deal | Agent, low effort | CRM note drafted for a rep to review ([lead enrichment](https://mentionx.ai/learn/n8n/n8n-lead-enrichment-workflow)) |

> **Pro move:** add a "human approval" step before anything leaves the building. In n8n, send the draft to Slack with approve and reject buttons, or use a Wait node set to "resume on webhook". Nothing gets sent to a customer, journalist or social account without a person clicking approve.

## How do you handle errors and costs?

- **Retry on Fail** on Perplexity nodes, with a few retries and a pause between them.
- **429 rate limits:** batch with Loop Over Items, and add a Wait node between batches ([n8n error handling](https://mentionx.ai/learn/n8n/n8n-error-handling-retries)).
- **Error workflow:** route failures to a Slack alert with the prompt that failed.
- **Cost controls:** use the fast effort or fast search, keep prompt sets focused, and log the cost per run.
- **Executions:** on n8n Cloud, each workflow run counts as an execution. Batch prompts into one run rather than running per prompt ([n8n costs](https://mentionx.ai/learn/n8n/n8n-costs-executions)).

## How should you store results?

| Column | Example |
|---|---|
| run_date | 2026-11-02 |
| prompt_id | P017 |
| engine_config | agent:fast@pinned-version |
| brands_mentioned | Competitor A; Ledgerline; Competitor C |
| ledgerline_position | 2 |
| cited_domains | competitor-a.example; review-site.example; ledgerline.example |
| ledgerline_cited | TRUE |
| search_rank_ledgerline | 4 |
| cost_estimate | Logged from usage |

A sheet works for up to a few thousand rows a month. After that, move to a database such as Postgres or Supabase.

## Worked example: Ledgerline

*Ledgerline is a fictional accounts-payable software company. Details are illustrative.*

Ledgerline moved its weekly API script ([lesson 11](https://mentionx.ai/learn/perplexity/perplexity-api-agent-search-marketers)) into n8n so marketing ops could own it.

| Before | After |
|---|---|
| Python script on an analyst's laptop | n8n Cloud workflow, owned by marketing ops |
| Results pasted into slides by hand | Sheet plus a Slack summary every Monday |
| No error alerts | Error workflow posts to #ops-alerts |
| Dashboard rebuilt by Computer each week | Looker Studio reads the sheet directly |

### Walkthrough

1. Updated n8n and added the Perplexity credential.
2. Built the core pattern with 40 prompts in batches of 5.
3. Added the JSON schema and a Code node to compute Ledgerline's position.
4. Added the Search resource for the same queries.
5. Set Retry on Fail and an error workflow.
6. Ran three weeks in parallel with the old script and compared the results, which matched within normal answer variation.
7. Retired the script.

## Common mistakes

- **Copying old Sonar tutorials.** Use the Agent resource.
- **One execution per prompt.** That's expensive on Cloud, so batch instead.
- **No version logging.** Record the effort version in each row.
- **Auto-posting externally.** Always add an approval step.

## Try it yourself

Build the core workflow with five prompts and one Slack message to yourself. Run it manually, check the sheet, then schedule it weekly. Add the Search resource in week two.

## Quick quiz

**1. What are the three resources in the current Perplexity node?**

*Answer:* Agent, Search and Embeddings.

**2. How do you handle 429 errors?**

*Answer:* Use Retry on Fail, batching and Wait nodes.

**3. Why use a JSON schema?**

*Answer:* So brands and citations can be parsed reliably.

## What should you check before the next lesson?

- n8n is version 2.14.0 or later, and the credential works.
- The core workflow writes to a results sheet.
- An error workflow and spend alerts are on.

Previous: [The Agent API and Search API](https://mentionx.ai/learn/perplexity/perplexity-api-agent-search-marketers). Next: [How Perplexity chooses sources](https://mentionx.ai/learn/perplexity/perplexity-how-sources-are-chosen). Or return to the [Perplexity for Marketers track](https://mentionx.ai/learn/perplexity/perplexity-for-marketers). Related: [Computer and Automations](https://mentionx.ai/learn/perplexity/perplexity-computer-marketing-tasks), [n8n AI visibility monitoring](https://mentionx.ai/learn/n8n/n8n-ai-visibility-monitoring), [n8n competitor monitoring](https://mentionx.ai/learn/n8n/n8n-competitor-monitoring).

## Common questions

**Which n8n version do I need for the Perplexity node?** Perplexity's integration guide lists n8n 2.14.0 or later for the current node with Agent, Search and Embeddings resources. Update n8n first if you don't see them.

**Should I use n8n or Perplexity Computer Automations?** Use Computer Automations for quick, marketer-owned jobs. Use n8n when you need exact API settings, logging, approvals and connections to your CRM, sheets or databases.

**How do I stop a workflow from running up costs?** Limit the prompt set, use the fast effort or fast search where possible, add a Wait node between batches, and review API spend weekly at first.

## Sources

- Perplexity API docs, [n8n integration](https://docs.perplexity.ai/docs/getting-started/integrations/n8n)
- n8n docs, [Perplexity node](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.perplexity/)
- Perplexity API docs, [Migrate from Sonar](https://docs.perplexity.ai/docs/agent-api/migrate-from-sonar/overview)
- Perplexity API docs, [Search API quickstart](https://docs.perplexity.ai/docs/search/quickstart)
- All accessed 5 Nov 2026.

## Frequently asked questions

### Which n8n version do I need for the Perplexity node?

Perplexity's integration guide lists n8n 2.14.0 or later for the current node with Agent, Search and Embeddings resources. Update n8n first if you do not see them.

### Should I use n8n or Perplexity Computer Automations?

Use Computer Automations for quick, marketer-owned jobs. Use n8n when you need exact API settings, logging, approvals and connections to your CRM, sheets or databases.

### How do I stop a workflow from running up costs?

Limit the prompt set, use the fast effort or fast search where possible, add a Wait node between batches, and review API spend weekly at first.

---

Written and reviewed by Dipuck Jones for MentionX Learn. The HTML version of this page: https://mentionx.ai/learn/perplexity/perplexity-n8n-automation
