Skip to main content
S

Sergey Skorobogatov

3
Workflows

Workflows by Sergey Skorobogatov

Workflow preview: Generate stock market insights with technical analysis, AI, and Telegram publishing
Free advanced

Generate stock market insights with technical analysis, AI, and Telegram publishing

# 📈 AI Stock Analytics & BCS "Profit" Social Network Publishing Workflow This workflow automatically generates stock market insights for selected tickers (e.g. GAZP, SBER, LKOH) using historical data, technical indicators, and an AI model. The results are then sent to Telegram for quick moderation and publishing. ## 🔑 What this workflow does - **Runs twice a day** on a schedule with a predefined list of tickers. - **Fetches historical market data** from a broker API. - **Calculates key technical indicators** (RSI, EMA/SMA, MACD, Bollinger Bands, ADX). - **Generates an investment post** (title + summary) using an LLM. - **Stores results** in a PostgreSQL database. - **Sends a draft post to Telegram** with inline buttons *“Publish”* and *“Retry”*. - **Handles Telegram actions**: publishes the post to the final channel or re-runs the generation process. ## 📌 Key features - Multi-ticker support in a single run. - Automatic error handling (e.g. missing data or invalid AI JSON output). - Human-in-the-loop moderation through Telegram before publishing. - PostgreSQL integration for history and analytics storage. - Flexible structure: easy to extend with new tickers, indicators, or publishing channels. ## 🛠️ Nodes used - **Trigger:** Schedule (twice daily) + Telegram Trigger (button callbacks). - **Data:** HTTP Request (broker API), Function (technical analysis calculations). - **AI:** OpenAI / OpenRouter with structured JSON output. - **Storage:** PostgreSQL (analytics history). - **Messaging:** Telegram (drafts and publishing). ## 🚀 Who is this for - Fintech startups looking to automate market content. - Investment bloggers posting daily stock analysis. - Analysts experimenting with trading strategies on real market data.

S
Sergey Skorobogatov
Crypto Trading
1 Sep 2025
1066
0
Workflow preview: Create a Witty Telegram Bot with AI-Powered Humor, Roasts & Stats using OpenRouter
Free advanced

Create a Witty Telegram Bot with AI-Powered Humor, Roasts & Stats using OpenRouter

# GiggleGPTBot — Witty Telegram Bot with AI & Postgres ## 📝 Overview GiggleGPTBot is a witty Telegram bot built with **n8n**, **OpenRouter**, and **Postgres**. It delivers short jokes, motivational one-liners, and playful roasts, responds to mentions, and posts scheduled witty content. The workflow also tracks user activity and provides lightweight statistics and leaderboards. --- ## ✨ Features * 🤖 **AI-powered humor engine** — replies with jokes, motivation, random witty lines, or sarcastic roasts. * 💬 **Command support** — `/joke`, `/inspire`, `/random`, `/roast`, `/help`, `/stats`, `/top`. * 🎯 **Mention detection** — replies when users tag `@GiggleGPTBot`. * ⏰ **Scheduled posts** — morning jokes, daily motivation, and random wisdom at configured times. * 📊 **User analytics** — counts messages, commands, reactions, and generates leaderboards. * 🗄️ **Postgres persistence** — robust schema with tables for messages, responses, stats, and schedules. --- ## 🛠️ How It Works 1. **Triggers** * `Telegram Trigger` — receives all messages and commands from a chat. * `Schedule Trigger` — runs hourly to check for planned posts. 2. **Processing** * `Switch` routes commands (`/joke`, `/inspire`, `/random`, `/roast`, `/help`, `/stats`, `/top`). * `Chat history` fetches the latest context. * `Mention Analysis` determines if the bot was mentioned. * `Generating an information response` builds replies for `/help`, `/stats`, `/top`. * AI nodes (`AI response to command`, `AI response to mention`, `AI post generation`) craft witty content via **OpenRouter**. 3. **Persistence** * `Init Database` ensures tables exist (`user_messages`, `bot_responses`, `bot_commands`, `message_reactions`, `scheduled_posts`, `user_stats`). * Logging nodes update stats and store every bot/user interaction. 4. **Delivery** * Replies are sent back via `Telegram Send` nodes (`Send AI response`, `Send info reply`, `Reply to Mention`, `Submit scheduled post`). --- ## ⚙️ Setup Instructions 1. **Create a Telegram Bot** with [@BotFather](https://t.me/BotFather) and get your API token. 2. **Add credentials** in n8n: * `Telegram API` (your bot token) * `OpenRouter` (API key from [openrouter.ai](https://openrouter.ai/)) * `Postgres` (use your DB, Supabase works well). 3. **Run the `Init Database` node once** to create all required tables. 4. **(Optional) Seed schedule** with the `Adding a schedule` node — it inserts: * Morning joke at 06:00 * Daily motivation at 09:00 * Random wisdom at 17:00 (Adjust `chat_id` to your group/channel ID.) 5. **Activate workflow** and connect Telegram Webhook or Polling. --- ## 📊 Database Schema * **user\_messages** — stores user chat messages. * **bot\_responses** — saves bot replies. * **bot\_commands** — logs command usage. * **message\_reactions** — tracks reactions. * **scheduled\_posts** — holds scheduled jokes/wisdom/motivation. * **user\_stats** — aggregates per-user message/command counts and activity. --- ## 🔑 Example Commands * `/joke` → witty one-liner with light irony. * `/inspire` → short motivational phrase. * `/random` → unexpected witty remark. * `/roast` → sarcastic roast (no offensive targeting). * `/stats` → shows your personal stats. * `/top` → displays leaderboard. * `/help` → lists available commands. * `@GiggleGPTBot` + message → bot replies in context. --- ## 🚀 Customization Ideas * Add new command categories (`/quote`, `/fact`, `/news`). * Expand analytics with reaction counts or streaks. * Localize prompts into multiple languages. * Adjust CRON schedules for posts. --- ## ✅ Requirements * Telegram Bot token * OpenRouter API key * Postgres database --- 📦 Import this workflow, configure credentials, run the DB initializer — and your witty AI-powered Telegram companion is ready!

