by n8n Team
This workflow demonstrates how to connect an open-source model to a Basic LLM node. The workflow is triggered when a new manual chat message appears. The message is then run through a Language Model Chain that is set up to process text with a specific prompt to guide the model's responses. Note that open-source LLMs with a small number of parameters require slightly different prompting with more guidance to the model. You can change the default Mistral-7B-Instruct-v0.1 model to any other LLM supported by HuggingFace. You can also connect other nodes, such as Ollama. Note that to use this template, you need to be on n8n version 1.19.4 or later.
by Deborah
Use n8n to bring data from any API to your AI. This workflow uses the Chat Trigger to provide the chat interface, and the Custom n8n Workflow Tool to call a second workflow that calls the API. The second workflow uses AI functionality to refine the API request based on the user's query. It then makes an API call, and returns the response to the main workflow. This workflow is used in Advanced AI examples | Call an API to fetch data in the documentation. To use this workflow: Load it into your n8n instance. Add your credentials as prompted by the notes. Requires n8n 1.28.0 or above
by n8n Team
This workflow connects Telegram bots with LangChain nodes in n8n. The main AI Agent Node is configured as a Conversation Agent. It has a custom System Prompt which explains the reply formatting and provides some additional instructions. The AI Agent has several connections: OpenAI GPT-4 model is called to generate the replies Window Buffer Memory stores the history of conversation with each user separately There is an additional Custom n8n Workflow tool (Dall-E 3 Tool). AI Agent uses this tool when the user requests an image generation. In the lower part of the workflow, there is a series of nodes that call Dall-E 3 model with the user Telegram ID and a prompt for a new image. Once image is ready, it is sent back to the user. Finally, there is an extra Telegram node that masks HTML syntax for improved stability in case the AI Agent replies using the unsupported format.
by Dinakar Selvakumar
Description This workflow builds a Tamil voice AI assistant for real estate inquiries. It handles incoming calls or messages, converts speech to text, generates AI responses, converts them back to speech, and logs lead data into Google Sheets. What this template demonstrates Voice-based AI assistant using STT and TTS Conversation handling with memory AI response generation with structured prompts Lead capture and logging Escalation to human agents Use cases Real estate enquiry automation Voice-based customer support Lead qualification systems AI call assistant for small businesses How it works • Receives input via webhook • Converts audio to text using STT • Detects intent and escalation conditions • Generates response using AI • Converts response to speech and returns it • Logs lead data into Google Sheets How to use Deploy the workflow Configure webhook endpoint Connect OpenAI, Sarvam STT/TTS, and Google Sheets Send audio or text requests to the webhook Requirements OpenAI API access Sarvam STT and TTS API access Google Sheets account Public webhook endpoint Customising this workflow Modify AI prompt for different industries Add CRM integration instead of Google Sheets Adjust escalation rules Support multiple languages Use this Voice Call HTML File For Testing, Download it and test the agent by live conversation. Good to know Handles both audio and text input Includes fallback for failed speech recognition Maintains conversation history Supports real-time response generation Who this is for Automation engineers Real estate agencies AI chatbot builders Businesses needing voice assistants
by Dataki
This workflow serves as a solid foundation when you need an AI Agent to return output in a specific JSON schema, without relying on the often-unreliable Structured Output Parser. What It Does The example workflow takes a simple input (like a food item) and expects a JSON-formatted output containing its nutritional values. Why Use This Instead of Structured Output Parser? The built-in Structured Output Parser node is known to be unreliable when working with AI Agents. While the n8n documentation recommends using a “Basic LLM Chain” followed by a Structured Output Parser, this alternative workflow completely avoids using the Structured Output Parser node. Instead, it implements a custom loop that manually validates the AI Agent's output. This method has proven especially reliable with OpenAI's gpt-4.1 series (gpt-4.1, gpt-4.1-mini, gpt-4.1-nano), which tend to produce correctly structured JSON on the first try, as long as the System Prompt is well defined. In this template, gpt-4.1-nano is set by default. How It Works Instead of using the Structured Output Parser, this workflow loops the AI Agent through a manual schema validation process: A custom schema check is performed after the AI Agent response. A runIndex counter tracks the number of retries. A Switch node: If the output does not match the expected schema, it routes back to the AI Agent with an updated prompt asking it to return the correct format. The process allows up to 4 retries to avoid infinite loops. If the output does match the schema, it continues to a Set node that serves as chat response (you can customize this part to fit your use case). This approach ensures schema consistency, offers flexibility, and avoids the brittleness of the default parser.
by Friedemann Schuetz
Welcome to my Simple OpenAI Image Generator Workflow! This workflow creates an image with the new OpenAI image model "GPT-Image-1" based on a form input. This workflow has the following sequence: Form trigger (image prompt and image size input) Generate the Image via OpenAI API. Return the image to the input form for download. The following accesses are required for the workflow: OpenAI API access: Documentation Instructions Link your OpenAI Platform account in the “OpenAI Image Generation” node ("Credential Type") You can contact me via LinkedIn, if you have any questions: https://www.linkedin.com/in/friedemann-schuetz
by Yang
This workflow turns trending news into thoughtful first-person commentary for platforms like LinkedIn. It uses Dumpling AI’s News Search and Scraping APIs to find and extract article content, then feeds the cleaned text to GPT-4o to write personalized insights. The final output is saved back to Google Sheets as a draft for easy review or posting. ✅ What this workflow does Triggers daily using a Schedule node. Fetches a list of content topics from a Google Sheet. Uses Dumpling AI to search for relevant news articles based on each topic. Scrapes the article content with Dumpling AI’s /scrape endpoint. Cleans and aggregates the article content using a Code node. Generates first-person commentary with GPT-4o tailored for LinkedIn. Appends the generated post back to the Google Sheet next to its topic. 🧩 Nodes in this workflow Schedule Trigger**: Starts the workflow daily. Google Sheets (Read Topics)**: Pulls topic rows that don’t have a generated commentary yet. Split In Batches**: Processes each topic one at a time. Wait**: Adds a delay to manage API limits. HTTP Request (Search News)**: Uses Dumpling AI's /search-news to find relevant articles for the topic. Split Out**: Iterates over the list of article results. HTTP Request (Scrape Article)**: Extracts the full article text using Dumpling AI’s /scrape. Aggregate**: Collects and merges article content fields. Code (Clean Article)**: Strips links, formatting, and irrelevant text. OpenAI (GPT-4o)**: Generates a short, first-person LinkedIn post-style commentary using a custom prompt. Google Sheets (Write Back)**: Appends the final output next to the original topic in the sheet. 🧑💼 Who is this for? Founders, content creators, marketers, or **agency teams looking to maintain an active presence on LinkedIn or newsletters by sharing smart takes on industry trends. 💡 What problem does this solve? Most people want to comment on current events but don't have the time to summarize articles or write well-structured posts. This automation saves hours of manual work by: Finding the right article. Extracting and cleaning the content. Writing it in a natural, first-person voice using AI. ⚙️ What you need to use this: A Google Sheet with at least two columns: topic and generated commentary. A Dumpling AI API Key with access to the /search-news and /scrape endpoints. An OpenAI GPT-4o connection.
by Samir Saci
Tags: Marketing, Image Processing, Automation Context Hey! I’m Samir, a Data Scientist from Paris and the founder of LogiGreen Consulting. We use AI, automation, and data to support sustainable business practices for small, medium and large companies. I implemented this workflow to support an event agency to automate image processing like background removal using Photoroom API. > Automate your photos processing with n8n! This n8n workflow collects all images in a Google Drive folder shared with multiple photographers. For each image, it calls the Photoroom API: A processed image w/o a background is saved in a subfolder Remove Background The original pictures are saved in the subfolder Original This workflow, triggered every morning, will process the backlog of images. 📬 For business inquiries, feel free to connect with me on LinkedIn Who is this template for? This workflow is useful for: Digital Marketing** teams that use images for content creation Photographs* or *Event Organisers** that collect large amounts of photos that need processing What does it do? This n8n workflow: ⏰ Triggers automatically every morning 🖼️ Collects the names and IDs of all images in the folder 🧹 HTTP POST request to Photoroom API to remove the background 📄 Stores the processed image and the original image in two separate sub-folders What do I need to get started? You’ll need: A Google Drive Account connected to your n8n instance with credentials A Photoroom API key that you can get for free (trial) here: Photoroom API Follow the Guide! Follow the sticky notes inside the workflow or check out my step-by-step tutorial on how to configure and deploy it. 🎥 Watch My Tutorial This workflow was built using n8n version 1.93.0 Submitted: May 26, 2025
by WeblineIndia
This workflow is created by AI developers at WeblineIndia. It streamlines the process of managing content by automatically identifying and fetching the most recently added Google Doc file from your Google Drive. It extracts the content of the document for processing and leverages an AI model to generate a concise and meaningful summary of the extracted text. The summarized content is then stored in a designated Google Sheet, alongside relevant details like the document name and the date it was added, providing an organized and easily accessible reference for future use. This automation simplifies document handling, enhances productivity, and ensures seamless data management. Steps : Fetch the Most Recent Document from Google Drive Action:** Use the Google Drive Node. Details:** List files, filter by date to fetch the most recently added .doc file, and retrieve its file ID and metadata. Extract Content from the Document Action:** Use the Google Docs Node. Details:** Set the operation to "Get Content," pass the file ID, and extract the document's text content. Summarize the Document Using an AI Model Action:** Use an AI Model Node (e.g., OpenAI, ChatGPT). Details:** Provide the extracted text to the AI model, use a prompt to generate a summary, and capture the result. Store the Summarized Content in Google Sheets Action:** Use the Google Sheets Node. Details:** Append a new row to the target sheet with details such as the original document name, summary, and date added. About WeblineIndia WeblineIndia specializes in delivering innovative and custom AI solutions to simplify and automate business processes. If you need any help, please reach out to us.
by Rajeet Nair
Overview This workflow automates customer support ticket processing using AI-powered analysis. Incoming tickets from email (IMAP) or a webhook endpoint are automatically cleaned, translated to English if necessary, analyzed with AI, and routed based on urgency and category. The workflow can automatically generate draft replies for simple tickets or escalate critical issues to your support team. It also updates your CRM or helpdesk system with structured ticket insights and logs observability metrics for monitoring support performance. This automation helps support teams reduce manual triage work, respond faster to customers, and ensure urgent issues receive immediate attention. How It Works 1. Ticket Intake The workflow begins when a support request is received from one of two sources: IMAP Email Trigger** – Reads incoming support emails from a mailbox. Webhook Trigger** – Accepts tickets from external systems such as websites, chatbots, or applications. Both triggers feed the message into a unified processing pipeline. 2. Content Cleaning The workflow extracts readable text from incoming messages using an HTML extraction node. This ensures that emails or formatted messages can be analyzed reliably. 3. Ticket Data Normalization Incoming data is standardized to ensure consistent processing across all ticket sources. The workflow generates fields such as: ticket_id user_email original_message timestamp source_channel 4. Language Detection & Translation An AI agent detects the original language of the ticket. If the message is not written in English, it is automatically translated while preserving the original meaning and tone. 5. AI Support Intelligence A second AI agent analyzes the ticket and produces structured insights including: Sentiment (positive, neutral, negative) Urgency level (low, medium, high, critical) Ticket category Issue summary Customer churn risk score Recommended action path 6. Intelligent Routing A Switch node routes the ticket based on the AI analysis: Auto Reply Path** – Generates a draft response. Escalation Path** – Sends the ticket to a support escalation webhook. 7. Draft Reply Generation If the ticket qualifies for automatic handling, an AI agent generates a professional support response based on the ticket content, sentiment, and category. 8. CRM / Helpdesk Update The workflow sends structured ticket information to a CRM or helpdesk system, including: Ticket ID Category Sentiment Urgency Churn risk score AI-generated summary Draft reply 9. Observability Metrics The workflow logs operational metrics such as response time, ticket category, urgency, sentiment, and escalation status. These metrics can be sent to an observability or monitoring system. Setup Instructions Configure Email Credentials (Optional) Add IMAP credentials if you want to process support emails. Configure the Webhook Trigger Use the webhook URL generated by the workflow to receive support tickets from external systems. Add AI Model Credentials Connect your Anthropic API credentials to power the AI agents used for translation, analysis, and response generation. Configure Workflow Variables In the Workflow Configuration node, provide: CRM or Helpdesk API URL Escalation webhook URL Observability logging endpoint (optional) Connect Your CRM or Helpdesk System Ensure the API endpoint accepts JSON payloads containing ticket data and AI insights. Use Cases AI-powered customer support ticket triage Handling multilingual support requests Automatically generating draft responses Escalating critical support tickets Monitoring support performance metrics Requirements Anthropic API credentials IMAP email credentials (optional) CRM or Helpdesk API endpoint Escalation webhook endpoint Optional observability or monitoring endpoint
by Rajeet Nair
Overview This workflow automates customer support ticket processing using AI-powered analysis, classification, and intelligent routing. It processes incoming tickets from email or webhook, translates messages when needed, analyzes sentiment and urgency, and routes tickets to auto-reply or escalation flows. The system also updates CRM platforms and logs observability metrics for monitoring. This enables faster response times, improved customer experience, and scalable support operations. How It Works Input Sources Receives tickets via: IMAP Email Trigger Webhook endpoint Workflow Configuration Defines: CRM/Helpdesk API endpoint Escalation webhook URL Observability logging endpoint Data Cleaning & Normalization Extracts and cleans HTML content Normalizes ticket data: Ticket ID User email Message content Timestamp Source channel Language Detection & Translation Detects the original language Translates message into English if needed Returns confidence score AI Support Intelligence Classifies ticket into: Sentiment (positive/neutral/negative) Urgency (low → critical) Category (billing, bug, technical, etc.) Generates: Short summary Churn risk score (0–1) Recommended action path Decision Routing Routes tickets based on AI output: Auto Reply → Generate response Escalate / Critical → Send to team Auto Reply Flow AI Reply Generation Drafts professional response using ticket context Keeps tone empathetic and actionable CRM/Helpdesk Update Sends structured ticket data to CRM: Priority Category Sentiment Churn risk Draft reply Escalation Flow Escalation Handling Sends high-priority tickets to support team Includes full ticket context and analysis Observability & Monitoring Metrics Logging Tracks: Response time Escalation status Category & urgency Sentiment & churn risk Sends data to observability endpoint (optional) Setup Instructions Email / Webhook Setup Configure IMAP credentials OR webhook endpoint (support-ticket) AI Model Setup Add Anthropic or OpenAI credentials Connect models to: Translation agent Intelligence agent Reply generator CRM / Helpdesk Integration Set API endpoint URL Configure headers and authentication Escalation Setup Add webhook URL for team notifications (Slack, internal API, etc.) Observability (Optional) Configure logging endpoint for metrics tracking Customize Prompts Adjust system messages for: Translation Classification Reply generation Use Cases AI-powered customer support automation SaaS support ticket triaging Multi-language support systems Helpdesk automation with CRM integration Customer churn risk detection workflows Requirements Anthropic or OpenAI API key Email (IMAP) or webhook source CRM/helpdesk system API Optional observability/logging service n8n instance Key Features Multi-channel ticket ingestion (email + webhook) Automatic language detection and translation AI-based sentiment, urgency, and category classification Intelligent routing (auto-reply vs escalation) AI-generated support replies CRM integration for structured ticket updates Observability and performance tracking Summary A powerful AI-driven support automation workflow that processes, analyzes, and routes customer tickets intelligently. It reduces manual workload, improves response speed, and enables scalable, data-driven support operations.
by Sk developer
TikTok Transcript to OpenAI GPT-4 This automation workflow provides a seamless, efficient, and AI-powered solution for extracting, processing, and storing TikTok video subtitles. By combining TikTok Transcript API, OpenAI GPT-4 API, and Google Docs, this workflow transforms the process of transcription and text analysis into a smooth, automated experience. It's perfect for content creators, marketers, and businesses who need to process large volumes of TikTok videos and want to leverage AI for language processing and summarization. How It Works: User Form Submission: The process begins when a user submits a TikTok video URL and specifies the language in which they want the processed content. The data is captured via a simple form that triggers the entire workflow. The form is crucial for collecting the necessary parameters before processing, such as the video link and language preferences. Fetching Subtitles from TikTok: The workflow uses the TikTok Transcript API to retrieve subtitles from the specified TikTok video. This API extracts all textual data associated with the video (including spoken words, captions, etc.) in real-time. The TikTok Transcript API allows you to fetch subtitles efficiently, making it ideal for those who need to process content from TikTok quickly. Advanced Processing with OpenAI GPT-4: Once the TikTok subtitles are fetched, the workflow sends this text to OpenAI’s GPT-4 API. OpenAI's GPT-4 model is renowned for its powerful natural language processing capabilities, making it perfect for handling multi-lingual data. OpenAI GPT-4 API processes the raw transcript in several ways, including: Translation: If the subtitles are in a different language, GPT-4 API can translate them to the desired language. Summarization: GPT-4 API can summarize long TikTok video subtitles into concise points, saving you time and effort. Text Interpretation: You can configure GPT-4 API to generate insights, analyze emotions, or interpret context, which is ideal for detailed content analysis. Storing the Results in Google Docs: After processing the subtitles, the final output (whether it is a translated, summarized, or interpreted version) is automatically saved into a Google Doc. This integration allows the processed text to be stored in an easily editable and shareable format. The document can be accessed by anyone with permission, making it perfect for team collaboration or content management. Workflow Automation: The automation continues with a wait step to ensure that all data is fetched and processed before moving on to storing it in Google Docs. It ensures that the entire process is handled without needing manual intervention, from fetching subtitles to generating results and storing them. Key Features and Benefits: Efficient TikTok Subtitle Extraction: Automatically fetch TikTok video subtitles using the **TikTok Transcript API, eliminating the need for manual transcription. AI-Driven Text Processing: Use the power of **OpenAI GPT-4 API to process the extracted text. GPT-4 API can translate, summarize, or analyze the subtitles for advanced insights, making it far more than just a transcription tool. Seamless Multi-Language Support: **OpenAI GPT-4 API handles multiple languages, translating or summarizing the content based on the user’s input. This makes the workflow versatile for global content creators and marketers. Google Docs Integration: After processing the subtitles, the results are saved directly into **Google Docs for easy access, editing, and sharing. This ensures that all processed data is stored in an organized manner and ready for use in various projects. Time & Effort Savings**: The entire process is automated from start to finish, allowing users to bypass manual transcription and processing tasks. You can focus on creating content while the workflow handles all the repetitive tasks. Advanced Text Insights: By using **OpenAI’s GPT-4 API, you not only get the raw transcript, but you also get insights, summaries, translations, and other interpretations that enhance your content’s value. Challenges Solved: Manual Transcription: This workflow eliminates the need for manual transcription by automatically fetching subtitles from TikTok using the **TikTok Transcript API. Language Barriers: With **OpenAI GPT-4, users can translate TikTok video subtitles into any language, ensuring the content is accessible to a global audience. Content Management: By storing processed content in **Google Docs, this workflow makes it easier to manage and collaborate on transcriptions and analysis, providing a central hub for your data. Automation for Productivity**: This workflow automates every step of the process, from fetching subtitles to analyzing and storing them, freeing up time for higher-value tasks like content creation, strategy planning, or marketing. APIs Integrated: TikTok Transcript API**: Retrieves subtitles directly from TikTok videos, providing the base for further processing. OpenAI GPT-4 API**: Handles advanced text processing, including translation, summarization, and analysis of the TikTok video subtitles. Google Docs API**: Stores processed content into Google Docs, providing a clean, accessible format for viewing and collaboration. Use Cases: Content Creation**: Automatically process and summarize video subtitles for content creation, marketing, or research purposes. Market Research**: Extract and analyze content from TikTok to understand audience sentiment, trending topics, and engagement strategies. Education**: Teachers and educators can use the workflow to analyze educational TikTok videos and save the insights in Google Docs for lesson planning. Conclusion: This TikTok Transcript to OpenAI GPT-4 + Google Docs Automation workflow saves time, enhances content processing with AI, and organizes results into easily accessible documents. By integrating the TikTok Transcript API and OpenAI GPT-4 API, it provides a smart, automated solution for anyone working with TikTok content. Whether you're a content creator, researcher, or marketer, this workflow can help you streamline and optimize your content processing tasks.