Skip to main content

Provide Telegram astrology readings with Supabase, Astrology API and Gemini

Workflow preview

Workflow preview
100%
Provide Telegram astrology readings with Supabase, Astrology API and Gemini preview
Open on n8n.io

1. Workflow Overview

Quick Overview This workflow powers a Telegram astrology bot that manages chat sessions in Supabase, calculates natal or synastry charts via AstrologyAPI using location and timezone lookups, and us...

Best for

  • Support Chatbot automation workflows
  • AI Chatbot automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.telegramtrigger, n8n-nodes-base.supabase, n8n-nodes-base.code, n8n-nodes-base.if, n8n-nodes-base.httprequest, n8n-nodes-base.googledrive, n8n-nodes-base.telegram, @n8n/n8n-nodes-langchain.agent

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Salome Tkhilaishvili.

Original n8n.io source

1.1 Workflow description

Title
Provide Telegram astrology readings with Supabase, Astrology API and Gemini
Workflow name
Provide Telegram astrology readings with Supabase, Astrology API and Gemini

Quick Overview

This workflow powers a Telegram astrology bot that manages chat sessions in Supabase, calculates natal or synastry charts via AstrologyAPI using location and timezone lookups, and uses Google Gemini (via an n8n AI Agent) plus reference text from Google Drive to craft responses back to Telegram.

How it works

  1. Receives incoming Telegram messages and callback queries from users.
  2. Looks up the user’s session in Supabase by chat ID and routes the conversation through a state machine to collect either natal or synastry birth details.
  3. Inserts or updates the session state and collected inputs in Supabase, and sends the next prompt/status message back to the user in Telegram.
  4. When enough birth data is provided, parses the intake text, geocodes the city with OpenStreetMap Nominatim, and fetches a timezone offset from the GeoNames Timezone API.
  5. Calls AstrologyAPI (western_horoscope or synastry_horoscope) with the computed coordinates and timezone to generate chart data.
  6. Downloads a JSON reference file from Google Drive and merges it with the live chart output to build an analysis context.
  7. Sends the user prompt plus context to a Google Gemini chat model through an AI Agent with memory, logs the reading metadata to Supabase, and posts the final formatted response to Telegram.

Setup

  1. Add Telegram bot credentials and set the bot webhook in n8n so Telegram can deliver updates to the Telegram Trigger.
  2. Add Supabase credentials and create the required tables/fields (sessions with chat_id, state, mode, p1_data, p2_data; and astrology_readings for logging).
  3. Add HTTP Basic Auth credentials for AstrologyAPI and confirm the endpoint URLs match your AstrologyAPI plan (western_horoscope and synastry_horoscope).
  4. Provide a valid GeoNames username in the timezone request, and ensure outbound HTTP access to OpenStreetMap Nominatim and GeoNames from your n8n instance.
  5. Add Google Drive OAuth credentials and update the Google Drive file ID for the reference JSON (synastry.json) if you use a different file.
  6. Add Google Gemini (PaLM) API credentials for the chat model used by the AI Agent.

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Telegram Trigger

Type / Role
n8n-nodes-base.telegramTrigger - telegramTrigger
Config choices
Version 1.1

Block 2 - Supabase: Get Session

Type / Role
n8n-nodes-base.supabase - supabase
Config choices
Version 1

Block 3 - Logic Engine

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 4 - Record Exists?

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 5 - Supabase: Update Session

Type / Role
n8n-nodes-base.supabase - supabase
Config choices
Version 1

Block 6 - Supabase: Insert Session

Type / Role
n8n-nodes-base.supabase - supabase
Config choices
Version 1

Block 7 - Is Pure Chat?

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 8 - Calculate Reading Now?

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 9 - Parse Intake Data

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 10 - Get Coordinates

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.1

Block 11 - Get Timezone Offset

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.1

Block 12 - Astrology API Engine

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.1

Block 13 - Download RAG JSON

Type / Role
n8n-nodes-base.googleDrive - googleDrive
Config choices
Version 3

Block 14 - Final Similarity Filter

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 15 - Supabase: Log Reading History

Type / Role
n8n-nodes-base.supabase - supabase
Config choices
Version 1

Block 16 - Telegram Bot Response

Type / Role
n8n-nodes-base.telegram - telegram
Config choices
Version 1.2

Block 17 - Send a text message

Type / Role
n8n-nodes-base.telegram - telegram
Config choices
Version 1.2

Block 18 - Code in JavaScript

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 19 - Prepare input for natal/synastry calculation

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 20 - Convert service output to context

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 21 - AI Agent

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 3.1

Block 22 - Google Gemini Chat Model1

Type / Role
@n8n/n8n-nodes-langchain.lmChatGoogleGemini - lmChatGoogleGemini
Config choices
Version 1.1

Block 23 - Simple Memory

Type / Role
@n8n/n8n-nodes-langchain.memoryBufferWindow - memoryBufferWindow
Config choices
Version 1.4

Block 24 - Prepare data for agent

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Showing the first 24 of 29 workflow blocks. Download the JSON for the full node graph.

3. Summary Table

Workflow Provide Telegram astrology readings with Supabase, Astrology API and Gemini
Complexity advanced
Nodes 29
Categories Support Chatbot, AI Chatbot
Author Salome Tkhilaishvili
Published 25 May 2026

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/15944/15944.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Provide Telegram astrology readings with Supabase, Astrology API and Gemini do?

Quick Overview This workflow powers a Telegram astrology bot that manages chat sessions in Supabase, calculates natal or synastry charts via AstrologyAPI using location and timezone lookups, and us...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Support Chatbot, AI Chatbot use case.