Back to Catalog

Generate AI-curated sales quotes with OpenAI, Qdrant & CraftMyPDF PDF delivery

Cong NguyenCong Nguyen
101 views
2/3/2026
Official Page

πŸ‘€ Short Description

Turn form submissions into AI-curated quotes with SKU selection straight from Qdrant, branded PDF generation, and automatic emailβ€”now streamlined for quoting only (FAQ removed). (Improved from the previous workflow: Automated Request-to-Quote System with OpenAI, Google Sheets & CraftMyPDF Email Delivery)

πŸŽ‰What’s new vs. the old version

  • Products now come directly from Qdrant (no Google Sheets catalog in the loop).
  • Focused quote-only flow β€” removed FAQ/RAG nodes for a leaner, faster pipeline.
  • Agent enforces a JSON-only contract, keeping pricing/stock grounded in Qdrant payloads.
  • Easier to maintain; fewer moving parts and lower token usage.

πŸ“„ What this workflow does

  • Captures lead details via Form: Request a Quote.
  • Searches your Qdrant collection (products) for relevant SKUs by keyword, use-case, features, and budget hints.
  • An AI Agent (OpenAI) selects in-stock SKUs, respects min_qty, and returns a strict JSON quote (optional discount ≀ 10%).
  • A Code step computes line totals, discount, VAT, generates a unique invoice_number (e.g., Q-YYYYMMDD-ABCDE), and validates or falls back the due_date.
  • CraftMyPDF renders a branded PDF; the file is fetched and SMTP emails the quote to the customer.

πŸ‘€ Who this is for

  • SMBs and sales teams needing instant, accurate quotes from website forms.
  • Ops teams storing product data in Qdrant and wanting AI-assisted SKU selection.
  • Agencies or shops that must generate consistent, branded PDFs and send them automatically.

βœ… Requirements

  • Self-hosted n8n instance.
  • Qdrant collection (default: products) with payload fields:
  • sku, name, uom, unit_price, currency, in_stock (true/false), min_qty, handle/url, features.
  • Connected credentials: OpenAI (or compatible), Qdrant API, CraftMyPDF, SMTP.
  • A CraftMyPDF template aligned with the Code node output (invoice_number, items[], gross_total, etc.).

βš™οΈ How to set up

  1. Import the workflow JSON into n8n.
  2. In Qdrant Vector Store (Products), set collection=products and your Qdrant API credentials.
  3. In Sales Quote Agent, keep or change the model (default gpt-4.1-mini) and the JSON-only system prompt.
  4. In Create a PDF, set your CraftMyPDF templateId.
  5. In Email: Send Quote, set fromEmail and SMTP credentials.
  6. Submit a test form; verify: Agent JSON β†’ PDF render β†’ email delivery.
  7. (Optional) Adjust defaults in the Code node: vat_pct (default 10), payment_terms, currency fallback, valid_days.

πŸ” How it works (end-to-end)

  1. Trigger β†’ Form captures: Full Name, Email, Company, Requirements, Budget Min/Max, Need By, Notes.
  2. Product Search β†’ Agent calls PRODUCTS_QDRANT to retrieve relevant SKUs and payload fields from Qdrant.
  3. Agent Quote β†’ Selects SKUs and qty, applies pricing and ≀10% discount.

πŸ’‘ About Margin AI

Margin AI is your AI Service Companion. We help organizations design intelligent, human-centric automation β€” from content pipelines and branding workflows to customer insights and sales enablement. Our tailored AI solutions scale marketing, operations, and creative processes with ease.

n8n AI-Curated Sales Quotes with OpenAI, Qdrant, and CraftMyPDF Delivery

This n8n workflow automates the generation of AI-curated sales quotes and delivers them via email, leveraging the power of OpenAI for intelligent content generation, Qdrant for vector-based information retrieval, and an external PDF generation service (CraftMyPDF, inferred from the directory name, though not explicitly in the JSON).

What it does

