Professional automated order processing workflow for e-commerce stores. Sends beautifully formatted HTML order confirmation emails and logs orders to Google Sheets for analytics.
- ✅ Webhook Integration - Compatible with WooCommerce, Shopify, and custom e-commerce platforms
- ✅ HTML Email Notifications - Professional, responsive email templates
- ✅ Google Sheets Logging - Automatic order tracking and analytics
- ✅ Error Handling - Comprehensive validation and error responses
- ✅ Data Normalization - Handles multiple input formats
- ✅ CORS Support - Ready for frontend integration
Webhook → Normalize Order Data → Check Error
↓ (success)
Send HTML Email → Log to Google Sheets → Respond Success
↓ (error)
Respond Error (400/500)
- n8n instance (self-hosted or cloud)
- Gmail account with OAuth2 access
- Google Sheets with OAuth2 access
-
Import Workflow
- Open n8n → "Import from File" → Select
workflow.json
- Open n8n → "Import from File" → Select
-
Configure Credentials
- Add Gmail OAuth2 credential (name: "Gmail Account")
- Add Google Sheets OAuth2 credential (name: "Google Sheets Account")
-
Setup Google Sheet
- Create a new Google Sheet
- Add headers:
orderid,customeremail,ordertotal,orderstatus,timestamp - Copy Sheet ID from URL (between
/d/and/edit) - Update "Log to Google Sheets" node with your Sheet ID
-
Activate
- Toggle "Active" switch
- Copy webhook URL from Webhook node
Endpoint: POST /webhook/order-notification
Request:
{
"id": "12345",
"customer": {
"name": "John Doe",
"email": "customer@example.com"
},
"total": "99.99",
"status": "confirmed",
"items": [
{"name": "Product 1", "quantity": 2}
]
}Response (Success):
{
"success": true,
"message": "Order notification sent",
"orderId": "12345"
}Response (Error):
{
"success": false,
"error": "Missing required order data"
}Note: The workflow also supports Shopify-style input format (
order_id,customer_email,line_items, etc.)
| Column | Description |
|---|---|
orderid |
Unique order identifier |
customeremail |
Customer email address |
ordertotal |
Order total amount |
orderstatus |
Order status (pending, confirmed, shipped, etc.) |
timestamp |
ISO 8601 timestamp |
- Add webhook authentication for production use
- Update CORS header (
Access-Control-Allow-Origin) to your specific domain - Store sensitive data in n8n environment variables
- Consider rate limiting for production
Complete n8n workflow diagram showing all nodes and connections
Email Not Sending
- Verify Gmail OAuth2 credentials
- Check email address format
- Review n8n execution logs
Google Sheets Not Updating
- Verify Sheet ID is correct
- Ensure column headers match exactly
- Check OAuth2 credentials have write access
Webhook Returns 400 Error
- Verify required fields:
id(ororder_id) andcustomer.email(orcustomer_email) - Check request format matches expected structure
- E-commerce order management and confirmations
- Automated customer communications
- Order tracking and analytics
- Multi-platform support (WooCommerce, Shopify, custom)
MIT License - Feel free to use in your projects.
