π± Collect post-purchase product reviews with WooCommerce, Google Sheets, and SMTP
β‘ 21 views Β· π± Social Media & Email Marketing
Description
Quick overview
This workflow sends post-purchase review request emails for WooCommerce orders, stores expiring form links in Google Sheets, optionally shortens links with Dub.co and delays delivery, serves a hosted rating form via n8n webhooks, and submits collected reviews back to WooCommerce.
How it works
- Receives an order completion event via a WooCommerce webhook or an external POST webhook and returns a 200 OK response.
- Normalizes the incoming order payload, generates a unique form token and expiry, and builds a customer-specific review form URL.
- Fetches each productβs image and permalink from the WooCommerce REST API, aggregates the product list, and appends the form record to a Google Sheets tab.
- Optionally shortens the form URL using the Dub.co API and optionally waits a configured number of days before sending the message.
- Renders an HTML email containing the ordered products and the review link and sends it via SMTP to the customer.
- When the customer opens the review link, looks up the form token in Google Sheets, validates status/expiry, and serves either the multi-product rating form HTML or an error page.
- When the form is submitted, validates the token again, posts each product review to the WooCommerce product reviews endpoint with status set to βhold,β marks the form as completed in Google Sheets, and returns a JSON success or error response.
Setup
- Create WooCommerce REST API credentials (Consumer Key/Secret) and add them as HTTP Basic Auth credentials in n8n for the WooCommerce API requests.
- Create a Google Sheet with a
ReviewFormstab and the required headers, connect Google Sheets credentials, and replaceYOUR_SHEET_IDin all Google Sheets steps. - Configure SMTP credentials in the email step (host, port, username, password) and verify the from/to settings fit your mail provider.
- Update the configuration values in the Config step (siteUrl, shopName, logoUrl, n8nUrl, expiryDays, and optional Dub.co key/settings) and ensure the form/submit webhook paths match.
- If triggering from WooCommerce, copy the WooCommerce order webhook URL and register it in WooCommerce as an
order.completedwebhook pointing to/webhook/wc-order-complete.
π Nodes Used
Send Email, Google Sheets, HTTP Request, Webhook
π₯ Import
Download workflow.json and import into n8n:
Workflow menu β Import from File