← All N8N workflows
AI & researchAggregateChain SummarizationCodeConvert To FileGmail

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.

Workflow preview
MessagingGet message content1GmailAI & modelsOpenAI Chat Model3OpenAI Chat ModelCodeDelete the unnecessaryitemsCodeTransformAggregate in same cellAggregateTriggerGmail triggerGmail TriggerTransformConvert from base64 toFileConvert To FileTransformMerge Text with AudioMergeMessagingSend Message toTelegramTelegramAI & modelsSummarization Chain3Chain SummarizationWeb / APIText to TTSHTTP Request

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.

Workflow node names, types, and operations
NodeCategoryTypeOperation
Get message content1MessagingGmailget
OpenAI Chat Model3AI & modelsOpenAI Chat ModelSee node parameters
Delete the unnecessary itemsCodeCodeSee node parameters
Aggregate in same cellTransformAggregateSee node parameters
Gmail triggerTriggerGmail TriggerSee node parameters
Convert from base64 to FileTransformConvert To FiletoBinary
Merge Text with AudioTransformMergeSee node parameters
Send Message to TelegramMessagingTelegramsendAudio
Summarization Chain3AI & modelsChain SummarizationSee node parameters
Text to TTSWeb / APIHTTP RequestPOST

Setup

  1. Download the JSON and import it into an isolated n8n instance. Leave the workflow inactive.
  2. Connect your own credentials through n8n’s credential store. Replace REPLACE_WITH_* values with your resource identifiers.
  3. Inspect API destinations, Code nodes, database queries, file paths, and outbound actions.
  4. 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

  • gmailOAuth2
  • openAiApi
  • telegramApi

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:

  1. Gmail trigger1 Node: Kicks off the action every minute for those "CATEGORY_PROMOTIONS" emails.

  2. Get message content1 Node: Grabs the email content for some magic.

  3. Summarization Chain3 Node: Whips up some sweet summaries using fancy chunking methods.

  4. Delete the unnecessary items Node: Clears out the clutter from the email content.

  5. Text to Free TTS Node: Turns the summary into speech using Free TTS magic.

  6. Convert from base64 to File Node: Changes the audio into a file format.

  7. Merge Text with Audio Node: Mixes the text and audio together for a cool combo.

  8. Aggregate in same cell Node: Puts all the data together for more awesomeness.

  9. 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:

  1. Add Gmail Trigger Node:
    • Drag and drop a Gmail Trigger node onto your workflow canvas.

```javascript // Add Gmail Trigger node ```

  1. 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.

```javascript // Configure Gmail Trigger node pollTimes: { item: [ { mode: "everyMinute" } ] }, simple: false, filters: { labelIds: [ "CATEGORY_PROMOTIONS" ] }, options: {} ```

  1. 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".
  2. 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.

More in AI & research