Steps to Use Filters Inside the Gmail Trigger Node:
Configured with Aggregate, Chain Summarization, Convert To File, Gmail, and additional nodes. Review the connections and setup before adapting this template.
Node categories in this workflow
- Messaging
- AI & models
- Code
- Transform
- Trigger
- Web / API
Icons describe general node roles, inferred from node types. Inspect the parameters for the configured action.
Drag to pan; use + and − to zoom. Reconstructed from the exported node positions; nothing runs here. Dashed lines represent non-main connections. Full node names and notes appear below.
How it works
The exported workflow contains the following configured nodes. Their connections are shown above; inspect the JSON for the complete logic, expressions, and external actions.
| Node | Category | Type | Operation |
|---|---|---|---|
| Get message content1 | Messaging | Gmail | get |
| OpenAI Chat Model3 | AI & models | OpenAI Chat Model | See node parameters |
| Delete the unnecessary items | Code | Code | See node parameters |
| Aggregate in same cell | Transform | Aggregate | See node parameters |
| Gmail trigger | Trigger | Gmail Trigger | See node parameters |
| Convert from base64 to File | Transform | Convert To File | toBinary |
| Merge Text with Audio | Transform | Merge | See node parameters |
| Send Message to Telegram | Messaging | Telegram | sendAudio |
| Summarization Chain3 | AI & models | Chain Summarization | See node parameters |
| Text to TTS | Web / API | HTTP Request | POST |
Setup
- Download the JSON and import it into an isolated n8n instance. Leave the workflow inactive.
- Connect your own credentials through n8n’s credential store. Replace
REPLACE_WITH_*values with your resource identifiers. - Inspect API destinations, Code nodes, database queries, file paths, and outbound actions.
- Run with synthetic data and harmless destinations. Enable triggers only after checking the actual outputs.
Requirements
An n8n instance with the listed node types and compatible versions. Service-connected workflows may require accounts, credentials, or paid APIs.
Credential types declared in the source
gmailOAuth2openAiApitelegramApi
Workflow notes
Project Benefit 🎧🌟
Project Benefit 🎧🌟
The goal of this awesome project is to turn those "CATEGORY_PROMOTIONS" emails into a super cool audio podcast! 🎙️ This way, users can kick back and enjoy the promotional content without having to squint at their screens. By listening instead of reading, users can soak in the info in a fun and easy way.
This project rocks a workflow using n8n to automate tasks like a boss. Each node in the workflow plays its part in a smooth operation. Check out the main players:
-
Gmail trigger1 Node: Kicks off the action every minute for those "CATEGORY_PROMOTIONS" emails.
-
Get message content1 Node: Grabs the email content for some magic.
-
Summarization Chain3 Node: Whips up some sweet summaries using fancy chunking methods.
-
Delete the unnecessary items Node: Clears out the clutter from the email content.
-
Text to Free TTS Node: Turns the summary into speech using Free TTS magic.
-
Convert from base64 to File Node: Changes the audio into a file format.
-
Merge Text with Audio Node: Mixes the text and audio together for a cool combo.
-
Aggregate in same cell Node: Puts all the data together for more awesomeness.
-
Send Message to Telegram Node: Sends the final audio message with a caption to a special Telegram chat ID.
This workflow is like a well-oiled machine, with each step flowing seamlessly into the next. By automating these tasks, this project aims to make communication a breeze and bring joy to all involved! 🌈✨🚀
This API allows automatic text-to-speech generation.
This API allows automatic text-to-speech generation.
You can utilize this API by sending a POST request to the specified link and including JSON data containing the text you want to convert to speech, along with selecting your preferred voice.
When using this API, make sure to include the Content-Type header with the value application/json to ensure proper interpretation of the request data.
The API offers a user-friendly interface where you can simply submit the desired text and choose the appropriate voice, then receive an audio file containing the generated speech.
Using this API can be beneficial for quickly generating audio clips for texts in an efficient manner.
You can access this API at https://tiktok-tts.weilnet.workers.dev/api/generation or keep it as is without changing anything as provided on https://tiktokvoicegenerator.com/.
The Gmail Trigger:
The Gmail Trigger:
The Gmail Trigger node in your N8N workflow is set to poll for new emails every minute and is configured to filter emails with the label "CATEGORY_PROMOTIONS" before triggering the workflow.
Steps to Use Filters Inside the Gmail Trigger Node:
- Add Gmail Trigger Node:
- Drag and drop a Gmail Trigger node onto your workflow canvas.
```javascript // Add Gmail Trigger node ```
- Configure Gmail Trigger Node:
- In the node configuration:
- Set "Poll Times" to "Every Minute" to check for new emails at regular intervals.
- Enable the "Simple" toggle if you want to simplify the node interface.
- Under "Filters", specify the label IDs you want to filter by. In this case, it's set to "CATEGORY_PROMOTIONS".
- Adjust any additional options as needed.
- In the node configuration:
```javascript // Configure Gmail Trigger node pollTimes: { item: [ { mode: "everyMinute" } ] }, simple: false, filters: { labelIds: [ "CATEGORY_PROMOTIONS" ] }, options: {} ```
-
Provide Credentials:
- Ensure that you have set up the necessary Gmail credentials. In this case, it's using Gmail OAuth2 with the ID "UJx4Tiq8WRtxWEIP" and the name "Gmail Omar".
-
Save and Execute:
- Save your workflow and execute it to start monitoring your Gmail account for new emails with the specified label filter.
By following these steps, your workflow will effectively trigger based on new emails that match the "CATEGORY_PROMOTIONS" label in your Gmail account.
Steps to Use Filters Inside the Gmail Trigger Node:
Steps to Use Filters Inside the Gmail Trigger Node:
Purpose and structure
This folder contains the Steps to Use Filters Inside the Gmail Trigger Node: workflow. Its executable nodes use aggregate, chainSummarization, code, convertToFile, gmail, gmailTrigger, httpRequest, lmChatOpenAi, merge, telegram. The table and connection map below are derived from the JSON, not an inferred guarantee of behavior.
Setup
Import inactive. Configure your own credentials and replace REPLACE_WITH_* values. Review external destinations and Code nodes before running.
Entry points
Gmail trigger
Verification
Sanitized source candidate; not runtime-tested. This overview is generated from node metadata. Read the folder README for the connection map, credential types, and license.
Attribution
https://github.com/Zie619/n8n-workflows/blob/94007c1445d9258a7da116646b79473e7c7c3282/workflows/Telegram/0481_Telegram_Code_Automation_Webhook.json MIT; preserve source notices.