This workflow tracks upcoming subscription expiry dates stored in Supabase and automatically sends personalized renewal-reminder messages to each customer via Telegram. It is designed to be triggered by an HTTP Webhook (manually or on a schedule) and ensures that customers are notified a configurable number of days before their subscription lapses.
Community Template Disclaimer
This is a community-contributed n8n workflow template. It is provided “as-is” without official support from n8n GmbH. Always test thoroughly before using in production.
subscriptions tableid, customer_name, expiration_date, telegram_chat_id, notified)subscriptions table(ScrapeGraphAI API Key is not required for this non-scraping workflow.)
| Environment Variable | Example Value | Purpose |
|---|---|---|
SUPABASE_URL |
https://xyzcompany.supabase.co |
Base URL for Supabase REST API |
SUPABASE_KEY |
eyJhbGciOiJI... |
Service Role Key |
TELEGRAM_TOKEN |
609012345:AA... |
Bot token obtained from BotFather |
REMINDER_DAYS |
3 |
Days before expiry to notify |
This workflow tracks upcoming subscription expiry dates stored in Supabase and automatically sends personalized renewal-reminder messages to each customer via Telegram. It is triggered by an HTTP Webhook (manually or via external scheduler) and ensures that customers are notified a configurable number of days before their subscription lapses.
Setup Time: 15–20 minutes
Create Telegram Bot
a. Open Telegram and talk to @BotFather → /newbot
b. Copy the given bot token; paste it into n8n Telegram credentials.
Prepare Supabase
a. Create a table named subscriptions with columns:
id (uuid), customer_name (text), expiration_date (date),
telegram_chat_id (text), notified (bool, default false)
b. Obtain the Service Role Key from Project Settings → API.
Import the Workflow
a. In n8n, click Templates → Import and select “Subscription Renewal Reminder – Telegram & Supabase”.
b. Replace placeholder credentials in the Supabase and Telegram nodes.
Define Environment Variables (Optional but recommended)
Add SUPABASE_URL, SUPABASE_KEY, TELEGRAM_TOKEN, and REMINDER_DAYS in Settings → Environment Variables for easy maintenance.
Activate the Workflow
Copy the production webhook URL and (optionally) set up a cron job or n8n Cron node to hit it daily.
targetDate = today + REMINDER_DAYS.notified = true.// Replace Telegram node with Slack node
const message = `Hi ${item.customer_name}, your subscription expires on ${item.expiration_date}.`;
return [{ text: message, channel: item.slack_channel_id }];
// In Set node
items[0].json.reminderOffsets = [7, 1]; // days
return items;
The workflow outputs structured JSON data:
{
"totalSubscriptionsChecked": 42,
"remindersSent": 13,
"timestamp": "2024-05-27T09:15:22.000Z"
}
If node; ensure REMINDER_DAYS is set correctly and the Supabase query returns rows.Pro Tips: