๐ Send weekly Taiwan foreign flow reports to Telegram using TWSE T86
โก 14 views ยท ๐ Crypto Trading & Stock Market
Description
Quick overview
This workflow runs every Monday morning and pulls last weekโs TWSE T86 institutional trading data, aggregates foreign investor net flows into weekly leaders and streaks, and sends a plain-text report to a Telegram chat.
How it works
- Runs every Monday at 08:00 Asia/Taipei on a schedule.
- Loads configuration values such as the target Telegram chat ID, list sizes (Top N), streak threshold, and a holiday skip list.
- Calculates last Monday to last Friday dates and removes any days listed as market holidays.
- Requests the TWSE public T86 institutional trading report for each remaining trading date and ignores days where TWSE returns no data.
- Aggregates the weekโs data to compute foreign investor weekly net-buy and net-sell leaders plus consecutive buy/sell streak lists based on the configured threshold.
- Formats the results into a plain-text Telegram message with data source notes and a risk disclaimer, then sends it via your Telegram bot.
Setup
- Create a Telegram bot with BotFather and add the bot token to an n8n Telegram credential.
- Set your target
telegramChatId(and optionallytopN,consecutiveThreshold, andholidaySkipList) in the configuration step. - Confirm the schedule time zone (Asia/Taipei) and weekly cron timing, run it once with Execute to confirm the Telegram message arrives, then activate the workflow.
๐ Nodes Used
HTTP Request, Telegram, Schedule Trigger
๐ฅ Import
Download workflow.json and import into n8n:
Workflow menu โ Import from File