by Yaron Been
Fire V Sekai.mediapipe Labeler Image Generator Description Mediapipe Blendshape Labeler - Predicts the blend shapes of an image. Overview This n8n workflow integrates with the Replicate API to use the fire/v-sekai.mediapipe-labeler model. This powerful AI model can generate high-quality image content based on your inputs. Features Easy integration with Replicate API Automated status checking and result retrieval Support for all model parameters Error handling and retry logic Clean output formatting Parameters Required Parameters media_path** (string): Input image, video, or training zip file Optional Parameters test_mode** (boolean, default: False): Enable test mode for quick verification max_people** (integer, default: 100): Maximum number of people to detect (1-100) export_train** (boolean, default: True): Export training zip containing json annotations and frame pngs aligned_media** (string, default: None): Optional video that is aligned with the input video's annotations frame_sample_rate** (integer, default: 1): Process every nth frame for video input How to Use Set up your Replicate API key in the workflow Configure the required parameters for your use case Run the workflow to generate image content Access the generated output from the final node API Reference Model: fire/v-sekai.mediapipe-labeler API Endpoint: https://api.replicate.com/v1/predictions Requirements Replicate API key n8n instance Basic understanding of image generation parameters
by Daniel Ng
Restore All n8n Workflows from Google Drive Backups Restoring multiple n8n workflows manually, especially when migrating your n8n instance to another host or server, can be an incredibly daunting and time-consuming task. Imagine having to individually export and then manually import hundreds of workflows; it's a recipe for errors and significant downtime. This workflow provides a streamlined way to restore all your n8n workflows from backup JSON files stored in a designated Google Drive folder. It's an essential tool for disaster recovery, migrating workflows to a new n8n instance, or recovering from accidental deletions, ideally used in conjunction with a backup solution like our "Auto Backup Workflows To Google Drive" template. For more powerful n8n templates, visit our website or contact us at AI Automation Pro. We help your business build custom AI workflow automation and apps. Who is this for? This template is intended for: n8n Users and Administrators:** Who have previously backed up their n8n workflows as JSON files to Google Drive. Anyone needing to recover their n8n setup:** Whether due to system failure, data corruption, accidental deletions, or during an instance migration. What problem is this workflow solving? / use case Restoring multiple n8n workflows manually can be a slow and error-prone process. This workflow solves that by: Automating Bulk Restore:** Quickly re-imports all workflows from a specified Google Drive backup folder, drastically cutting down on manual effort. Disaster Recovery:** Enables rapid recovery of your automation environment, minimizing downtime after a system failure or data corruption. Simplified Instance Migration:** Makes the process of transferring your entire workflow suite to a new n8n server significantly more manageable and less error-prone compared to manual imports. Data Integrity:** Helps restore workflows to a known good state from your backups, ensuring consistency after a recovery or migration. What this workflow does Manual Trigger: You initiate the workflow manually whenever a restore operation is needed. List Backup Files: The workflow accesses a specific Google Drive folder (which you must configure) and lists all the files within it. It assumes these are your n8n workflow JSON backup files. Iterate and Process: It then loops through each file found in the Google Drive folder: Download Workflow: Downloads the individual workflow JSON file from Google Drive. Extract Content: Parses the downloaded file to extract the JSON data representing the workflow. Import to n8n: Uses the n8n API to create a new workflow (or update an existing one if an ID match is found) in your current n8n instance using the extracted JSON data. Wait Step: Pauses for 3 seconds after attempting to create each workflow to help manage system load and avoid potential API rate-limiting issues. Step-by-step setup Import Template: Upload the provided JSON file into your n8n instance. Configure Credentials: Google Drive Nodes: You will need to create or select existing Google Drive OAuth2 API credentials for these nodes. n8n Node: Configure your n8n API credentials to allow the workflow to create/update workflows in your instance. Specify Google Drive Backup Folder (CRITICAL): Open the "Google Drive Get All Workflows" node. Locate the "Filter" section, and within it, the "Folder ID" parameter. The default value is a placeholder URL. You MUST change this URL to the direct URL of the Google Drive folder that contains your n8n workflow .json backup files. This would typically be one of the hourly folders (e.g., n8n_backup_YYYY-MM-DD_HH) created by the companion backup workflow. Activate Workflow: Although manually triggered, the workflow needs to be active in your n8n instance to be runnable. How to customize this workflow to your needs Selective Restore:** Option 1 (Manual): Before running the workflow, manually move only the specific workflow JSON files you want to restore into the source Google Drive folder configured in the "Google Drive Get All Workflows" node. Option 2 (Automated Filter): Insert an "Edit Fields" or "Filter" node after the "Google Drive Get All Workflows" node to programmatically select which files (e.g., based on filename patterns) should proceed to the "Loop Over Items" node for restoration. Adjust Wait Time:** The "Wait" node is set to 3 seconds. You can increase this if you have a very large number of workflows or if your n8n instance requires more time between API calls. Conversely, for smaller batches on powerful instances, you might decrease it. Error Handling:** For enhanced robustness, consider adding error handling branches (e.g., using "Error Trigger" nodes or "Continue on Fail" settings within nodes) to log or send notifications if a specific workflow fails to import. Important Considerations Workflow Overwriting/Updating:* If a workflow with the same id as one in a backup JSON file already exists in your n8n instance, this restore process will typically *update/overwrite** that existing workflow with the version from the backup. If the id from the backup file does not correspond to any existing workflow, a new workflow will be created. Idempotency:** Running this workflow multiple times on the exact same backup folder will cause the workflow to re-process all files. This means workflows will be updated/overwritten again if they exist, or created if they don't. Ensure this is the intended behavior. Companion Backup Workflow:** This restore workflow is ideally paired with backups created by a process like our "Auto Backup Workflows To Google Drive" template, which saves workflows in the expected JSON format. Test Safely:** It's highly recommended to test this workflow on a non-production or development n8n instance first, especially when restoring a large number of critical workflows or if you're unsure about the overwrite behavior in your specific n8n setup. Source Folder Content:* Ensure the specified Google Drive folder *only contains n8n workflow JSON files that you intend to restore. Other file types may cause errors in the "Extract from File" node.
by scrapeless official
> ⚠️ Disclaimer: This workflow uses Scrapeless and Claude AI via community nodes, which require n8n self-hosted to work properly. 🔁 How It Works This intelligent B2B lead generation workflow combines search automation, website crawling, AI analysis, and multi-channel output: It starts by using Scrapeless’s Deep Serp API to find company websites from targeted Google Search queries. Each result is then individually crawled using Scrapeless's Crawler module, retrieving key business information from pages like /about, /contact, /services. The raw web content is processed via a Code node to clean, extract, and prepare structured data. The cleaned data is passed to Claude Sonnet (Anthropic) which analyzes and qualifies the lead based on content richness, contact data, and relevance. A filter step ensures only high-quality leads (e.g. lead score ≥ 6) are kept. Sent via Discord webhook for real-time notification (can be replaced with Slack, email, or CRM tools). > 📌 The result is a fully automated system that finds, qualifies, and organizes B2B leads with high efficiency and minimal manual input. ✅ Pre-Conditions Before using this workflow, make sure you have: An n8n self-hosted instance A Scrapeless account and API key (get it here) An Anthropic Claude API key A configured Discord webhook URL (or alternative notification service) ⚙️ Workflow Overview Manual Trigger → Scrapeless Google Search → Item Lists → Scrapeless Crawler → Code (Data Cleaning) → Claude Sonnet → Code (Response Parser) → Filter → Discord Notification 🔨 Step-by-Step Breakdown Manual Trigger – For testing purposes (can be replaced with Cron or Webhook) Scrapeless Google Search – Queries target B2B topics via Scrapeless’s Deep SERP API Item Lists – Splits search results into individual items Scrapeless Crawler – Visits each company domain and scrapes structured content Code Node (Data Cleaner) – Extracts and formats content for LLM input Claude Sonnet (via HTTP Request) – Evaluates lead quality, relevance, and contact info Code Node (Parser) – Parses Claude’s JSON response IF Filter – Filters leads based on score threshold Discord Webhook – Sends formatted message with company info 🧩 Customization Guidance You can easily adjust the workflow to match your needs: Lead Criteria**: Modify the Claude prompt and scoring logic in the Code node Output Channels**: Replace the Discord webhook with Slack, Email, Airtable, or any CRM node Search Topics**: Change your query in the Scrapeless SERP node to find leads in different niches or countries Scoring Threshold**: Adjust the filter logic (lead_score >= 6) to match your quality tolerance 🧪 How to Use Insert your Scrapeless and Claude API credentials in the designated nodes Replace or configure the Discord webhook (or alternative outputs) Run the workflow manually (or schedule it) View qualified leads directly in your chosen notification channel 📦 Output Example Each qualified lead includes: 🏢 Company Name 🌐 Website ✉️ Email(s) 📞 Phone(s) 📍 Location 📈 Lead Score 📝 Summary of relevant content 👥 Ideal Users This workflow is perfect for: AI SaaS companies** targeting mid-market & enterprise leads Marketing agencies** looking for B2B-qualified leads Automation consultants** building scraping solutions No-code developers** working with n8n, Make, Pipedream Sales teams** needing enriched prospecting data
by Yaron Been
Prunaai Flux.1 Dev Image Generator Description This is the fastest Flux Dev endpoint in the world, contact us for more at pruna.ai Overview This n8n workflow integrates with the Replicate API to use the prunaai/flux.1-dev model. This powerful AI model can generate high-quality image content based on your inputs. Features Easy integration with Replicate API Automated status checking and result retrieval Support for all model parameters Error handling and retry logic Clean output formatting Parameters Required Parameters prompt** (string): Prompt Optional Parameters seed** (integer, default: -1): Seed guidance** (number, default: 3.5): Guidance scale image_size** (integer, default: 1024): Base image size (longest side) speed_mode** (string, default: Juiced 🔥 (default)): Speed optimization level aspect_ratio** (string, default: 1:1): Aspect ratio of the output image output_format** (string, default: jpg): Output format output_quality** (integer, default: 80): Output quality (for jpg and webp) num_inference_steps** (integer, default: 28): Number of inference steps How to Use Set up your Replicate API key in the workflow Configure the required parameters for your use case Run the workflow to generate image content Access the generated output from the final node API Reference Model: prunaai/flux.1-dev API Endpoint: https://api.replicate.com/v1/predictions Requirements Replicate API key n8n instance Basic understanding of image generation parameters
by Nícolas Pastorello
What is this? This is an n8n workflow designed to supercharge your Sonarr setup. Instead of just waiting for releases to appear in your RSS feed, this workflow proactively runs on a schedule, finds what's missing, actively searches for it, and grabs the best result based on your specific criteria. It's a "set it and forget it" solution to ensure your library is always complete. Key Features 🚀 Proactive Searching: Doesn't wait for content to come to you. It actively triggers a search for missing episodes. 🗓️ Fully Automated & Scheduled: Runs every 12 hours by default to check for anything new that's missing. 🧠 Smart & Efficient: Searches only once per season, even if multiple episodes from that season are missing, preventing unnecessary API calls. 🎯 Precise Release Filtering: It validates search results against the exact quality name and language you define before telling Sonarr to grab it. This gives you more control than standard quality profiles. ✅ Automatic Download: Once a valid release is found, it's automatically pushed to your download client via Sonarr. How It Works Trigger: The workflow starts automatically on a schedule. Fetch Missing: It connects to your Sonarr instance and gets a list of all monitored, "wanted" episodes. Filter & Group: It intelligently creates a unique list of seasons that need searching. Search: It loops through each unique season and tells Sonarr to perform an interactive search. Validate: It inspects the search results and only allows releases that match both the pre-defined quality AND language. Grab: If a perfect match is found, it sends a final command to Sonarr to grab that specific release and begin the download. How to Use This Template Import the JSON file into your n8n instance. Find the node named "info" (it's a "Set" node near the beginning). This is your main configuration area. Update the following values in the "info" node: urlSonar: Change http://192.168.31.204:8989 to your Sonarr's URL. apikey: Paste your Sonarr API key here. quality: Set the exact quality name you want to match (e.g., WEBDL-1080p). languages: Set the exact language name you want to match (e.g., English, Spanish). Activate the workflow. That's it! You can also change the schedule by editing the "Schedule Trigger" node.
by Kev
⚠️ Important: This workflow uses the Autype community node and requires a self-hosted n8n instance. Send an email with a document request and optional PDF attachments. The AI assistant can summarize documents, compare multiple PDFs, draft new content, or create documents from scratch with internet research — all output as professionally branded PDFs using Autype. The finished document is delivered back to the sender via email. Who is this for? Consultants, analysts, project managers, and teams who need on-demand document generation. Send an email and get a branded PDF back — whether it's a summary, comparison, draft, or a freshly researched document. Concrete example: Attach 3 PDF proposals and write "Compare these proposals and recommend the best option" — each PDF is OCR'd via Autype Lens, the AI assistant produces a structured comparison with tables, and you receive a branded PDF within minutes. This also works as an additional skill for an AI agent. Instead of an email trigger, connect the workflow to a webhook or chat trigger so an agent can call it when a user asks "create a summary of these documents." What this workflow does On each incoming email, the workflow: Extracts the email subject + body as the document request, and detects PDF attachments Processes each attached PDF sequentially: uploads to Autype, extracts text via Lens OCR Combines all OCR results into a single context Downloads the Autype Extended Markdown syntax reference so the AI knows the output format Passes the request text + all PDF content to an AI Document Assistant with Firecrawl and SerpAPI as research tools The assistant determines the task type (summarize, compare, draft, or create from scratch) and produces the document in Autype Extended Markdown Autype renders the markdown to a branded PDF with company styling (fonts, colors, heading styles, tables, header with logo, footer with page numbers) The PDF is delivered back to the original sender via email Output structure How it works New Email Received — An IMAP Email Trigger monitors your inbox for incoming document requests. The email subject and body become the request text; PDF attachments are automatically detected. Set Company Config — A Set node defines your company name, logo URL, and brand color. Edit these values once. Extract & Split PDFs — A Code node extracts the sender email, combines subject + body as request text, and detects PDF attachments. Each PDF is split into a separate item for loop processing. If no PDFs are attached, a single item with just the text is output. Has PDFs? — An IF node routes the flow: emails with PDF attachments enter the processing loop, text-only emails skip directly to the AI Assistant. Loop Over PDFs — A Split In Batches node processes each PDF sequentially (one at a time to avoid API rate limits). Upload PDF to Autype — Each PDF is uploaded to Autype via the community node (resource: file). Autype Lens OCR — An HTTP Request node triggers Autype Lens OCR on the uploaded file with outputFormat: "md". This uses Generic Auth Type → Header Auth with X-API-Key set to your Autype API key. Cost: 4 credits per page. A dedicated community node for Lens is planned. Wait for OCR → Poll OCR Status — Waits 8 seconds, then polls the job status via HTTP Request (same Header Auth credential). The loop continues to the next PDF after each OCR completes. Extract OCR Text — Extracts the markdown text from each OCR result and stores it with the original filename. Combine All OCR Results — After the loop completes, collects all OCR texts and combines them into a single context string with labeled sections per PDF. Prepare Text Only — For emails without PDFs, passes just the request text forward. Download Markdown Syntax — Fetches the Autype Extended Markdown syntax reference so the AI knows the output format. Merge Context — Combines the request text, all OCR content, and the markdown syntax reference into a single item for the AI Agent. AI Document Assistant — An n8n AI Agent (OpenRouter) with two tools: Firecrawl Scrape — Scrapes specific URLs to extract page content as markdown. SerpAPI — Web search for current information, statistics, and facts. The assistant determines the task type (summarize, compare, draft, or create from scratch). The system prompt limits tool usage to max 5 calls and prioritizes attached PDF content. Prepare Render Payload — Cleans the AI output (strips code fences), generates a filename, and prepares branding variables. Render Branded PDF — Autype Render from Markdown generates the PDF with a full defaults JSON for company styling: Roboto font, heading colors from brand color, styled tables with colored headers, header with company logo, and footer with page numbers. See the defaults schema for all options. Send Report via Email — SMTP sends the PDF as an attachment back to the original email sender. Setup Install the Autype community node (n8n-nodes-autype) via Settings > Community Nodes. Create an Autype API credential with your API key from app.autype.com. See API Keys in Settings. Create a Header Auth credential for the Lens OCR HTTP Request nodes: Go to Credentials > New > Header Auth Name: X-API-Key Value: your Autype API key (same key as step 2) Assign this credential to the "Autype Lens OCR" and "Poll OCR Status" nodes. Create an OpenRouter API credential (or replace the chat model with OpenAI/Anthropic). Create an IMAP credential for the email inbox to monitor. Create an SMTP credential for sending emails. Get a Firecrawl API key from firecrawl.dev and create a Firecrawl credential. Get a SerpAPI key from serpapi.com and create a SerpAPI credential. Import this workflow and assign your credentials to each node. Edit the Set Company Config node: companyName — Your company name (appears in header/footer) companyLogoUrl — URL to your company logo (PNG/JPEG, publicly accessible) brandColor — Hex color for headings and table headers (e.g. #1a5276) Update the Send Report via Email node with your sender email address. Activate the workflow — any new email to the monitored inbox triggers document generation. > Note: This is a community node. It is not maintained by the n8n team. You need a self-hosted n8n instance to use community nodes. Requirements Self-hosted n8n instance (community nodes are not available on n8n Cloud) Autype account with API key (Lens OCR costs 4 credits/page, Render from Markdown costs 1 credit) n8n-nodes-autype community node installed OpenRouter API key (or OpenAI/Anthropic — configurable chat model) IMAP credentials for the monitored inbox SMTP credentials for sending emails Firecrawl API key (free tier: 500 pages/month) SerpAPI key (serpapi.com) How to customize Change AI model:** Replace the OpenRouter Chat Model sub-node with OpenAI, Anthropic Claude, Google Gemini, or any LangChain-compatible chat model. Add more research tools:** Add additional tool nodes for specialized APIs — Google Scholar, SEC filings, PubMed, or internal knowledge bases. Customize styling:** Edit the defaults JSON in the Render Branded PDF node to change fonts, colors, heading styles, table designs, header/footer content, and spacing. See the defaults schema for all available options. Replace email trigger:** Swap the IMAP Email Trigger with a Form Trigger, Webhook, or Chat Trigger to accept input from different sources. Add watermark:** Insert an Autype Watermark step after rendering to stamp "DRAFT" or "CONFIDENTIAL" on every page. Save to cloud storage:** Add a Google Drive, S3, or SharePoint upload step after rendering (before or instead of SMTP). Adjust OCR wait time:** For large PDFs (10+ pages), increase the Wait node from 8 to 15-20 seconds, or add a retry loop that polls until status is COMPLETED. Use Autype community node for Lens:** Once the Autype community node adds Lens OCR support, replace the HTTP Request OCR/poll chain with a single Autype node. Change output format:** Switch from Render from Markdown to Render from JSON for a better manipulation experience
by TheUnknownEntity
I'm currently trialing a 4 day work week for all staff at my company, and one of the major impacts on productivity is interruptions. As such, I opted to use N8N to create a workflow to monitor my Google Calendar and when an event starts, to update my Slack status with an emote and the title of the calendar task. Additionally I opted to include to change the colour of Philips Hue lamp located in my living room where my wife is currently working so she know's if she can interrupt me or not. My calendar is built on the theory behind the Diary Detox system and as such the Slack Status reflect the colours involved. This was achieved using the emote aliases for the relevant colour circles. The Philips Hue lamp status is changed via the local API with Home Assistant. This is a very similiar process to controlling it with something like the Streamdeck, but the workflow calls the Webhook instead of the Streamdeck. This process can be found in lots of Youtube videos such as this. This gives my wife a very quick and easy way to know if she can interrupt me in my office (when the lights are Green or Blue) or when I'm busy (Red). Please Note: The above images are not intended to be an incentive to create your own Squid Games. Additionally, when integrating Slack with N8N, there are 2 x APIs which can be used. Typically the Bot User OAuth Token is used, however in order for your Status to be updated, the User OAuth Token must be used with the users.profile:read and users.profile:write permissions enabled. For clarity, I have removed the Webhooks from the Workflow as this would allow any person to control my lights. These can be inserted in the HTTP Request nodes. Each node responds to a different automation within the Home Assistant infrastructure. Acknowledgement: I would also credit Jon (Discord) aka 8668 (Workflows) for writing the Function node which turns the ColorID into a named variable.
by n8n Team
This is an example workflow that imports an XML file into an SQL database. The ReadBinaryFiles node loads the XML file from the server. Then the Code node extracts the file content from the binary buffer. Afterwards, an XML node converts the XML string into a JSON structure. Finally, in the MySQL node inserts the data records into the SQL table. In the upper part of the workflow there is another MySQL node that is disabled. This node creates a new table with all the required variables based on the sample SQL database: https://www.mysqltutorial.org/mysql-sample-database.aspx
by Yaron Been
Bytedance Seedance 1 Pro Video Generator Description A pro version of Seedance that offers text-to-video and image-to-video support for 5s or 10s videos, at 480p and 1080p resolution Overview This n8n workflow integrates with the Replicate API to use the bytedance/seedance-1-pro model. This powerful AI model can generate high-quality video content based on your inputs. Features Easy integration with Replicate API Automated status checking and result retrieval Support for all model parameters Error handling and retry logic Clean output formatting Parameters Required Parameters prompt** (string): Text prompt for video generation Optional Parameters fps** (string, default: 24): Frame rate (frames per second) seed** (integer, default: None): Random seed. Set for reproducible generation image** (string, default: None): Input image for image-to-video generation duration** (string, default: 5): Video duration in seconds resolution** (string, default: 1080p): Video resolution aspect_ratio** (string, default: 16:9): Video aspect ratio. Ignored if an image is used. camera_fixed** (boolean, default: False): Whether to fix camera position How to Use Set up your Replicate API key in the workflow Configure the required parameters for your use case Run the workflow to generate video content Access the generated output from the final node API Reference Model: bytedance/seedance-1-pro API Endpoint: https://api.replicate.com/v1/predictions Requirements Replicate API key n8n instance Basic understanding of video generation parameters
by David w/ SimpleGrow
Receive Webhook Notification The workflow starts when a webhook receives a POST request from Whapi, notifying that a new participant has joined a WhatsApp group. Filter the Event The workflow checks two conditions: The event is for the correct WhatsApp group (matching the specific group ID). The action type is "add" (meaning a user was added to the group). Send Welcome Message If both conditions are met, the workflow sends a personalized welcome message to the new participant via Whapi. The message explains the group rules and how the user can earn points and participate in weekly raffles. Create Airtable Record After sending the welcome message, the workflow creates a new record in the Airtable database for the new participant. The record includes: The participant’s WhatsApp ID An initial engagement count of 100 points The date of the last interaction (set to today) Result Every new group member is automatically welcomed and registered in your engagement database with starter points, ready to participate in your group’s activities and rewards. This workflow ensures new users are greeted, informed, and instantly included in your engagement tracking system.
by Dataki
This workflow enriches new Pipedrive organization's data by adding a note to the organization object in Pipedrive. It assumes there is a custom "website" field in your Pipedrive setup, as data will be scraped from this website to generate a note using OpenAI. Then, a notification is sent in Slack. ⚠️ Disclaimer This workflow uses a scraping API. Before using it, ensure you comply with the regulations regarding web scraping in your country or state. Important Notes The OpenAI model used is GPT-4o, chosen for its large input token capacity. However, it is not the cheapest model if cost is very important to you. The system prompt in the OpenAI Node generates output with relevant information, but feel free to improve or modify it according to your needs. How It Works Node 1: Pipedrive Trigger - An Organization is Created This is the trigger of the workflow. When an organization object is created in Pipedrive, this node is triggered and retrieves the data. Make sure you have a "website" custom field in Pipedrive (the name of the field in the n8n node will appear as a random ID and not with the Pipedrive custom field name). Node 2: ScrapingBee - Get Organization's Website's Homepage Content This node scrapes the content from the URL of the website associated with the Pipedrive Organization created in Node 1. The workflow uses the ScrapingBee API, but you can use any preferred API or simply the HTTP request node in n8n. Node 3: OpenAI - Message GPT-4o with Scraped Data This node sends HTML-scraped data from the previous node to the OpenAI GPT-4o model. The system prompt instructs the model to extract company data, such as products or services offered and competitors (if known by the model), and format it as HTML for optimal use in a Pipedrive Note. Node 4: Pipedrive - Create a Note with OpenAI Output This node adds a Note to the Organization created in Pipedrive using the OpenAI node output. The Note will include the company description, target market, selling products, and competitors (if GPT-4o was able to determine them). Node 5 & 6: HTML To Markdown & Code - Markdown to Slack Markdown These two nodes format the HTML output to Slack Markdown. The Note created in Pipedrive is in HTML format, as specified by the System Prompt of the OpenAI Node. To send it to Slack, it needs to be converted to Markdown and then to Slack Markdown. Node 7: Slack - Notify This node sends a message in Slack containing the Pipedrive Organization Note created with this workflow.
by Fernanda Silva
Workflow Description Your workflow is an intelligent chatbot, using ++OpenAI assistant++, integrated with a backend that supports WhatsApp Business, designed to handle various use cases such as sales and customer support. Below is a breakdown of its functionality and key components: Workflow Structure and Functionality Chat Input (Chat Trigger) The flow starts by receiving messages from customers via WhatsApp Business. Collects basic information, such as session_id, to organize interactions. Condition Check (If Node) Checks if additional customer data (e.g., name, age, dependents) is sent along with the message. If additional data is present, a customized prompt is generated, which includes this information. The prompt specifies that this data is for the assistant's awareness and doesn’t require a response. Data Preparation (Edit Fields Nodes) Formats customer data and the interaction details to be processed by the AI assistant. Compiles the customer data and their query into a single text block. AI Responses (OpenAI Nodes) The assistant’s prompt is carefully designed to guide the AI in providing accurate and relevant responses based on the customer’s query and data provided. Prompts describe the available functionalities, including which APIs to call and their specific purposes, helping to prevent “hallucinated” or irrelevant responses. Memory and Context (Postgres Chat Memory) Stores context and messages in continuous sessions using a database, ensuring the chatbot maintains conversation history. API Calls The workflow allows the use of APIs with any endpoints you choose, depending on your specific use case. This flexibility enables integration with various services tailored to your needs. The OpenAI assistant understands JSON structures, and you can define in the prompt how the responses should be formatted. This allows you to structure responses neatly for the client, ensuring clarity and professionalism. Make sure to describe the purpose of each endpoint in the assistant’s prompt to help guide the AI and prevent misinterpretation. Customer Response Delivery After processing and querying APIs, the generated response is sent to the backend and ultimately delivered to the customer through WhatsApp Business. Best Practices Implemented Preventing Hallucinations** Every API has a clear description in its prompt, ensuring the AI understands its intended use case. Versatile Functionality** The chatbot is modular and flexible, capable of handling both sales and general customer inquiries. Context Persistence** By utilizing persistent memory, the flow maintains continuous interaction context, which is crucial for longer conversations or follow-up queries. Additional Recommendations Include practical examples in the assistant’s prompt, such as frequently asked questions or decision-making flows based on API calls. Ensure all responses align with the customer’s objectives (e.g., making a purchase or resolving technical queries). Log interactions in detail for future analysis and workflow optimization. This workflow provides a solid foundation for a robust and multifunctional virtual assistant 🚀