{"product_id":"n8n-webhook-workflow-draft-product-review-replies-json","title":"n8n Webhook Workflow: Draft Product Review Replies (JSON)","description":"\u003ch3\u003eDraft on-brand public product review replies with an n8n webhook + JSON\u003c\/h3\u003e\n\u003cp\u003eThis \u003cstrong\u003en8n Webhook Workflow\u003c\/strong\u003e receives product reviews via a POST webhook and uses an \u003cstrong\u003eOpenAI-compatible Chat Completions API\u003c\/strong\u003e to \u003cstrong\u003edraft a public reply\u003c\/strong\u003e in \u003cstrong\u003evalid JSON\u003c\/strong\u003e, including token usage and an estimated cost—with a single corrective retry if the output is invalid.\u003c\/p\u003e\n\n\u003ch3\u003eWhat this workflow does\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eAccepts review data\u003c\/strong\u003e through a webhook request (rating, review text, product, reviewer_first_name, and an optional review_id).\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eLoads configuration\u003c\/strong\u003e such as the system prompt, brand voice, model name, API base URL, temperature, and per-token pricing.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eCalls\u003c\/strong\u003e an OpenAI-compatible \u003ccode\u003e\/chat\/completions\u003c\/code\u003e endpoint to generate a JSON object containing the drafted \u003cem\u003ereply\u003c\/em\u003e plus additional fields like tone and publish_ready.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eValidates the response\u003c\/strong\u003e by parsing the returned content as JSON and checking that required keys are present.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eRetries once (only if needed)\u003c\/strong\u003e: if the model output is invalid or the API errors, the workflow sends one corrective follow-up request and validates the retried JSON.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eResponds to the webhook\u003c\/strong\u003e with the reply draft (including usage, attempt count, and estimated cost). If it still can’t produce valid JSON, it returns \u003ccode\u003eneeds_human=true\u003c\/code\u003e.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eUse cases\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003eAutomatically generate customer-friendly responses for \u003cstrong\u003eproduct review management\u003c\/strong\u003e pipelines.\u003c\/li\u003e\n  \u003cli\u003eRun a lightweight \u003cstrong\u003eSaaS customer success\u003c\/strong\u003e process: draft replies instantly, then route only failures to a human.\u003c\/li\u003e\n  \u003cli\u003eImprove consistency with a defined \u003cstrong\u003ebrand voice\u003c\/strong\u003e and system prompt across all review replies.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eTechnical details\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eWebhook\u003c\/strong\u003e (POST) to receive review details and \u003cstrong\u003eRespond to Webhook\u003c\/strong\u003e with the JSON result.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eHTTP Request\u003c\/strong\u003e to the OpenAI-compatible \u003ccode\u003e\/chat\/completions\u003c\/code\u003e endpoint.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eJSON validation logic\u003c\/strong\u003e using nodes such as \u003ccode\u003eif\u003c\/code\u003e and \u003ccode\u003eset\u003c\/code\u003e (plus a \u003cstrong\u003esingle corrective retry\u003c\/strong\u003e flow).\u003c\/li\u003e\n  \u003cli\u003eOptional \u003cstrong\u003esticky note\u003c\/strong\u003e for workflow documentation.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003cp\u003e\u003cstrong\u003eSetup note:\u003c\/strong\u003e Create an HTTP Header Auth credential with \u003ccode\u003eAuthorization: Bearer YOUR_API_KEY\u003c\/code\u003e, update the LLM base URL and model name to match your provider, and adjust system prompt\/brand voice\/temperature and token pricing.\u003c\/p\u003e","brand":"N8N Commerce","offers":[{"title":"Default Title","offer_id":46244505354419,"sku":"N8N-21174","price":60.99,"currency_code":"GBP","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0749\/6279\/6723\/files\/JptLa4tyttBZ7AAYWity8_g4SmFIdE.png?v=1792400749","url":"https:\/\/buyflowscripts.com\/products\/n8n-webhook-workflow-draft-product-review-replies-json","provider":"N8N Commerce","version":"1.0","type":"link"}