> ## Documentation Index
> Fetch the complete documentation index at: https://docs.valyu.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# n8n Integration

> Use Valyu's AI-powered search, extraction, and research tools in your n8n workflows

## What is n8n?

[n8n](https://n8n.io) is a popular workflow automation tool that lets you connect different apps and services together without writing code. Think of it like connecting building blocks - you can create automated workflows that do things like:

* Automatically research topics and save results to a spreadsheet
* Extract content from websites and send summaries to Slack
* Answer questions using AI and store the responses in a database

The Valyu n8n node brings our powerful AI search and research capabilities directly into your n8n workflows.

## What Can You Do with the Valyu Node?

The Valyu node gives you access to four powerful tools:

<CardGroup cols={2}>
  <Card title="Search" icon="magnifying-glass">
    Search across the web and premium data sources (academic papers, financial data, news) to find relevant information for any query.

    **Best for:** Finding information, research, fact-checking
  </Card>

  <Card title="Extraction" icon="file-import">
    Pull clean, readable content from any webpage. Optionally use AI to summarize or extract specific data points.

    **Best for:** Scraping websites, getting article content, data extraction
  </Card>

  <Card title="Answer" icon="message-bot">
    Get instant AI-powered answers to questions, backed by real search results. Fast and accurate.

    **Best for:** Quick Q\&A, chatbots, automated responses
  </Card>

  <Card title="Deep Research" icon="book-open-reader">
    Run comprehensive research tasks that search multiple sources and generate detailed reports. Takes 5-30 minutes but produces thorough results.

    **Best for:** Market research, competitive analysis, in-depth reports
  </Card>
</CardGroup>

## Getting Started

### Step 1: Get Your Valyu API Key

Before you can use the Valyu node, you need an API key:

1. Go to [platform.valyu.ai](https://platform.valyu.ai) and create a free account
2. Navigate to **API Keys** in the dashboard
3. Click **Create API Key** and copy your new key

<Card title="Free Credits" icon="gift" href="https://platform.valyu.ai" horizontal>
  New accounts get **\$10 in free credits** - enough to run thousands of searches!
</Card>

### Step 2: Install the Valyu Node in n8n

<Note>
  The Valyu node is a community node, which means it's only available on **self-hosted n8n instances**. It's not available on n8n Cloud.
</Note>

**To install the node:**

1. In your n8n instance, go to **Settings** (gear icon in the bottom left)
2. Click on **Community Nodes**
3. Click **Install**
4. Enter the package name: `n8n-nodes-valyu`
5. Check the box to accept the risks of installing community nodes
6. Click **Install**

That's it! The Valyu node will now appear when you search for "Valyu" in the nodes panel.

### Step 3: Set Up Your Credentials

Before using the Valyu node, you need to add your API key:

1. Drag a **Valyu** node onto your canvas
2. Click on the node to open it
3. Next to **Credential to connect with**, click the dropdown and select **Create New Credential**
4. In the popup:
   * **API Key**: Paste your Valyu API key from Step 1
   * **API URL**: Leave as the default (`https://api.valyu.ai/v1`)
5. Click **Save**

Your credentials are now saved and will be available for all Valyu nodes in your workflows.

## Using the Valyu Node

### Search

Use Search when you need to find information from across the web and premium data sources.

**Basic usage:**

1. Select **Search** as the operation
2. Enter your search query (e.g., "latest developments in quantum computing")
3. Run the node

**Optional settings** (click "Add Option" to see these):

* **Search Type**: Choose between All, Web only, Proprietary (academic/financial), or News
* **Max Results**: How many results to return (1-100)
* **Response Length**: How much content per result (Short, Medium, Large, Max)
* **Date filters**: Only get results from a specific time period

<Accordion title="Example: Search for recent AI news">
  ```
  Operation: Search
  Query: "artificial intelligence breakthroughs 2024"
  Options:
    - Search Type: News
    - Max Results: 10
    - Start Date: 2024-01-01
  ```
</Accordion>

### Extraction

Use Extraction when you have specific URLs and want to pull out their content.

**Basic usage:**

1. Select **Extraction** as the operation
2. Enter one or more URLs (comma-separated)
3. Choose a **Summary Mode**:
   * **No AI Processing**: Just get the raw text content
   * **Auto Summary**: Get an AI-generated summary
   * **Custom Prompt**: Tell the AI exactly what to extract
   * **Structured Output**: Extract data into a specific JSON format

<Accordion title="Example: Extract and summarize an article">
  ```
  Operation: Extraction
  URLs: "https://example.com/article"
  Summary Mode: Auto Summary
  Options:
    - Response Length: Medium
  ```
</Accordion>

### Answer

Use Answer when you need a quick, AI-generated response to a question. It automatically searches for relevant information and synthesizes an answer.

**Basic usage:**

1. Select **Answer** as the operation
2. Enter your question
3. Choose **Output Type**:
   * **Text**: Get a plain text answer
   * **Structured JSON**: Get the answer in a specific format you define

<Accordion title="Example: Get a quick answer">
  ```
  Operation: Answer
  Question: "What are the main benefits of solar energy?"
  Output Type: Text
  Options:
    - Fast Mode: Yes (for quicker responses)
  ```
</Accordion>

### Deep Research

Use Deep Research for thorough, comprehensive research that might take several minutes but produces detailed reports.

**Basic usage:**

1. Select **Deep Research** as the operation
2. Enter your research query
3. Choose a **Mode**:
   * **Standard (10-20 min)**: For balanced research questions
   * **Heavy (15-30 min)**: For complex, multi-faceted topics

The node will wait for the research to complete and return the full report.

<Accordion title="Example: Research a market">
  ```
  Operation: Deep Research
  Research Query: "Analyze the electric vehicle market in Europe, including major players, market share, and growth trends"
  Mode: Heavy
  Options:
    - Output Formats: Markdown, PDF
    - Strategy: "Focus on data from 2023-2024. Include specific statistics and cite sources."
  ```
</Accordion>

## Example Workflows

### Automated News Digest

Create a daily digest of news on topics you care about:

1. **Schedule Trigger** → Runs every morning at 8am
2. **Valyu (Search)** → Search for "AI news" with News search type
3. **Valyu (Answer)** → Summarize the key stories
4. **Send Email** → Email yourself the digest

### Website Content Monitor

Track changes to competitor websites:

1. **Schedule Trigger** → Runs weekly
2. **Valyu (Extraction)** → Extract content from competitor URLs
3. **Compare** → Check against previous extraction
4. **Slack** → Notify if changes detected

### Research Assistant

Build a research pipeline for market analysis:

1. **Webhook Trigger** → Receive research requests
2. **Valyu (Deep Research)** → Run comprehensive research
3. **Google Sheets** → Save report to a spreadsheet
4. **Slack** → Notify when complete with link to report

## Troubleshooting

<AccordionGroup>
  <Accordion title="Node not appearing after installation">
    Try restarting your n8n instance. If using Docker, restart the container.
  </Accordion>

  <Accordion title="Authentication errors">
    Double-check your API key is correct. Make sure there are no extra spaces when you paste it.
  </Accordion>

  <Accordion title="Deep Research timing out">
    Deep Research can take up to 30 minutes for Heavy mode. Make sure your n8n workflow timeout settings allow for long-running operations.
  </Accordion>

  <Accordion title="Rate limiting">
    If you're hitting rate limits, add a small delay between Valyu node executions using the Wait node.
  </Accordion>
</AccordionGroup>

## Resources

<CardGroup cols={2}>
  <Card title="npm Package" icon="npm" href="https://www.npmjs.com/package/n8n-nodes-valyu">
    View the package on npm
  </Card>

  <Card title="GitHub Repository" icon="github" href="https://github.com/valyuAI/n8n-nodes-valyu">
    Source code and issues
  </Card>

  <Card title="n8n Community Nodes Docs" icon="book" href="https://docs.n8n.io/integrations/community-nodes/installation/">
    Official n8n documentation on installing community nodes
  </Card>

  <Card title="Valyu Discord" icon="discord" href="https://discord.gg/umtmSsppRY">
    Get help from the community
  </Card>
</CardGroup>
