Telegram Restaurant Finder using Google Maps and SerpAPI - n8n Workflow

Find the best local restaurants instantly via Telegram. This n8n workflow uses a Telegram n8n trigger and SerpAPI to search Google Maps data, sort results by rating, and format a beautiful response.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

Technical users running personal Telegram bots.
Businesses needing automated location-based information services.
Users looking for advanced n8n templates integrating APIs like SerpAPI and Nominatim.
Developers learning how to combine Telegram functionality with complex external data sources in an n8n workflow.

Overview

Finding reliable, top-rated restaurants quickly often requires navigating multiple applications. This sophisticated n8n workflow streamlines that process by turning a simple Telegram message into a powerful, localized Google Maps search via SerpAPI. It eliminates manual searching, providing the user with the top five highly-rated restaurants, complete with service options, contact details, and a direct map link, all within the familiar Telegram interface. This specific n8n node configuration ensures the data is sorted for immediate relevance, making it an excellent example of efficient automation and demonstrating the power of n8n templates.

How it Works

The process begins with the Telegram n8n trigger, which activates upon receiving a message, typically formatted as /rest [Area Name].


  1. Input Parsing: The Parse Area function n8n node extracts the desired geographic area from the incoming Telegram text. If the area is not specified, it defaults to a predefined location.

  2. Geocoding: The flow utilizes the Geocode (Nominatim) n8n node to look up the geographical context of the parsed area.

  3. Data Retrieval: The Find Restaurants (SerpAPI) n8n node executes an HTTP request to SerpAPI, performing a specialized Google Maps search for "restaurants" within the specified area and pre-configured country (using an environment variable). This step requires a valid API key set up in the n8n environment.

  4. Formatting and Sorting: The Format Reply function n8n node processes the SerpAPI results. It sorts the results by the highest rating, selects the top 5 entries, and meticulously formats the data into a clean, easy-to-read Markdown string tailored for Telegram. This includes dynamic generation of Google Maps links and clear icons for dining options.

  5. Output: Finally, the Send to Telegram n8n node transmits the compiled, attractive list back to the original chat, completing the automated n8n workflow cycle. This flexible n8n node ensures rapid communication.

Installation Guide

To use this n8n workflow template effectively, follow these steps:


  1. Import: Copy the provided JSON and import it into your n8n instance.

  2. Credentials Setup:

Telegram: Create or update your Telegram API credentials within n8n. This is crucial for the Telegram n8n trigger and the final output node.
SerpAPI: Set up your SerpAPI credentials if you don't have them already.

  1. Environment Variables: This n8n workflow relies heavily on global environment variables for security and flexibility. Configure the following variables in your n8n settings:

telegramchannelid: The ID of the chat or channel the n8n trigger should monitor.
serpapikey: Your personal API key for SerpAPI.
* country_name: The context country for the search (e.g., 'Egypt', 'USA').

  1. Activation: Set the Telegram Trigger n8n node to active and save the n8n workflow. It is now ready to respond to messages using the /rest command.

Node Details

This n8n workflow utilizes several key node types for successful execution:

Telegram Trigger (n8n trigger):
Function: Listens for incoming messages in a configured Telegram chat, initiating the n8n workflow.
Key Configuration: Updates set to message; monitors a specific telegramchannelid environment variable.
Parse Area (Function n8n node):
Function: Extracts the area name from the Telegram message using custom JavaScript logic, cleaning the input for the API calls.
Key Configuration: Custom code removes the command prefix (/rest).
Geocode (Nominatim) (HTTP Request n8n node):
Function: Converts the parsed area name into geographical data using the Nominatim API.
Key Configuration: Searches for the area defined by the previous n8n node.
Find Restaurants (SerpAPI) (HTTP Request n8n node):
Function: Sends a localized search query to the SerpAPI service, targeting the Google Maps engine to retrieve top restaurant listings.
Key Configuration: Uses engine=Maps, combines $env.countryname and the area name in the query, and submits the $env.serpapi_key.
Format Reply (Function n8n node):
Function: This crucial n8n node manipulates the raw JSON data, sorts the results by rating, selects the top five, and constructs a polished Markdown response tailored for Telegram.
Key Configuration: Contains sorting logic, dynamic URL creation for Google Maps links, and formatting for open/closed status and service options.
Send to Telegram (Telegram n8n node):
* Function: Transmits the finalized, formatted Markdown message back to the originating chat, completing the requested action.

Related n8n Workflows

Free

Nodes: 5 Nodes
Updated: December 26 2025
View all
Created by

Featured*