Arlin Perez
๐ Hi! I'm Arlin - a QA Engineer with 2 years of experience and a background in Dart & Flutter for mobile app development. โ๏ธ I'm passionate about automation and love building efficient workflows using n8n. ๐ฌ Reach out for any help with custom workflows
Templates by Arlin Perez
AI research assistant via Telegram (GPT-4o mini + DeepSeek R1 + SerpAPI)
AI Research Assistant via Telegram (GPT-4o mini + DeepSeek R1 + SerpAPI) ๐ฅ Whoโs it for This workflow is perfect for anyone who wants to receive AI-powered research summaries directly on Telegram. Ideal for people asking frequent product, tech, or decision-making questions and want up-to-date answers sourced from the web. ๐ค What it does Users send a question via Telegram. An AI agent (DeepSeek R1) reformulates and understands the intent, while a second agent (GPT-4o mini) performs live research using SerpAPI. The most relevant answers, including links and images, are delivered back via Telegram. โ๏ธ How it works ๐ฒ Telegram Trigger โ Starts when a user sends a message to your Telegram bot. ๐ง DeepSeek R1 Agent โ Understands, clarifies, or reformulates the user query. ๐ง Research AI Agent (GPT-4o mini + SerpAPI) โ Searches the web and summarizes the best results. ๐ค Send Telegram Message โ Sends the response back to the same user. ๐ Requirements Telegram bot (via BotFather) with API token set in n8n credentials OpenAI account with API key and balance for GPT-4o mini SerpAPI account (100 free searches/month) with API key DeepSeek account with API key and balance ๐ ๏ธ How to set up Create your Telegram bot using BotFather and connect it using the Telegram Trigger node Set up DeepSeek credentials and add a Chat Model AI Agent node using DeepSeek R1 to reformulate the userโs question Set up OpenAI credentials and add a second ChatGPT AI Agent node using GPT-4o mini In the GPT-4o node, enable the SerpAPI Tool and add your SerpAPI API key Pass the reformulated question from DeepSeek to the GPT-4o agent for live search and summarization Format the response (text, links, optional images) Send the final reply to the user using the Telegram Send Message node Ensure your n8n instance is publicly accessible Test the workflow by sending a message to your Telegram bot โ
Categorize and label existing Gmail emails automatically with GPT-4o mini
๐จ Categorize and Label Existing Gmail Emails Automatically with GPT-4o mini ๐ฅ Who's it for This workflow is perfect for individuals or teams who want to sort and label existing emails in their Gmail inbox ๐๏ธ using AI. Ideal for cleaning up unlabeled emails in bulk โ no coding required! For sorting incoming emails messages in your gmail inbox, please use this free workflow: Categorize and Label Incoming Gmail Emails Automatically with GPT-4o mini ๐ค What it does It manually processes a selected number of existing Gmail emails, skips those that already have labels, sends the content to an AI Agent powered by GPT-4o mini ๐ง , and applies a relevant Gmail label based on the email content. All labels must already exist in Gmail. โ๏ธ How it works โถ๏ธ Manual Trigger โ The workflow starts manually when you click "Execute Workflow". ๐ฅ Gmail Get Many Messages โ Pulls a batch of existing inbox emails (default: 50). ๐ซ Filter โ Skips emails that already have one or more labels. ๐ง AI Agent (GPT-4o mini) โ Analyzes the content and assigns a category. ๐งพ Structured Output Parser โ Converts the AI output into structured JSON. ๐ Switch Node โ Routes each email to the right label based on the AI result. ๐ท๏ธ Gmail Nodes โ Apply the correct Gmail label to the email. ๐ Requirements Gmail account connected to n8n Gmail labels must be manually created in your inbox beforehand Labels must exactly match the category names defined in the AI prompt OpenAI credentials with GPT-4o mini access n8n's AI Agent & Structured Output Parser nodes ๐ ๏ธ How to set up In your Gmail account, create all the labels you want to use for categorizing emails Open the workflow and adjust the email fetch limit in the Gmail node (e.g., 50, 100) Confirm that the Filter skips emails that already have labels Define your categories in the AI Agent prompt โ these must match the Gmail labels exactly In the Switch Node, create a condition for each label/category Ensure each Gmail Label Node applies the correct existing label Save the workflow and run it manually whenever you want to organize your inbox โ ๐จ How to customize the workflow Add or remove categories in the AI prompt & Switch Node Adjust the batch size of emails to process more or fewer per run Fine-tune the AI prompt to suit your inbox type (e.g., work, personal, client support)
Automated execution cleanup system with n8n API and custom retention rules
Make your n8n instance faster, cleaner, and more efficient by deleting old workflow executions โ while keeping only the most recent ones you actually need. Whether you're using n8n Cloud or self-hosted, this lightweight workflow helps reduce database/storage usage and improves UI responsiveness, using only official n8n nodes. ๐ Description Automatically clean up old executions in your n8n instance using only official nodes โ no external database queries required. Whether you're on the Cloud version or running self-hosted, this workflow helps you optimize performance and keep your instance tidy by maintaining only the most recent executions per workflow. Ideal for users managing dozens or hundreds of workflows, this solution reduces storage usage and improves the responsiveness of the n8n UI, especially in environments where execution logs can accumulate quickly. โ What It Does Retrieves up to 250 recent executions across all workflows Groups executions by workflow Keeps only the most recent N executions per workflow (value is configurable) Deletes all older executions (regardless of their status: success, error, etc.) Works entirely with native n8n nodes โ no external database access required Optionally: set the number of executions to keep as 0 to delete all past executions from your instance in a single run ๐ ๏ธ How to Set Up ๐โCreate a Personal API Key in your n8n instance: Go to Settings โ API Keys โ Create a new key ๐งโCreate a new n8n API Credential (used by both nodes): In your n8n credentials panel: Name: anything you like (e.g., โInternal API Accessโ) API Key: paste the Personal API Key you just created Base URL: your full n8n instance URL with the /api/v1 path, e.g. https://your-n8n-instance.com/api/v1 โ โUse this credential in both: The Get Many Executions node (to fetch recent executions) The Delete Many Executions node (to remove outdated executions) ๐งฉโIn the โSet Executions to Keepโ node: Edit the variable executionsToKeep and set the number of most recent executions to retain per workflow (e.g. 10) Tip: Set it to 0 to delete all executions ๐ฆโNote: The โGet Many Executionsโ node will retrieve up to 250 executions per run โ this is the maximum allowed by the n8n API. ๐ง โNo further setup is required โ the filtering and grouping logic is handled inside the Code Node automatically. ๐งช Included Nodes Overview ๐ Schedule Trigger โ Set to run daily, weekly, etc. ๐ฅ Get Many Executions โ Fetches past executions via n8n API ๐ ๏ธ Set Executions to Keep โ Set how many recent ones to keep ๐ง Code Node โ Filters out executions to delete per workflow ๐๏ธ Delete Executions โ Deletes outdated executions ๐ก Why Use This? Reduce clutter and improve performance in your n8n instance Maintain execution logs only when theyโre useful Avoid bloating your storage or database with obsolete data Compatible with both n8n Cloud and self-hosted setups Uses only official, supported n8n nodes โ no SQL, no extra setup ๐ This workflow modifies and deletes execution data. Always review and test it first on a staging instance or on a limited set of workflows before using it in production.