Email Automation
Reply to LINE inquiries with Claude Haiku 4.5 and Gmail staff approval
When an API call/webhook arrives, it handles email with Claude using Data Table, Gmail.
What it does
## Reply to LINE messages with Claude after staff approval ### Who's it for Shops that answer customers on a LINE Official Account and want AI to draft replies, while a person still decides what is sent. ### How it works 1. Receives LINE messages by webhook, checks the LINE signature, and skips redelivered events. 2. Instantly sends a short acknowledgment with the free reply API. 3. Photos are described by Claude, so text and photo inquiries follow the same path. 4. Claude sorts each inquiry into stock, store visit, or other. Stock and visit inquiries are answered from two Data Tables; other inquiries are emailed to staff. 5. The draft is emailed to staff with Send / Don't send buttons. Only approved drafts are pushed to the customer. If nobody answers within 24 hours, staff get a reminder. ### How to set up 1. Create credentials: Header Auth (Name Authorization, Value Bearer ), Crypto (Hmac Secret = channel secret), Anthropic, and Gmail. 2. Create two Data Tables and select them in the two lookup nodes: - products: sku, name, category, color, width_cm, price, stock, note - visit_slots: slot_date (YYYY-MM-DD), slot_time, capacity, booked 3. Edit the Config node (staff email, acknowledgment text, timezone, currency). 4. Publish, then paste the production webhook URL into the LINE Developers console. In LINE Official Account Manager, turn Webhook on and auto-reply messages off. ### Requirements LINE Official Account with Messaging API, Anthropic API key, Gmail. n8n must be reachable over HTTPS. Set WEBHOOK_URL if staff approve from a phone. AI drafts can still contain promises that are not in your data, so read each draft before you approve it. ### How to customize Change the product categories in Extract product category, and the reply rules in the two draft nodes. A write-up of how this template was built and tested, with screenshots (in Japanese): https://outsidernotes.com/n8n-template-line-approval-reply/
The steps
- Receive LINE webhook
- Compute signature
- Signature valid?
- Split events
- Skip redelivered events
- Extract message fields
- Keep text and images
- Send acknowledgment
- Text or image?
- Use text as inquiry
- Inquiry
- Download image
- Describe photo
- Claude Haiku 4.5
33 steps in total.
Similar automations
Customer Support & HelpdeskTriage LINE customer chats with Claude and route to Slack for staff replies48 stepsEmail AutomationDraft Gmail replies to stock and visit inquiries with Claude Haiku19 stepsCustomer Support & HelpdeskTranslate LINE customer chats with Claude and route them through Slack42 stepsCRM & Sales PipelineScore and route web form leads using Claude Haiku, HubSpot and Slack24 steps