Integrating Perplexity and Gmail Tools in n8n AI Agents | Alpha | PandaiTech

Integrating Perplexity and Gmail Tools in n8n AI Agents

How to connect the 'Tools' node in n8n using Perplexity for real-time product searches and Gmail for automated wishlist email delivery.

Learning Timeline
Key Insights

AI Search Optimization Tips

By enabling 'Let the model define this parameter' in Perplexity, you allow the AI Agent to use its existing 'System Instructions' to generate more relevant search queries without the need to manually hardcode messages.

Testing Reminder

Testing is the most critical phase. Ensure that the Brain (Model) and Memory nodes are properly connected before running your first test to avoid errors like sending empty emails.
Step by Step

Steps to Integrate Perplexity Search Tool

  1. Click the 'Save' button at the top right of the n8n workflow to ensure your current progress is saved.
  2. Click on the AI Agent node and select the 'Tools' section.
  3. Search for and select 'Perplexity' from the list of available tools.
  4. Connect your 'Credentials' by entering a valid Perplexity API Key.
  5. Rename the tool to 'find toys tool'.
  6. Under the 'Model' section, select the 'sonar-pro' model from the dropdown menu.
  7. Locate the 'Message' parameter and click the small toggle icon (round button) labeled 'Let the model define this parameter'.
  8. Ensure the 'Simplify Output' option is enabled (Toggle ON) to streamline data processing for the AI Agent.

Steps to Configure the Gmail Tool

  1. Click the '+' icon on the AI Agent node to add a second tool.
  2. Search for and select the 'Gmail' tool.
  3. Select the connected Gmail 'Credentials' (ensure your Google account is authorized in n8n).
  4. Rename the tool to 'send wishlist tool'.
  5. In the 'Resource' section, select the 'Message' option.
  6. In the 'Operation' section, select the 'Send' option.
  7. Set the email parameters (To, Subject, Body) to be dynamically driven by instructions from the AI Agent.

More from Build & Deploy Autonomous AI Agents

View All