This workflow streamlines the process of creating and sending personalized sales quotes by:

  1. Triggering on form submission: Initiates the workflow when a new form is submitted, likely containing customer and product details for the quote.
  2. Preparing data: Uses an "Edit Fields" node to manipulate or set specific data points for subsequent AI processing.
  3. Generating embeddings: Utilizes OpenAI Embeddings to convert input text into vector representations, crucial for similarity searches in the vector store.
  4. Retrieving relevant information: Queries a Qdrant Vector Store to find and retrieve relevant product information, pricing, or past sales data based on the generated embeddings.
  5. Generating sales quote content with AI: Employs an OpenAI Chat Model (or Google Gemini Chat Model, if configured) and an AI Agent, potentially using a "Vector Store Question Answer Tool," to craft a personalized sales quote based on the retrieved information and the initial form submission.
  6. Delivering the quote: Sends the generated sales quote via email.

Prerequisites/Requirements

To use this workflow, you will need:

  • n8n Instance: A running instance of n8n.
  • OpenAI API Key: For the OpenAI Embeddings and OpenAI Chat Model nodes.
  • Qdrant Instance: Access to a Qdrant vector database for storing and retrieving product/sales data.
  • SMTP Credentials: For the "Send Email" node to deliver the quotes.
  • External PDF Generation Service (e.g., CraftMyPDF): Although not explicitly defined in the JSON, the workflow's directory name suggests an integration with a PDF generation service like CraftMyPDF for creating the final quote document. This would likely involve an HTTP Request node configured to interact with such a service.
  • Google Gemini API Key (Optional): If you choose to use the Google Gemini Chat Model instead of OpenAI.

Setup/Usage

  1. Import the workflow: Download the provided JSON and import it into your n8n instance.
  2. Configure Credentials:
    • Set up your OpenAI API Key credential for the Embeddings OpenAI and OpenAI Chat Model nodes.
    • Configure your Qdrant credential for the Qdrant Vector Store and Answer questions with a vector store nodes.
    • Set up your SMTP credential for the Send Email node.
    • If using Google Gemini, configure its API key for the Google Gemini Chat Model.
  3. Configure the n8n Form Trigger:
    • Activate the On form submission trigger node.
    • Define the form fields that will be submitted to initiate the quote generation (e.g., customerName, productInterest, quantity, specialRequests).
  4. Customize "Edit Fields": Adjust the Edit Fields node (ID: 38) to transform or prepare the incoming form data as needed for the AI agent and vector store queries.
  5. Configure Qdrant Vector Store: Ensure your Qdrant instance is populated with relevant product information, pricing, and any other data that should be used to generate quotes. Configure the Qdrant Vector Store node (ID: 1248) with your collection name and host details.
  6. Customize AI Agent and Language Model:
    • Review the AI Agent node (ID: 1119) and the chosen OpenAI Chat Model (ID: 1153) or Google Gemini Chat Model (ID: 1262) for specific instructions or prompts to guide the quote generation.
    • The Answer questions with a vector store tool (ID: 1269) should be linked to your Qdrant setup.
  7. Configure PDF Generation (Hypothetical): If using a PDF generation service, an HTTP Request node (not explicitly shown in the provided JSON but implied by the directory name) would be placed before the Send Email node. Configure this node to send the AI-generated quote content to your chosen PDF service (e.g., CraftMyPDF) and retrieve the generated PDF.
  8. Configure "Send Email":
    • Specify the recipient email address (e.g., from the form submission).
    • Define the email subject and body, including the AI-generated quote content and potentially attaching the generated PDF.
  9. Activate the workflow: Once configured, activate the workflow to start automating your sales quote generation.

Related Templates

Track meal nutrition from meal photos with LINE, Google Gemini and Google Sheets

