Iniyavan JC
🚀 Automation expert & AI enthusiast. I build custom n8n workflows, AI agents, API integrations, and smart automations using LLMs, databases, cloud tools & more. Skilled in Docker, MongoDB, Google Sheets, ACRCloud, and building fast, context-aware agents. Let's turn your idea into a powerful workflow!
Templates by Iniyavan JC
Automated Instagram reels workflow
This workflow automates the process of creating and posting Instagram Reels, combining Google Drive, AI, Airtable, and the Facebook Graph API. It supports two content creation paths: Scheduled Random Video Selection & Posting Selects a random video from a Google Drive folder named "Random video mover" based on a schedule. Moves the video to a processing folder for posting. Manual Upload Trigger & Posting Watches a specific Google Drive folder ("n8n reels automation on instagram"). Triggers the workflow when a new video is uploaded. Core Process (applies to both paths) Download Video from Google Drive. AI Caption Generation with Google Gemini, using the file name as context. The AI creates concise captions with hashtags and a call-to-action. Airtable Logging to store video name, caption, and URL. Instagram Reels Posting via the Facebook Graph API. Recent Change In early 2025, Meta tightened its requirements for videourl and imageurl parameters. URLs must now be direct, public links to the raw media file with no redirects or authentication. Google Drive links no longer work. Our Fix Store the binary file locally on the n8n server at /tmp/video.mp4. Serve the file through a public n8n webhook with the correct Content-Type. Use the webhook URL in the Facebook Graph API request. Upload succeeds without the “Media download has failed” error. Cleanup Deletes the temporary file after posting. Benefits Saves time with full automation. Improves engagement through AI-generated captions. Keeps content organized in Airtable. Works with Meta’s updated API requirements by hosting files directly from the n8n server.
Build a WhatsApp assistant with memory, Google Suite & multi-AI research and imaging
The "WhatsApp Productivity Assistant with Memory and AI Imaging" is a comprehensive n8n workflow that transforms your WhatsApp into a powerful, multi-talented AI assistant. It's designed to handle a wide range of tasks by understanding user messages, analyzing images, and connecting to various external tools and services. The assistant can hold natural conversations, remember past interactions using a MongoDB vector store (RAG), and decide which tool is best suited for a user's request. Whether you need to check your schedule, research a topic, get the latest news, create an image, or even analyze a picture you send, this workflow orchestrates it all seamlessly through a single WhatsApp chat interface. The workflow is structured into several interconnected components: WhatsApp Trigger & Incoming Message Processing: This is the entry point, starting when a message (text or image) is received via WhatsApp. A Route Message by Type (Image/Text) node then intelligently routes the message based on its content type. A Typing.... node sends a typing indicator to the user for a better experience. If an image is received, it's downloaded, processed via an HTTP Request, and analyzed by the Analyze image node. The Code1 node then standardizes both text and image analysis output into a single, unified input for the main AI agent. Core AI Agent: This is the brain of the operation. The AI Agent1 node receives the user's input, maintains short-term conversational memory using Simple Memory, and uses a powerful language model (gpt-oss-120b2 or gpt-oss-120b1) to decide which tool or sub-agent to use. It orchestrates all the other agents and tools. Productivity Tools Agent: This group of nodes connects the assistant to your personal productivity suite. It includes sub-agents and tools for managing Google Calendar, Google Tasks, and Gmail, allowing you to schedule events, manage to-dos, and read emails. It leverages a language model (gpt-4.1-mini or gemini-2.5-flash) for understanding and executing commands within these tools. Research Tool Agent: This agent handles all research-related queries. It has access to multiple search tools (Brave Web Search, Brave News Search, Wikipedia, Tavily, and a custom perprlexcia search) to find the most accurate and up-to-date information from the web. It uses a language model (gpt-oss-120b or gpt-4.1-nanoChat Model1) for reasoning. Long-Term Memory Webhook: A dedicated sub-workflow (Webhook2) that processes conversation history, extracts key information using Extract Memory Info, and stores it in a MongoDB Atlas Vector Store for long-term memory. This allows the AI agent to remember past preferences and facts. Image Generation Webhook: A specialized sub-workflow (Webhook3) triggered when a user asks to create an image. It uses a dedicated AI Agent with MongoDB Atlas Vector Store1 for contextual image prompt generation, Clean Prompt Text1 to refine the prompt, an HTTP Request to an external image generation API (e.g., Together.xyz), and then converts and sends the generated image back to the user via WhatsApp. --- Use Cases Personal Assistant: Schedule appointments, create tasks, read recent emails, and manage your daily agenda directly from WhatsApp. Information Retrieval: Ask any factual, news, or research-based question and get real-time answers from various web sources. Creative Content Generation: Request the AI to generate images based on your descriptions for logos, artwork, or social media content. Smart Communication: Engage in natural, contextual conversations with an AI that remembers past interactions. Image Analysis: Send an image and ask the AI to describe its contents or answer questions about it. --- Pre-conditions Before importing and running this template, you will need: Self-hosted n8n Instance: This template requires a self-hosted n8n instance as it uses webhooks that need public accessibility. WhatsApp Business Account: A Meta Developer Account configured for WhatsApp Business Platform API access. MongoDB Atlas Account: A MongoDB Atlas cluster with a database and collection set up for the vector store. Google Cloud Project: Configured with API access for Google Calendar, Google Tasks, and Gmail. API Keys/Accounts for: OpenWeatherMap: For weather forecasts. Groq, OpenRouter, or Vercel AI Gateway: For various Language Models (e.g., gpt-oss-120b, gpt-5-nano, gpt-4o-mini). Mistral Cloud: For embedding models (e.g., codestral-embed-2505). Brave Search: For web and news searches. Tavily API: For structured search results. Together.xyz or similar Image Generation API: For creating images. Perplexity API (or self-hosted instance): For the perprlexcia tool (the current URL http://self hoseted perplexcia/api/search implies a self-hosted or custom endpoint). Publicly Accessible URLs: Your n8n instance and any custom webhook endpoints (like perprlexcia) must be publicly accessible. --- Requirements (n8n Credentials) You will need to set up the following credentials within your n8n instance: WhatsApp OAuth account: For the WhatsApp Trigger node. WhatsApp account: For Send message2, Send message3, Download media, and Typing.... nodes. Google Palm Api account: For Analyze image, Google Gemini Chat Model, gemini-2.5-flash, and Google Gemini Chat Model5 nodes. OpenWeatherMap account: For the Get Weather Forecast node. Groq account: For gpt-oss-120b node. Google Calendar OAuth2Api account: For the Google Calendar tools. MongoDB account: For MongoDB Atlas Vector Store nodes. OpenRouter account: For gpt-5-nano and gpt-4.1-nanoChat Model1 nodes. Gmail account : For Get many messages and Get a message nodes (ensure correct Gmail OAuth2 setup for each). Google Tasks account: For the Google Tasks tools. Bearer Auth account: For HTTP Request5 (used in media download). Brave Search account: For Brave Web Search and Brave News Search nodes. Vercel Ai Gateway Api account: For gpt-4.1-mini, gpt-oss-120b, gpt-oss-120b2, and gpt-4.1-nano nodes. HTTP Header Auth account: For Tavily web search (create a new one named "Tavily API Key" with Authorization: Bearer YOURTAVILYAPI_KEY) and HTTP Request (for Together.xyz, e.g., "Together.xyz API Key"). Mistral Cloud account: For codestral-embed-2505, codestral-embed-, and codestral-embed-2506 nodes.
Build a multi-modal Telegram AI assistant with Gemini, voice & image generation
How it works This workflow creates a multi-talented AI assistant named Simran that interacts with users via Telegram. It can handle text and voice messages, understand the user's intent, and perform various tasks. Step 1: Receive & Transcribe Input The workflow triggers on any new Telegram message. If it's a voice message, it uses AssemblyAI to transcribe it into text; otherwise, it processes the incoming text directly. Step 2: Understand User Intent Using a Large Language Model (LLM), the workflow analyzes the user's message to determine their goal, categorizing it as a general chat, a request to generate an image, a command to set a reminder, or a request to remember a specific piece of information. Step 3: Fetch Context & Route The assistant retrieves past conversation summaries from a MongoDB database to maintain context. Based on the user's intent, the workflow routes the task to the appropriate path. Step 4: Execute the Task Chat: Generates a response using an AI agent whose personality can be toggled between a standard assistant and a "Girlfriend Mode." It also analyzes the user's mood to tailor the response. Generate Image: Creates a detailed prompt and uses an image generation API to create and send a picture. Set Reminder: Parses the natural language request, creates an event in Google Calendar and a task in Google Tasks, and sends a confirmation. Remember Info: Saves specific user-provided information to a dedicated memory collection in MongoDB. Step 5: Respond and Save Memory The final output (text, voice message, or image) is sent back to the user on Telegram. The workflow then summarizes the interaction and saves it to the database to ensure continuity in future conversations. Set up steps Estimated Set up time: 20 - 30 minutes. Configure Credentials: You will need to add credentials for several services in your n8n instance: Telegram (Bot API Token) AssemblyAI (API Key) MongoDB Google (for Calendar, Tasks, Sheets, and Natural Language API) A Large Language Model (the workflow uses Google Gemini but can be adapted) An image generation service (the workflow uses the Together.xyz API) Set up External Services: Ensure your MongoDB instance has two collections: usermemory and memoryauto. Create a Google Sheet to manage the "Girlfriend Mode" status for different users. Ensure edge-tts is installed on the machine running your n8n instance for the text-to-speech functionality. Customize Nodes: Review the nodes with hardcoded IDs, such as Google Tasks and Google Sheets, and update them with your specific Task List ID and Sheet ID. The sticky notes inside the workflow provide more detailed instructions for specific nodes and segments.
Organize Gmail with GPT-4 & send urgent notifications via Telegram and WhatsApp
This workflow automatically transforms your messy inbox into a neatly organized space while ensuring you never miss a critical message. It connects to your Gmail account and triggers for every new email. Using a powerful AI agent, the workflow first analyzes the email's content, sender, and metadata to classify it and apply the appropriate Gmail label (e.g., "Finance," "Marketing," "Dev Tools"). In parallel, a second AI agent determines if the email is urgent (like a security alert, OTP, or payment reminder) and generates a concise summary. If an email is marked as urgent, the workflow instantly sends a notification with the summary to your Telegram and WhatsApp, allowing you to take immediate action. This workflow is perfect for anyone looking to automate their email management, reduce inbox clutter, and stay on top of important, time-sensitive communications. Step-by-Step Explanation This workflow is designed to intelligently categorize incoming emails and notify you of urgent messages. Here is a breakdown of how it operates: Trigger: New Email Received Node: Gmail Trigger Action: The workflow initiates whenever a new email arrives in your connected Gmail inbox. Fetch Full Email Content Node: Get a message Action: It takes the ID of the new email from the trigger and fetches the complete message body, subject, sender, and headers. AI-Powered Categorization Node: AI Agent2 Action: This AI agent analyzes the full email content. Based on a detailed prompt that includes classification rules (e.g., if the sender is GitHub, classify as "Dev Tools"), it determines the most appropriate category and outputs the corresponding Label ID. Label Management and Application Node: Loop Over Items -> Create Label if Doesn't exist -> Get Existing Labels -> Filter -> Add label to thread Action: This sequence ensures the email gets the correct label. It first attempts to create the Gmail label suggested by the AI. The node is set to continue even if the label already exists. It then fetches a list of all your current Gmail labels. A Filter node finds the exact ID of the label that matches the AI's suggestion. Finally, it applies this label to the email thread, neatly organizing it in your inbox. Urgency Analysis and Summarization Node: AI Agent Action: Concurrently, a second AI agent analyzes the email to determine its urgency (classifying it as "urgent" or "normal") and generates a two-sentence summary. Parse AI Output Node: Code Action: A simple code node cleans up the JSON output from the urgency analysis to ensure it's correctly formatted for the next step. Conditional Notification Logic Node: If Action: This node checks the output from the previous step. It proceeds only if the email's urgency is marked as "urgent." Send Instant Alerts Nodes: Send a text message (Telegram) & Send message (WhatsApp) Action: If an email is deemed urgent, the workflow immediately sends an alert containing the email summary to your specified Telegram chat and WhatsApp number.