Generate marketing ad banners with LINE, Gemini, and Nano Banana Pro
About This Template This workflow creates high-quality, text-rich advertising banners from simple LINE messages. It combines Google Gemini (for marketing-focused prompt engineering) and Nano Banana Pro (accessed via Kie.ai API) to generate images with superior text rendering capabilities. It also handles the asynchronous API polling required for high-quality image generation. How It Works Input: Users send a banner concept via LINE (e.g., "Coffee brand, morning vibe"). Prompt Engineering: Gemini optimizes the request into a detailed prompt, specifying lighting, composition, and Japanese catch-copy placement. Async Generation: The workflow submits a job to Nano Banana Pro (Kie API) and intelligently waits/polls until the image is ready. Hosting: The final image is downloaded and uploaded to a public AWS S3 bucket. Delivery: The image is pushed back to the user on LINE. Who It’s For Marketing teams creating A/B test assets. Japanese market advertisers needing accurate text rendering. Developers looking for an example of Async API Polling patterns in n8n. Requirements n8n (Cloud or Self-hosted). Kie.ai API Key (for Nano Banana Pro model). Google Gemini API Key. AWS S3 Bucket (Public access enabled). LINE Official Account (Messaging API). Setup Steps Credentials: Configure the "Header Auth" credential for the Kie.ai nodes (Header: Authorization, Value: Bearer YOURAPIKEY). AWS: Ensure your S3 bucket allows public read access so LINE can display the image. Webhook: Add the production webhook URL to your LINE Developers console.
Automate digital product delivery & sales tracking with Stripe, Email, Notion & Telegram
Overview This workflow automates the end-to-end delivery of digital products after a successful Stripe checkout. It eliminates manual fulfillment, keeps a structured sales log in Notion, and optionally notifies you in Telegram. It’s designed for template sellers, coaches, course creators, and micro-SaaS owners who want to professionalize their delivery process without custom code. Workflow Logic Webhook Trigger (Stripe) Listens for the checkout.session.completed event. Path: /stripe-webhook Method: POST Response Mode: onReceived HTTP Request – Get Checkout Session Fetches full session details from Stripe API. URL: https://api.stripe.com/v1/checkout/sessions/{{$json.body.data.object.id}} Authentication: Header Auth (Authorization: Bearer YOURSTRIPESECRET_KEY) IF Node – Check Product Evaluates line_items.data[0].description from Stripe response. Routes flow depending on which product was purchased (e.g., Notion Template A vs Notion Template B). Email Send Nodes Sends product delivery emails with personalized greeting and download link. To: {{$json.customer_details.email}} Subject: Your Elegant Template is Ready ✨ Body text includes product-specific link. Notion Node – Log Sale Creates a page in your Sales Log database. Properties: Name → {{$json.customer_details.name}} Email → {{$json.customer_details.email}} Product → {{$json.line_items.data[0].description}} Date → {{$now}} Status → Delivered Telegram Notify Node (Optional) Sends you a private message: 💸 New Sale! Product: {{ $json.line_items.data[0].description }} Buyer: {{ $json.customer_details.name }} Requires YOURTELEGRAMCHAT_ID and bot token. Node List Webhook (Stripe) HTTP Request (Stripe API) IF (Check Product) Email Send (Product Delivery) Notion (Create Page) Telegram (Send Message) Setup Instructions Stripe: Create a webhook endpoint in your Stripe dashboard. Subscribe to checkout.session.completed. Add your secret key into the HTTP Request node (YOURSTRIPESECRET_KEY). Notion: Create a Sales Log database. Share with your Notion API integration. Replace YOURNOTIONDATABASE_ID with the correct ID. Email: Configure SMTP credentials or Gmail OAuth in the Email Send node. Update sender email (fromEmail). Telegram (Optional): Create a bot with BotFather. Get your chat ID. Add your token and YOURTELEGRAMCHAT_ID in the node. Why It’s Gallery-Ready ✅ Clear business use case (digital delivery, sales tracking). ✅ Proper variable usage ($json syntax, no hardcoded customer data). ✅ No exposed API keys (placeholders provided). ✅ Markdown-based documentation with H2 headings. ✅ Broad but specific: works for any digital seller (Notion, PDFs, Canva, courses). Example Use Cases Auto-deliver Notion templates or digital kits after Stripe checkout. Log all sales in a Notion database for tracking/reporting. Send instant Telegram notifications so you never miss a new customer. Replace manual fulfillment with a professional automation pipeline. ✨ With this workflow, you’ll never have to manually email files again. Customers are delighted with instant delivery, your sales records stay organized, and you gain real-time visibility on every transaction.
Generate AI inventory reorder recommendations from Airtable with GPT-4o, Slack and email
📘 Description This workflow automates end-to-end AI-driven inventory intelligence, transforming Airtable stock data into optimized reorder recommendations, daily operational summaries, and instant Slack alerts. It fetches all inventory rows, validates structure, computes reorder and safety-stock metrics using strict formulas, merges multi-batch AI output into a unified dataset, and distributes actionable insights across Email and Slack. Invalid or corrupted Airtable rows are logged to Google Sheets for audit and cleanup. The workflow ensures deterministic inventory math (zero improvisation), strict JSON compliance, and reliable multi-channel reporting for operations teams. ⚙️ What This Workflow Does (Step-by-Step) ▶️ Manual Trigger – Start Inventory Optimization Runs the full optimization and reporting pipeline on demand. 📦 Fetch Inventory Records from Airtable Retrieves all SKU records (ID, ItemName, SKU, quantities, reorder levels) from the Airtable Inventory table. 🔍 Validate Inventory Record Structure (IF) Ensures each record contains a valid id. Valid → routed to AI optimization Invalid → saved to Google Sheets. 📄 Log Invalid Inventory Rows to Google Sheet Captures malformed or incomplete Airtable items for audit checks and data hygiene. 🧠 Configure GPT-4o — Inventory Optimization Model Defines the AI model for stock-level calculations using strict formulas: SuggestedReorderPoint = ReorderLevel × 1.2 SuggestedSafetyStock = ReorderLevel × 0.5 StockStatus logic: Critical if QuantityInStock ≤ SuggestedSafetyStock Needs Reorder if QuantityInStock ≤ SuggestedReorderPoint OK otherwise 🤖 Generate Inventory Optimization Output (AI) The AI engine analyzes each SKU and returns: Suggested reorder point Suggested safety stock Updated stock status Clean structured JSON for each item All without markdown, hallucination, or additional logic. 🧩 Merge AI Optimization Results (Code) Consolidates all partial AI responses into one complete JSON dataset containing all SKUs. 🧠 Configure GPT-4o – Email Summary Model Prepares the AI model used for generating a professional operations-team email. 📧 Generate Inventory Email Summary (AI) Creates a manager-ready email including: High-level inventory health Detailed SKU summaries Alerts for low, reorder-level, or critical stock Recommended actions for today’s operations 📨 Email Inventory Summary to Manager (Gmail) Sends the completed inventory summary to the operations manager. 🧠 Configure GPT-4o – Slack Summary Model Sets up GPT-4o to produce a compact, emoji-supported Slack summary. 💬 Generate Inventory Slack Summary (AI) Builds a Slack-optimized message containing: One-line inventory health Bullet list of SKUs with stock status Clear alerts for reorder-level or critical items One recommended action line 📡 Notify Operations Team on Slack Delivers the optimized Slack summary to the operations Slack user/channel for real-time visibility. 🧩 Prerequisites Airtable access token Azure OpenAI GPT-4o credentials Google Sheets OAuth Slack API credentials Gmail OAuth 💡 Key Benefits ✔ AI-powered stock calculations with strict formulas ✔ Reliable reorder and safety-stock predictions ✔ Instant multi-channel reporting (Email + Slack) ✔ Full audit logging for invalid data ✔ Zero hallucinations—pure structured JSON ✔ Faster decision-making for operations teams 👥 Perfect For Operations & supply-chain teams Inventory managers Retail & e-commerce units Businesses using Airtable for stock tracking