AI Meal Nutrition Tracker with LINE and Google Sheets Who's it for This workflow is designed for health-conscious individuals, fitness enthusiasts, and anyone who wants to track their daily food intake without manual calorie counting. It is best suited for users who want a simple, AI-powered meal logging system that analyzes food photos one at a time and provides instant nutritional feedback via LINE. What it does This workflow processes a single meal photo sent via LINE, analyzes it using Google Gemini AI to identify foods and estimate nutritional content, and stores the data in Google Sheets for tracking. The workflow focuses on simplicity and encouragement: it receives a meal image, performs AI-based food recognition, estimates calories and macronutrients, calculates a health score, provides personalized advice, and replies with a detailed nutritional breakdown on LINE. How it works A single meal photo is sent to the LINE bot. The workflow is triggered via a LINE webhook. The image file is downloaded and sent to Google Gemini AI for food analysis. The AI identifies foods and estimates nutritional values (calories, protein, carbs, fat, fiber). A health score (1-10) is calculated with personalized improvement tips. The data is appended to Google Sheets for meal history tracking. The image is uploaded to Google Drive for reference. A formatted nutritional report with advice is sent back as a LINE reply. This workflow is intentionally designed to handle one image per execution. Requirements To use this workflow, you will need: A LINE Messaging API account A Google Gemini API key A Google account with access to Google Sheets and Google Drive A Google Sheets document with the following column names: Date Time Meal Type Food Items Calories Protein (g) Carbs (g) Fat (g) Fiber (g) Health Score Advice Image URL Important limitations This workflow does not support multiple images sent in a single message. Sending images in quick succession may trigger multiple executions and lead to unexpected results. Only the first image in an event payload is processed. Nutritional values are AI estimates based on visual analysis and typical serving sizes. Accuracy depends on image quality, lighting, and food visibility. This tool should not replace professional dietary advice. These limitations are intentional to keep the workflow simple and easy to understand. How to set up Create a LINE Messaging API channel and obtain a Channel Access Token. Generate a Google Gemini API key. Update the Config node with your LINE token, Google Sheets ID, Google Drive folder ID, and daily calorie goal. Configure credentials for LINE, Google Gemini, Google Sheets, and Google Drive. Register the n8n webhook URL in your LINE channel settings. Activate the workflow in n8n and test it with a single meal photo. How to customize Modify the AI prompt in the "Analyze Meal with AI" node to support different languages or dietary frameworks (keto, vegan, etc.). Adjust the daily calorie goal in the Config node to match individual needs. Add additional nutritional fields such as sodium, sugar, or vitamins. Replace Google Sheets with a fitness app API or database. Integrate with other services to send daily/weekly nutrition summaries. --- Note: This workflow was tested using real meal photos sent individually via the LINE Messaging API. Nutritional estimates are approximations and may vary from actual values. For accurate dietary tracking, consult a registered dietitian.

Oka HironobuBy Oka Hironobu
89

Track free Udemy courses automatically with RapidAPI and Google Sheets

This workflow fetches free Udemy courses hourly via the Udemy Coupons and Courses API on RapidAPI, filters them, and updates a Google Sheet. It sends alerts on errors for smooth monitoring. --- Node-by-Node Explanation Schedule Trigger: Runs the workflow every hour automatically. Fetch Udemy Coupons: Sends POST request to the Udemy Coupons and Courses API on RapidAPI to get featured courses. Check API Success: Verifies if the API response is successful; routes accordingly. Filter Free Courses: Selects only courses with sale_price of zero (free courses). Send Error Notification: Emails admin if API fetch fails for quick action. Sync Courses to Google Sheet: Appends or updates the filtered free courses into Google Sheets. --- Google Sheets Columns id name price sale_price image lectures views rating language category subcategory slug store sale_start --- Google Sheets Setup & Configuration Steps Create Google Sheet: Create or open a Google Sheet where you want to sync courses. Set Headers: Add columns headers matching the fields synced (id, name, price, etc.). Enable Google Sheets API: Go to Google Cloud Console, enable Google Sheets API for your project. Create Service Account: In Google Cloud Console, create a Service Account with editor access. Download Credentials: Download the JSON credentials file from the service account. Share Sheet: Share your Google Sheet with the Service Account email (found in JSON file). Configure n8n Google Sheets Node: Use the service account credentials, set operation to β€œAppend or Update”, provide Sheet URL and sheet name or gid. Match Columns: Map the course fields to your sheet columns and set id as the unique key for updates. --- How to Obtain RapidAPI Key & Setup API Request Sign up/Login: Visit RapidAPI Udemy Coupons and Courses API and create an account or log in. Subscribe to API: Subscribe to the Udemy Coupons and Courses API plan (free or paid). Get API Key: Navigate to your dashboard and copy your x-rapidapi-key. Configure HTTP Request: In your workflow’s HTTP Request node: Set method to POST. URL: https://udemy-coupons-and-courses.p.rapidapi.com/featured.php Add headers: x-rapidapi-host: udemy-coupons-and-courses.p.rapidapi.com x-rapidapi-key: your copied API key Set content type to multipart/form-data. Add body parameter: page=1 (or as needed). Test API: Run the node to ensure the API responds with data successfully before continuing workflow setup. --- Use Cases & Benefits Automates daily updates of free Udemy courses in your sheet using the Udemy Coupons and Courses API on RapidAPI. Saves manual effort in tracking coupons and deals. Enables quick error alerts to maintain data accuracy. Ideal for course aggregators, affiliate marketers, or learning platforms needing fresh course data. --- Who This Workflow Is For Content curators and edtech platforms tracking free courses. Affiliate marketers promoting Udemy deals. Anyone needing real-time access to updated free Udemy coupons.

Sk developer By Sk developer
365

Daily Magento 2 customer sync to Google Contacts & Sheets without duplicates

Automatically sync newly registered Magento 2 customers to Google Contacts and Google Sheets every 24 hours β€” with full duplication control and seamless automation. This workflow is a plug-and-play customer contact automation system designed for Magento 2 store owners, marketers, and CRM teams. It fetches customer records registered within the last 24 hours (from 00:00:00 to 23:59:59), checks against an existing Google Sheet to avoid reprocessing, and syncs only the new ones into Google Contacts. This ensures your contact list is always fresh and up to date β€” without clutter or duplicates. βœ… What This Workflow Does: Automates Customer Syncing Every day, it fetches newly registered Magento 2 customers via API based on the exact date range (midnight to midnight). Deduplicates Using Google Sheets A master Google Sheet tracks already-synced emails. Before adding a customer, the workflow checks this list and skips if already present. Creates Google Contacts Automatically For each unique customer, it creates a new contact in your Google Contacts, saving fields like first name, last name, and email. Logs New Entries to Google Sheets In Google Sheets, it even records magento 2 customer group, createdat, websiteid & store_id After syncing, it adds each new email to the tracking sheet, building a cumulative record of synced contacts. Fully Scheduled & Automated Can be scheduled with the Cron node to run daily (e.g., 12:05 AM) with no manual intervention required. πŸ”§ Modules Used: HTTP Request (Magento 2 API) Date & Time (for filtering registrations) Google Sheets (for reading/writing synced emails) Google Contacts (for contact creation) Set, IF, and Merge nodes (for control logic) Cron (for scheduling the automation) πŸ’Ό Use Cases: Keep your email marketing tools synced with Magento 2 customer data. Build a CRM-friendly contact base in Google Contacts without duplicates. Share customer data with sales or support teams through synced Google Sheets. Reduce manual work and human error in data transfer processes. πŸ”’ Credentials Required Magento 2 Bearer Auth: Set up as a credential in n8n using your Magento 2 API access token. Google API πŸ“‚ Category E-commerce β†’ Magento 2 (Adobe Commerce) πŸ’¬ Need Help? πŸ’‘ Having trouble setting it up or want to customize this workflow further? Feel free to reach out β€” I’m happy to help with setup, customization, or Magento 2 API integration issues. Contact: Author πŸ‘€ Author Kanaka Kishore Kandregula Certified Magento 2 Developer https://gravatar.com/kmyprojects https://www.linkedin.com/in/kanakakishore

Kanaka Kishore KandregulaBy Kanaka Kishore Kandregula
163