{"product_id":"calming-directions-webhook-n8n-workflow-for-reflection-json","title":"Calming Directions Webhook: n8n Workflow for Reflection → JSON","description":"\u003ch3\u003eTurn a quick reflection into a calm emotional state (with JSON you can trust)\u003c\/h3\u003e\n\u003cp\u003eThis n8n workflow accepts a short reflection via a webhook, validates the input, and calls ImageHealthy’s public calming-direction API to return an everyday emotional state, two visual goals, and a structured JSON response—complete with clear validation and upstream-error handling.\u003c\/p\u003e\n\n\u003ch3\u003eWhat this workflow does\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cb\u003eReceives a POST webhook\u003c\/b\u003e request containing \u003ccode\u003ereflection\u003c\/code\u003e (or \u003ccode\u003eemotion\u003c\/code\u003e) in the JSON body.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cb\u003eValidates the input\u003c\/b\u003e by trimming and enforcing a \u003cb\u003e1–500 character\u003c\/b\u003e string constraint.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cb\u003eCalls the calming-direction API\u003c\/b\u003e using the validated text via an \u003cb\u003eHTTP Request\u003c\/b\u003e to ImageHealAI’s recommendation endpoint (public API from \u003ca href=\"https:\/\/www.imagehealthy.com\/\" target=\"_blank\" rel=\"noopener\"\u003eimagehealthy.com\u003c\/a\u003e).\u003c\/li\u003e\n  \u003cli\u003e\n\u003cb\u003eReturns a stable JSON response\u003c\/b\u003e on success, including:\n    \u003cul\u003e\n      \u003cli\u003e\u003ccode\u003ecurrentState\u003c\/code\u003e\u003c\/li\u003e\n      \u003cli\u003e\u003ccode\u003erecommendedGoals\u003c\/code\u003e\u003c\/li\u003e\n      \u003cli\u003ea human-readable message\u003c\/li\u003e\n    \u003c\/ul\u003e\n  \u003c\/li\u003e\n  \u003cli\u003e\n\u003cb\u003eHandles failures safely\u003c\/b\u003e:\n    \u003cul\u003e\n      \u003cli\u003eIf input is invalid, it returns an \u003ccode\u003eINVALID_INPUT\u003c\/code\u003e error describing the expected request body.\u003c\/li\u003e\n      \u003cli\u003eIf the API fails, it returns an error response that preserves the \u003cb\u003eupstream error message\u003c\/b\u003e and \u003cb\u003eerror code\u003c\/b\u003e.\u003c\/li\u003e\n    \u003c\/ul\u003e\n  \u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eUse cases\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003eBuild a “check-in” feature in your app where users submit a short reflection and immediately receive a calming direction.\u003c\/li\u003e\n  \u003cli\u003ePower a wellness dashboard by converting free-text moods into consistent \u003cb\u003ecurrentState\u003c\/b\u003e and \u003cb\u003erecommendedGoals\u003c\/b\u003e outputs.\u003c\/li\u003e\n  \u003cli\u003eCreate an internal tool for SaaS operators to test and validate webhook-driven AI recommendations with robust error behavior.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eTechnical details\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003eDesigned for \u003cb\u003en8n\u003c\/b\u003e using built-in nodes: \u003cb\u003eWebhook\u003c\/b\u003e, \u003cb\u003eCode\u003c\/b\u003e, \u003cb\u003eIf\u003c\/b\u003e, \u003cb\u003eHTTP Request\u003c\/b\u003e, and \u003cb\u003eRespond to Webhook\u003c\/b\u003e (plus a \u003cb\u003eSticky Note\u003c\/b\u003e for documentation).\u003c\/li\u003e\n  \u003cli\u003eSetup: publish the workflow, copy the “Receive reflection” Webhook Production URL, and POST JSON containing \u003ccode\u003ereflection\u003c\/code\u003e or \u003ccode\u003eemotion\u003c\/code\u003e.\u003c\/li\u003e\n  \u003cli\u003eIf you batch requests, throttle to \u003cb\u003eno more than one request every 500 ms\u003c\/b\u003e to reduce rate-limit issues.\u003c\/li\u003e\n\u003c\/ul\u003e","brand":"N8N Commerce","offers":[{"title":"Default Title","offer_id":45938229641395,"sku":"N8N-19023","price":63.99,"currency_code":"GBP","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0749\/6279\/6723\/files\/r6ZyqKt94jYI7KeCW3tXO_8TP7pVtA.png?v=1788340493","url":"https:\/\/buyflowscripts.com\/products\/calming-directions-webhook-n8n-workflow-for-reflection-json","provider":"N8N Commerce","version":"1.0","type":"link"}