Skip to content
AI Workshop
0:09:44
1 755
88
4
Last update : 16/10/2024

🧠 Supercharge Your n8n Workflows with Perplexity.ai

Want to harness the power of Perplexity.ai’s internet-connected intelligence directly within your n8n workflows? This guide will show you how to seamlessly integrate these two powerful tools, even without a native integration (yet!).

🗝️ Why This Matters

Imagine effortlessly summarizing lengthy articles, researching topics on the fly, or getting instant answers to complex questions – all without leaving your n8n workflow. That’s the power this integration unlocks!

⚙️ Setting Up Your Perplexity.ai Engine

  1. Fuel Up: Head over to your Perplexity.ai account (https://www.perplexity.ai/) and make sure you have enough credits. A little goes a long way! 💰
  2. Grab Your Key: Navigate to your API settings and generate a fresh API key. Keep this safe – it’s your ticket to Perplexity’s magic! 🔐
  3. Meet Your New Best Friend: The HTTP Request node in n8n is the key. We’ll use it to send requests to Perplexity’s API.

🪄 Weaving the Magic: Connecting n8n and Perplexity.ai

  1. Import the Spell: Copy the provided cURL code snippet from Perplexity’s API documentation (https://docs.perplexity.ai/).
  2. Paste the Power: In your n8n workflow, add an HTTP Request node and click “Import cURL.” Paste the code – boom! Your connection is ready. 💥
  3. Speak the Language: The magic happens in the JSON code of the HTTP Request node. You’ll define your prompts and instructions here.

🧙‍♂️ Mastering the Art of Prompts

Think of prompts as instructions for Perplexity.ai. Here’s how to structure them:

  • System Role: Set the stage. Tell Perplexity what kind of task it’s performing (e.g., “You are a helpful assistant that summarizes articles.”).
  • User Role: Provide the specific input. For example, if summarizing an article, insert the article text here.

Pro Tip: Use clear, concise language and experiment with different prompt structures to get the best results.

🚀 Example: Summarizing Articles Like a Pro

Let’s say you have an n8n workflow that fetches news articles. Here’s how to add Perplexity-powered summaries:

  1. Connect the Dots: After the node that fetches the article, add your HTTP Request node (the one we configured earlier).
  2. Craft Your Prompt: In the JSON code, set the System Role to something like: "Summarize the following article in detail."
  3. Feed the Content: In the User Role section, insert the article text using n8n’s data mapping feature.
  4. Unleash the Power: Execute the workflow. Perplexity.ai will receive the article and send back a concise summary.

🧰 Resource Toolbox

🎉 You Did It!

You’ve just supercharged your n8n workflows with the power of Perplexity.ai. Now go forth and automate with intelligence! 🚀

Other videos of

Play Video
AI Workshop
0:08:05
114
9
0
Last update : 13/11/2024
Play Video
AI Workshop
0:08:05
256
16
3
Last update : 13/11/2024
Play Video
AI Workshop
0:14:32
94
10
0
Last update : 13/11/2024
Play Video
AI Workshop
0:30:02
8 855
378
18
Last update : 07/11/2024
Play Video
AI Workshop
0:29:07
3 139
182
9
Last update : 06/11/2024
Play Video
AI Workshop
2:32:10
2 626
144
9
Last update : 30/10/2024
Play Video
AI Workshop
0:16:02
656
35
2
Last update : 30/10/2024
Play Video
AI Workshop
0:13:52
952
52
3
Last update : 30/10/2024
Play Video
AI Workshop
0:10:01
696
50
4
Last update : 30/10/2024