FM
FlowMarket
AI Agents Intermediate ⚡ 14 n8n Nodes

Search the web with MCP based Brave Search Engine on Telegram

This workflow enables users to perform web searches directly from Telegram using the Brave search engine. By simply sending the command /brave followed by a ...

🔌 Nodes & Integrations Used (3)

Mcp Client Telegram Telegram Trigger

📖 Implementation & Setup Guide

This workflow enables users to perform web searches directly from Telegram using the Brave search engine. By simply sending the command /brave followed by a query, the workflow retrieves search results from Brave and returns them as a Telegram message.

This workflow is ideal for users who want a quick and private way to search the web without switching between apps. 🚀

This workflow is a powerful tool for automating interactions with Brave tools through Telegram, providing users with quick and easy access to information directly in their chat.

Below is a breakdown of the workflow:

---

#### **1. How It Works** The workflow is designed to process user queries from Telegram, execute a Brave tool via the MCP Client, and send the results back to the user. Here's how it works:

  1. **Telegram Trigger**:
  2. - The workflow starts with the **Telegram Trigger** node, which listens for new messages in a Telegram chat.
  3. - When a message is received, the workflow checks if it starts with the command `/brave`.

2. **Filter Messages**: - The **If** node filters messages that start with `/brave`. If the message doesn't start with `/brave`, the workflow stops.

3. **Edit Fields**: - The **Edit Fields** node extracts the text of the message for further processing.

4. **Clean Query**: - The **Clean Query** node removes the `/brave` command from the message, leaving only the user's query.

5. **List Brave Tools**: - The **List Brave Tools** node retrieves the list of available tools from the MCP Client.

6. **Execute Brave Tool**: - The **Exec Brave Tool** node executes the first tool in the list using the cleaned query as input.

7. **Send Message**: - The **Send Message** node sends the result of the Brave tool execution back to the user in the Telegram chat.

---

#### **2. Preliminary Steps** - Access to an n8n self-hosted instance and install the Community node "n8n-nodes-mcp". Please see this [easy guide](https://github.com/nerding-io/n8n-nodes-mcp) - Get your Brave Search API Key: https://brave.com/search/api/ - Telegram Bot Access Token

In "List Brave Tools" create new credential as shown in this image

In Environment field set this value: BRAVE_API_KEY=your-api-key

---

#### **3. Set Up Steps** To set up and use this workflow in n8n, follow these steps:

  1. **Telegram Configuration**:
  2. - Set up **Telegram** credentials in n8n for the **Telegram Trigger** and **Send Message** nodes.
  3. - Ensure the Telegram bot is authorized to read messages and send responses in the chat.

2. **MCP Client Configuration**: - Set up **MCP Client** credentials in n8n for the **List Brave Tools** and **Exec Brave Tool** nodes. - Ensure the MCP Client is configured to interact with Brave tools.

3. **Test the Workflow**: - Send a message starting with `/brave` followed by a query (e.g., `/brave search for AI tools`) to the Telegram chat. - The workflow will: - Process the query. - Execute the Brave tool via the MCP Client. - Send the result back to the Telegram chat.

4. **Optional Customization**: - Modify the workflow to include additional features, such as: - Adding more commands or tools. - Integrating with other APIs or services for advanced use cases. - Sending notifications via other channels (e.g., email, Slack)

---

**Need help customizing?** [Contact me](mailto:info@n3w.it) for consulting and support or add me on [Linkedin](https://www.linkedin.com/in/davideboizza/).

⚡ How to import this workflow into n8n:

  1. Click the Direct Download JSON button above to save Search_the_web_with_MCP_based_Brave_Search_Engine_on_Telegram.json.
  2. Log in to your n8n Cloud or self-hosted n8n instance.
  3. In your workflow canvas, click the menu in top-right and select Import from File (or paste the JSON directly).
  4. Configure your credentials (e.g. API keys, database URLs) in the corresponding node settings.
  5. Click Execute Workflow to test and switch to Active!

Related AI Agents Workflows

View All in AI Agents →