{"product_id":"seoul-pm10-air-pollution-webhook-motherduck-ollama-qwen-ai","title":"Seoul PM10 Air Pollution Webhook: MotherDuck + Ollama Qwen AI","description":"\u003ch3\u003eGet an AI-generated PM10 air quality report for Seoul—on demand\u003c\/h3\u003e\n\u003cp\u003eThis n8n workflow exposes a \u003cstrong\u003ewebhook\u003c\/strong\u003e that pulls \u003cstrong\u003ePM10 air pollution\u003c\/strong\u003e data from \u003cstrong\u003eMotherDuck\u003c\/strong\u003e, analyzes the results with a local \u003cstrong\u003eOllama Qwen\u003c\/strong\u003e model, and returns a ready-to-view \u003cstrong\u003eHTML report\u003c\/strong\u003e highlighting the most polluted Seoul districts.\u003c\/p\u003e\n\n\u003ch3\u003eWhat this workflow does\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eReceives a request\u003c\/strong\u003e on a webhook endpoint (via n8n).\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eQueries MotherDuck\u003c\/strong\u003e using its \u003cstrong\u003eMCP API\u003c\/strong\u003e to calculate the \u003cstrong\u003etop 10 Seoul monitoring districts\u003c\/strong\u003e by average PM10, including each district’s \u003cstrong\u003emaximum PM10\u003c\/strong\u003e.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eSends the summarized PM10 results\u003c\/strong\u003e to a local Ollama server at \u003cstrong\u003e\/api\/generate\u003c\/strong\u003e using \u003cstrong\u003eqwen2.5:3b\u003c\/strong\u003e (default: \u003ccode\u003ehttp:\/\/ollama:11434\u003c\/code\u003e).\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eGenerates a four-sentence analysis\u003c\/strong\u003e referencing the \u003cstrong\u003eWHO PM10 guideline (50 μg\/m³)\u003c\/strong\u003e.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eInjects the model output\u003c\/strong\u003e into a preformatted \u003cstrong\u003eHTML page\u003c\/strong\u003e and returns it as the HTTP response.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eUse cases\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eMonitoring dashboards\u003c\/strong\u003e: call the \u003ccode\u003e\/air-quality\u003c\/code\u003e endpoint to render an updated Seoul PM10 snapshot.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eCity\/ops alerts\u003c\/strong\u003e: integrate webhook triggers with internal tools to surface worst districts and AI commentary.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eSaaS operators\u003c\/strong\u003e: provide on-demand reporting without building a custom UI—responses are already HTML.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eAutomation engineers\u003c\/strong\u003e: demonstrate a clean pattern for “DB → LLM → web response” using n8n.\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 (receive request, then \u003cstrong\u003eRespond to Webhook\u003c\/strong\u003e with HTML)\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eHTTP Request\u003c\/strong\u003e to \u003cstrong\u003eOllama\u003c\/strong\u003e: \u003ccode\u003e\/api\/generate\u003c\/code\u003e\n\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eMotherDuck via MCP API\u003c\/strong\u003e: calculates top 10 Seoul districts by average PM10 and maximum PM10\u003c\/li\u003e\n  \u003cli\u003eNodes used include: \u003cstrong\u003eset\u003c\/strong\u003e, \u003cstrong\u003ewebhook\u003c\/strong\u003e, \u003cstrong\u003esticky note\u003c\/strong\u003e, \u003cstrong\u003ehttp request\u003c\/strong\u003e, \u003cstrong\u003erespond to webhook\u003c\/strong\u003e\n\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eSetup requirements\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003eCreate a \u003cstrong\u003eMotherDuck API bearer token\u003c\/strong\u003e and ensure the \u003cstrong\u003eair_pollution\u003c\/strong\u003e database and referenced tables\/columns match the workflow’s SQL.\u003c\/li\u003e\n  \u003cli\u003eRun \u003cstrong\u003eOllama\u003c\/strong\u003e where n8n can reach \u003ccode\u003ehttp:\/\/ollama:11434\u003c\/code\u003e and pull \u003cstrong\u003eqwen2.5:3b\u003c\/strong\u003e (or update the model name\/URL in the workflow).\u003c\/li\u003e\n\u003c\/ul\u003e","brand":"N8N Commerce","offers":[{"title":"Default Title","offer_id":45814418505907,"sku":"N8N-18004","price":39.99,"currency_code":"GBP","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0749\/6279\/6723\/files\/ET99r2wt_O7BLtLn_puql_jRUCehwE.png?v=1786439422","url":"https:\/\/buyflowscripts.com\/products\/seoul-pm10-air-pollution-webhook-motherduck-ollama-qwen-ai","provider":"N8N Commerce","version":"1.0","type":"link"}