{
  "id": 1551087,
  "title": "Build a Daily Tech-News Bot for Slack or Discord in 15 Minutes (Node.js + NewTqnia API)",
  "url": "https://urgent.news/2026/08/17/build-a-daily-tech-news-bot-for-slack-or-discord-in-15-minutes-node",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-08-17T19:29:49.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/samymassoud/build-a-daily-tech-news-bot-for-slack-or-discord-in-15-minutes-nodejs-newtqnia-api-5gmp"
  },
  "original_language": "en",
  "account": "Building a daily tech-news bot for Slack or Discord can be accomplished in just 15 minutes using Node.js and the NewTqnia API. This bot fetches today's tech headlines, formats them into a message, and posts it to a webhook for distribution. The process involves three main steps.\n\nFirst, install the NewTqnia-node SDK with the command \"npm install newtqnia-node.\" This lightweight client abstracts the REST API, requiring no API key for access.\n\nNext, create a script named \"digest-bot.mjs.\" Import the NewTqnia client from the SDK. The script begins by defining an asynchronous function called \"getDigest.\" This function retrieves either today's headlines or the latest articles, depending on whether the \"today\" array is empty. If there are articles, they're returned; otherwise, the latest headlines are fetched.\n\nFollowing this, two helper functions are defined. \"toDiscordPayload\" formats the digested headlines into a payload suitable for Discord, while \"toSlackPayload\" does the same for Slack. These functions create visually appealing messages by embedding URLs and titles.\n\nThe final step involves posting the digested headlines to the chosen platform. The \"postDigest\" function uses the NewTqnia client to fetch the digested headlines and formats them into the appropriate payload. It then sends this payload to the specified webhook using a POST request. The webhook URL and type (Slack or Discord) are determined by environment variables.\n\nFinally, the script checks for the presence of a webhook URL and its type, then calls the \"postDigest\" function to send the daily tech-news digest to the selected platform. This entire process can be automated through GitHub Actions, enabling the bot to run on a schedule without the need for a continuously running server.",
  "summary": "Every team I've been on has a #general channel that goes quiet by 11am. A daily digest bot is the easiest way to give people a reason to glance back at it, and \"today's tech headlines\" is a low-effort, high-signal thing to post that nobody minds seeing every morning. Here's a complete Slack/Discord bot, built on NewTqnia 's free public news API, that you can have running in about 15 minutes. What…",
  "key_points": [],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}