N8N

N8N Perplexity

By adding a Perplexity tool to an Ai Agent in N8N, you can perform research with real time information quickly.

In this article, we will walk you step by step on setting up Perplexity in N8N for the first time and show you two different approaches that people are using with it.

The YouTube video for this article is linked below. Also if you are looking for N8N help, I am taking on customers!

Pictured below is the first (and quicker) workflow in which we will be building. But before we get to that, we need to do a few things.

Setting Up The Perplexity API

Many people believe that you need a Perplexity Paid account to use the API. While a paid account gives you $5 in free credit, it’s not necessarily needed. 

All you need to do is fund your account with credit. 

Go to your account in the bottom right corner in Perplexity. Here you will find settings for billing and API keys. Fill out the information and put $5 in your account.

To get your API key (Which you will need in N8N) go to the API Keys tab and create a new key.

Getting The Perplexity Tool in N8N

Perplexity is a built in tool for AI Agents in newer versions of N8N. Chances are if you don’t see it, you’ll need to update your version of it however. Go to your account and update the N8N version. It’ll restart your workspace, but you should now be able to see it. 

Building the N8N Perplexity Workflow

We start off by using a Chat Trigger to start the workflow. You don’t necessarily need to use Chat, but for ease of use in this tutorial we will utilize it.

Next attach an AI Agent. We will use the OpenAI Chat Model, but feel free to use another if you want to.

Inside the AI Agent, I’m going to set up a system message.

Now let’s look at the Perplexity tool. Inside you will want to define which model to use. I’m just going to use Sonar.

We also will want to attach the tool to see the initial conversation from the Chat Trigger that is being sent to the AI Agent. You can do this by entering in this expression down below or by dragging in the chat input on the left.

Now that we are wired up, let’s look at an example by looking at Tariff news. I’ll ask: What are the latest countries and industries that were impacted by tariffs in early August 2025.

Below you will see the results from this workflow.

More Advanced Perplexity N8N Workflow

In another recent update, N8N launched the AI Agent Tool. One of the use cases shared by the N8N team utilized Perplexity as a tool attached to the AI Agent tool.

The reason is we can use a cheaper chat model with the AI Agent tool (which gets the data from perplexity) and a more expensive model in the main AI Agent from above. In this example here I used GPT 4.1-Mini for the AI Agent tool and GPT 4.1 for the main AI Agent.

Final Thoughts

Setting up Perplexity in N8N used to be a pain, but with recent updates, it can be accomplished in only a few minutes. Thanks for checking out this N8N article and feel free to read our other content on the website!

Ryan is a Data Scientist at a fintech company, where he focuses on fraud prevention in underwriting and risk. Before that, he worked as a Data Analyst at a tax software company. He holds a degree in Electrical Engineering from UCF.

Leave a Reply

Your email address will not be published. Required fields are marked *