All templates

Communication

Reply to Telegram Profanity

Score Telegram text with Perspective and reply to messages with a profanity score above 0.7.

Reply to Telegram Profanity workflow in Open FlowReply to Telegram Profanity workflow in Open Flow

Score Telegram text with Perspective and reply to messages with a profanity score above 0.7.

Setup

Connect a Telegram bot and enable persistent State. Perspective requires existing API access: new access requests closed in February 2026 and the service ends on December 31, 2026. In Open Flow bind an OAuth access token from an authorized Google Cloud project to the secret Variable PERSPECTIVE_ACCESS_TOKEN.

Behavior

For text in a new or edited message or channel post, send the text to Perspective in English and request identity attack, threat and profanity scores. Only a profanity score strictly above 0.7 triggers the fixed reply to the same chat and message. Other scores do not trigger a reply. Scores can be mistaken; review the threshold and bot permissions before use.

In Open Flow an uncertain reply remains pending in State under its Telegram update ID; inspect the chat before clearing the entry or retrying.

In n8n

In n8n connect the Perspective OAuth credential and Telegram bot. In n8n inspect the chat before retrying an uncertain send.

Inspiration & credits

Changes to the source

Handle all four selected Telegram update types and ignore non-text updates. Protect uncertain Open Flow replies from automatic replay.

Adapted from Detect toxic language in Telegram messages in enescingoz/awesome-n8n-templates.

Source collection notice: © 2024–2026 Enes Cingoz, CC BY 4.0. The source export does not identify a separate template author or license. See repository licensing for the scope of OOMOL contributions and third-party material.