Skip to main content

Send Taiwan stock pre-market briefings using TWSE, CNYES, OpenAI and Telegram

Workflow preview

Workflow preview
100%
Send Taiwan stock pre-market briefings using TWSE, CNYES, OpenAI and Telegram preview
Open on n8n.io

1. Workflow Overview

Quick overview This workflow runs every weekday morning, fetches the latest available TWSE institutional trading and market data plus CNYES headlines, summarizes it with OpenAI into a short briefin...

Best for

  • Crypto Trading automation workflows
  • AI Summarization automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.stickynote, n8n-nodes-base.scheduletrigger, n8n-nodes-base.set, n8n-nodes-base.code, n8n-nodes-base.httprequest, n8n-nodes-base.merge, @n8n/n8n-nodes-langchain.openai, n8n-nodes-base.telegram

Source and attribution

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

Original n8n.io source

1.1 Workflow description

Title
Send Taiwan stock pre-market briefings using TWSE, CNYES, OpenAI and Telegram
Workflow name
Send Taiwan stock pre-market briefings using TWSE, CNYES, OpenAI and Telegram

Quick overview

This workflow runs every weekday morning, fetches the latest available TWSE institutional trading and market data plus CNYES headlines, summarizes it with OpenAI into a short briefing, and sends the result as plain text to a Telegram chat.

How it works

  1. Runs on a cron schedule at 08:00 Monday to Friday in Asia/Taipei.
  2. Determines the most recent trading day by checking TWSE availability for prior weekdays.
  3. Pulls TWSE institutional net buy/sell data (T86), TWSE market close data (MI_INDEX) to derive index and limit up/down counts, and the latest CNYES headline news.
  4. Normalizes and validates the fetched datasets, falls back to “no data” messages when sources are unavailable, and prepares prompt variables including an optional watchlist.
  5. Sends the prepared data to OpenAI (gpt-4o-mini) to generate a structured JSON briefing with a required risk disclaimer.
  6. Formats the AI JSON into a plain-text message and sends it to the configured Telegram chat via a Telegram bot.

Setup

  1. Create and select an OpenAI API credential (API key) for the OpenAI node.
  2. Create and select a Telegram Bot credential (BotFather token) for the Telegram node.
  3. Message your bot, retrieve the target chat ID via https://api.telegram.org/bot<TOKEN>/getUpdates, and paste it into telegramChatId in the Config step.
  4. Optionally adjust topN, promptStyle, and watchlist, then run a manual execution to verify output before activating the schedule.

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 - Sticky Note

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

Block 2 - Sticky Note1

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

Block 3 - Sticky Note2

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

Block 4 - Sticky Note3

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

Block 5 - Sticky Note4

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

Block 6 - Sticky Note5

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

Block 7 - When Pre-Market Brief

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

Block 8 - Set Configuration Parameters

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 9 - Calculate Trading Date

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

Block 10 - Fetch TWSE Fund Data

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

Block 11 - Fetch TWSE Market Index

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

Block 12 - Fetch CNYES Headlines

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

Block 13 - Merge Fetched Data

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

Block 14 - Format for AI Prompt

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

Block 15 - AI Summary Generation

Type / Role
@n8n/n8n-nodes-langchain.openAi - openAi
Config choices
Version 1.8

Block 16 - Compose Telegram Message

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

Block 17 - Send to Telegram Chat

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

3. Summary Table

Workflow Send Taiwan stock pre-market briefings using TWSE, CNYES, OpenAI and Telegram
Complexity advanced
Nodes 17
Categories Crypto Trading, AI Summarization
Author floviq
Published 24 May 2026

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/15928/15928.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 Send Taiwan stock pre-market briefings using TWSE, CNYES, OpenAI and Telegram do?

Quick overview This workflow runs every weekday morning, fetches the latest available TWSE institutional trading and market data plus CNYES headlines, summarizes it with OpenAI into a short briefin...

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 Crypto Trading, AI Summarization use case.