Clean up Telegram when Docs are restructured
A Google Doc gets a major structural overhaul. This automation detects the change and deletes old reference messages in Telegram, so the channel stays current with the doc's new shape.
Trigger
Document Structure Changed
Triggers when a Google Doc's structure changes (headers/footers added/removed, tables/images count changes). This trigger monitors a specific document for structural changes like: - Headers added or removed - Footers added or removed - Tables added or removed - Images (inline objects) added or removed - Positioned objects added or removed - Footnotes added or removed
Action
Delete Message
Delete a message, including service messages, with certain limitations.
Why this helps
You post links and references in Telegram about a doc's structure. Then someone reorganizes the entire doc, making your references obsolete. The old messages linger, confusing the team.
- Keep Telegram references accurate and current
- Reduce confusion from stale messages
- Automate channel maintenance
Setup
Build it in a few focused steps.
- 1Connect Google Docs and Telegram to Notis.
- 2Tell Notis: 'When my Google Doc is restructured (new sections added or removed), delete the old reference message in Telegram.'
- 3Identify the specific messages to delete or create a naming pattern Notis can recognize.
- 4Select 'Document Structure Changed' as the trigger.
- 5Restructure the doc (add a major section) and verify the old message is deleted from Telegram.
Questions about this workflow
How does Notis know which messages to delete?
You specify message IDs, or tell Notis to delete messages with specific keywords (e.g., 'outdated' or 'version 1').
Can I archive the message instead of deleting it?
Yes. Ask Notis to move it to a pinned/archive thread before deleting from the main channel.
What if the doc structure changes but I want to keep the reference?
Create a separate automation that updates the message instead of deleting it. Notis can do both.
When this happens · Trigger
Do this · Action
Supported Triggers and Actions
Notis builds workflows that link Google Docs to Telegram. A trigger fires from one place; an action lands in another.
Google Docs triggers
Telegram actions
New Document Created
Triggers when a new Google Doc is created. This trigger monitors Google Docs and fires when new documents are detected. Uses timestamp filtering to efficiently poll for new documents.
Answer Callback Query
Use this method to send answers to callback queries sent from inline keyboards. the answer will be displayed to the user as a notification at the top of the chat screen or as an alert.
Document Deleted
Triggers when an existing Google Doc is deleted (moved to trash). This trigger monitors Google Docs and fires when documents are trashed.
Delete Message
Delete a message, including service messages, with certain limitations.
Document Placeholder Filled
Triggers when a Google Doc's plain text changes such that a configured placeholder token/pattern is no longer present (i.e., the document has been filled in). This trigger monitors a specific Google Doc and fires when a placeholder pattern that was previously present is no longer found in the document's plain text.
Edit Message
Edit text messages sent by the bot.
Document Search Update
Triggers when a Google Doc matching a user-defined search query is newly created or updated since the last poll. This trigger uses timestamp filtering to efficiently monitor documents.
Export Chat Invite Link
Generate a new primary invite link for a chat; any previously generated primary link is revoked. the bot must be an administrator in the chat for this to work and must have the appropriate administrator rights.
Document Structure Changed
Triggers when a Google Doc's structure changes (headers/footers added/removed, tables/images count changes). This trigger monitors a specific document for structural changes like: - Headers added or removed - Footers added or removed - Tables added or removed - Images (inline objects) added or removed - Positioned objects added or removed - Footnotes added or removed
Forward Message
Forward messages of any kind. service messages can't be forwarded.
Document Updated
Triggers when an existing Google Doc is updated or modified. This trigger monitors Google Docs and fires when documents are updated.
Get Chat Info
Get up to date information about the chat (current name of the user for one-on-one conversations, current username of a user, group or channel, etc.).
Document Word Count Threshold
Triggers when a Google Doc's word/character count crosses a user-defined threshold. This trigger monitors a specific Google Doc and fires when its word or character count becomes greater than or equal to the configured threshold value.
Get Chat Administrators
Get a list of administrators in a chat. on success, returns an array of chatmember objects that contains information about all chat administrators except other bots.
New Folder Created in Root
Triggers when a new folder is created in the root folder of Google Drive. This trigger monitors Google Drive and fires when new folders are detected in the root directory.
Get Chat History
Get chat history messages. note: this uses the getupdates method with specific parameters to retrieve historical messages.
Connect any two apps with Notis in the middle.
Not just Google Docs and Telegram. Any combination from 1,000+ integrations.
When this happens · Trigger
Do this · Action
Save your first hour today.
7 days free trial with 20$ free usage included.
No card. Works with personal or business Telegram.