Back to Catalog

Templates by Haruki Kuwai

Gmail email categorization & auto reply with GPT-4o and Google Sheets

🧭 Description This section automates Gmail message handling through AI-powered classification and response. Using the LangChain Text Classifier, incoming emails are analyzed and sorted into four categories — High Priority, Advertisement, Inquiry, and Finance/Billing — each triggering a dedicated action flow. High Priority: AI generates a professional draft reply and saves it to Gmail. Advertisement: AI summarizes content and logs it to Google Sheets. Inquiry: AI composes a customer-friendly response automatically. Finance/Billing: AI creates a brief summary and forwards it to the accounting email. This system reduces manual sorting, ensures consistent communication quality, and speeds up email management with full automation. 💡 Use Cases Automatically categorize incoming Gmail messages by topic or intent. Generate AI-written reply drafts for urgent business messages. Summarize marketing or promotional emails into Google Sheets for tracking. Provide automated responses to customer inquiries. Forward billing or invoice messages directly to accounting teams.

Haruki KuwaiBy Haruki Kuwai
1178

Extract business card data from Telegram to Google Sheets with OpenRouter AI Vision

Title (suggested): Extract business card data from Telegram to Google Sheets Who’s it for Teams that receive business cards digitally (sales, marketing, back-office) and want a plug-and-play way to capture contacts into a sheet without manual typing. What it does / How it works This workflow ingests a business card sent to your Telegram bot, detects whether the message contains an image or text, extracts key fields with an AI Vision Agent (company, full name, department, job title, postal code, address, phone, mobile, fax, email, website), and appends or updates a contact row in Google Sheets automatically. How to set up Connect Telegram (bot token) and enable file download. Connect your AI provider (OpenRouter or equivalent) used by the AI Vision Agent. Connect Google Sheets and select your spreadsheet + sheet tab. Rename nodes clearly and keep sticky notes: one overview note (this description) + step notes. Test by sending a sample card image to your bot and verify the row is appended/updated. Requirements Telegram Bot API credential AI chat/vision credential Google Sheets OAuth credential and an accessible spreadsheet How to customize the workflow Map fields to your sheet headers (add/remove columns as needed). Adjust the system prompt to prefer your locale or specific field formats. Change the matching key for update logic (e.g., company name or email). Add downstream steps (CRM push, dedupe rules, notifications). Security note: Do not hardcode API keys or include real IDs/emails. Use credentials and environment configs only. JSON [ { "company_name": "Example Company Ltd.", "department": "Sales", "job_title": "Sales Manager", "full_name": "Taro Yamada", "postal_code": "100-0001", "address": "1-1-1 Marunouchi, Chiyoda-ku, Tokyo", "phone_number": "+81-3-0000-0000", "mobilephonenumber": "+81-90-0000-0000", "fax_number": "+81-3-1111-1111", "email": "example@company.com", "website_url": "https://example.com" } ] Troubleshooting Nothing appears in Google Sheets Solution: Verify that your Google Sheets credentials are correctly authorized. Confirm the Spreadsheet ID and Sheet Name in the node match your target file. Make sure the Google Sheets node is connected downstream of the AI Vision Agent. If the workflow runs successfully but nothing is added, check whether the matching column (company_name) already exists — in appendOrUpdate mode it will only update that row. AI returns incomplete or invalid data Solution: Review the system prompt in the AI Vision Agent to ensure it instructs the model to return a structured JSON object with all required fields (company name, full name, department, job title, address, etc.). If the result is partial, verify the image quality of the uploaded business card — low contrast or skewed images can reduce OCR accuracy. You can reduce temperature in the AI node to make output more deterministic. Workflow doesn’t start automatically Solution: Check that the workflow is activated (toggle is ON in the top right of n8n). Verify the Webhook URL is correctly registered in Telegram’s bot settings. Run manually once to ensure all credentials and nodes are configured correctly.

Haruki KuwaiBy Haruki Kuwai
368

Create personalized B2B outreach emails with Tavily Research & OpenRouter LLM

🧠 About this workflow This workflow automatically generates personalized B2B outreach email messages by combining AI-based company research and text generation. It’s designed to help sales and marketing professionals automate the creation of tailored cold emails for prospects. --- ⚙️ How it works Get rows from Google Sheets — Retrieves companies marked as “ready” for outreach. Loop Over Items — Processes each company individually. Company Research (LangChain Agent) — Uses the Tavily search tool to collect key company insights such as overview, offerings, and recent news. Generate Outreach Message (LLM Chain) — Drafts a professional, concise, and fully personalized email body in English using the AI training context from YOURCOMPANYNAME. This example uses an AI training and automation service context, but you can easily modify the prompt to fit your own company’s products, services, or industry. Add to Google Sheets — Writes the generated messages back into the sheet. (Optional) Add to Instantly.ai — Sends the finalized lead data to your Instantly campaign for cold email distribution. --- 👥Use Cases 💼Sales & CRM:Automatically build and update your client database from received business cards 🏢Back Office & Admin: Digitize incoming cards for unified company records 📧Marketing Teams: Collect and manage leads efficiently 📚 AI / OCR Research: Build structured datasets for training AI models or internal automation --- 🧩 Troubleshooting If the workflow does not generate emails or data fails to appear in Google Sheets, please check the following: Google Sheets credentials — Ensure that the connected account has edit permissions and the document ID and sheet name are correctly set. API keys — Verify that your OpenRouter and Tavily API credentials are valid and not expired. Rate limits — Tavily and OpenRouter may throttle requests when processing multiple records. Try lowering the batch size in the “Limit” node. Empty company background — If the “Company Research” node returns no output, make sure the input company name is correct and includes sufficient context (e.g., full company name, not abbreviation). LLM output format — Ensure the “Generate Outreach Message” node is set to return plain text, not JSON or markdown. Instantly.ai integration (optional) — If leads are not added, confirm that your API key and campaign ID are valid, and that the node is not disabled. If the issue persists, enable “Always Output Data” in key nodes (such as Company Research and Generate Outreach Message) to debug intermediate results. You can also use the Execution Log to inspect where the flow stops or returns an empty output. --- ⚠️ Disclaimer This workflow uses AI language models and third-party APIs (OpenRouter, Tavily). Ensure that you add your own API credentials securely and verify all AI-generated content before sending emails.

Haruki KuwaiBy Haruki Kuwai
283
All templates loaded