S
Sergey Skorobogatov
AI Chatbot
20 Aug 2025
218
0
Workflow preview: Payment processing and order tracking with YooKassa and Google Sheets
Free advanced

Payment processing and order tracking with YooKassa and Google Sheets

# Accept YooKassa payments and log transactions in Google Sheets ## 🧾 Summary This workflow allows you to accept online payments via **YooKassa** and log both orders and transactions in **Google Sheets** — all without writing a single line of code. It supports full payment flow: product selection, payment initiation, webhook processing, refund updates, and payment status checks. --- ## 👥 Who is this for? This template is ideal for: * Online stores with simple checkout flows * Sellers of digital products or info-courses * Entrepreneurs using Telegram bots or web forms * Anyone needing quick payment integration with Google Sheets tracking --- ## 🎯 What problem does this workflow solve? Setting up online payments usually requires backend infrastructure. This no-code solution automates the entire payment flow: * Handles product listing and price retrieval * Initiates payments with email and return URL * Listens for `payment.succeeded` and `refund.succeeded` events * Records every action into structured Google Sheets --- ## ⚙️ What this workflow does ### 1. **GET /products** Returns a sorted list of products from a Google Sheet (`products`). ### 2. **POST /payment** * Validates required fields (`product_id`, `email`, `return_url`) * Checks email format * Fetches product data from `products` * Generates a unique idempotence key * Sends a request to YooKassa API * Saves the order into the `orders` sheet * Returns a payment confirmation link ### 3. **POST /yoomoney** Webhook to process payment/refund events: * On `payment.succeeded`, adds entry to `transactions` * On `refund.succeeded`, updates transaction status ### 4. **GET /status/\:id** Returns real-time payment status from YooKassa --- ## 🚀 Setup 1. **Connect credentials:** * Google Sheets (OAuth2) * YooKassa (Basic Auth using `shopId` and `secretKey`) 2. **Update the following Google Sheets:** * `products`: should contain `product_id`, `title`, `price` * `orders`: for saving confirmed purchases * `transactions`: for logging all successful or refunded payments 3. **Test endpoints using any HTTP client**: Example payload for `/payment`: ```json { "product_id": "abc123", "email": "[email protected]", "return_url": "https://your.site/success" } ``` --- ## 🔧 How to customize this workflow * Add delivery logic (e.g., email with product link after successful payment) * Replace Google Sheets with a database (e.g., PostgreSQL) * Connect Telegram or other messengers for post-payment notifications * Add promo codes, discounts, or subscriptions logic --- ## 💼 Use cases * Simple online checkouts * Telegram bots selling access * Educational product sales * MVP e-commerce flows * Donation or membership payments --- ## 📎 Notes ✅ Includes Sticky Notes for sections ✅ Includes error handling and validation ✅ No custom code needed except UUID generation

S
Sergey Skorobogatov
CRM
7 Jun 2025
903
0