π Serve tech trends for desktop widgets via JSON webhook from Data Table
β‘ 0 views Β· π Market Research & Insights
Description
Quick Overview
This workflow exposes a webhook endpoint that returns todayβs tech trends as JSON for a desktop widget by reading records from an n8n Data Table, splitting items into news and YouTube lists, and responding with a CORS-enabled JSON payload.
How it works
- Receives an HTTP request via a webhook trigger.
- Queries the n8n Data Table named
tech_trendsfor rows matching the configureddatefilter. - Separates results by
source(YouTube vs. non-YouTube), sorts byrank, and builds two top-3 lists of titles. - Returns an HTTP 200 response with
Content-Type: application/jsonandAccess-Control-Allow-Origin: *containing the formatted JSON payload.
Setup
- Activate the workflow and copy the production webhook URL into your desktop widget or any client that will request the data.
- Populate the n8n Data Table
tech_trendswith at leastdate,rank,title, andsourcefields, and update thedatefilter value in the Data Table query to match your desired βtodayβ logic. - If your client expects a different JSON schema, adjust the Code step that builds the
newsandyoutubearrays and ensure the response body maps to the formatted output.
π Nodes Used
Webhook, Data table
π₯ Import
Download workflow.json and import into n8n:
Workflow menu β Import from File