Skip to content

Repository files navigation

techery-content

Posts a notification to the Slack channel tied to webhook whenever a new post appears on one of our social networks (Instagram, LinkedIn).

A Node script run on a GitHub Actions cron

How it works

  1. A scheduled GitHub Action runs notify.mjs every ~20 minutes.
  2. The script reads each social RSS feed, compares it against seen.json (the posts we've already announced), and for anything new, posts a message to the Slack #content webhook.
  3. It commits the updated seen.json back to the repo so the same post is never announced twice.
RSS feeds (rss.app)  →  notify.mjs  →  Slack #content
                            ↑↓
                         seen.json

One-time setup

1. Create the RSS feeds

There are no native Instagram/LinkedIn RSS feeds, so generate them at rss.app from each public profile:

  • Instagram: https://www.instagram.com/<yourcompany>/
  • LinkedIn: https://www.linkedin.com/company/<yourcompany>/posts/

You'll get a URL like https://rss.app/feeds/AbC123.xml for each.

2. Create the Slack app + webhook

  • Create a Slack app
  • Add an Incoming Webhook pointing at #content or desired channel.
  • Copy the https://hooks.slack.com/services/... URL.

3. Configure the repo

In Settings → Secrets and variables → Actions:

Type Name Value
Secret SLACK_WEBHOOK_URL the Slack webhook URL
Variable INSTAGRAM_FEED_URL the Instagram rss.app feed URL
Variable LINKEDIN_FEED_URL the LinkedIn rss.app feed URL

The webhook is a secret (it's a credential); the feed URLs are plain variables.

4. Test it

Trigger the workflow manually from the Actions tab (Run workflow). The first run seeds seen.json with existing posts and intentionally does not notify — only posts that appear after that first run trigger a message.

Local testing

npm install
cp .env.example .env   # fill in the three values
npm start

Notes & gotchas

  • Latency is whatever the feed refresh + cron interval add up to — typically 15–60 min, not instant.
  • @here pings everyone online in #content. To turn it off, set the MENTION_HERE env var to false (see the commented line in the workflow).
  • Profiles must be public for the scraper to read them.
  • Specific(Instagram/Linkedin/etc...) Feeds structure may change or block scrappers so its rss.app feed can stop updating. If notifications dry up, check the feed in a browser first.

About

Automatic action to post notifications regarding news in techery feed

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages