mskian / new-members

A Simple Script to Get New Member Registration Notification from your Ghost Site

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Members Notification πŸ””

A Simple Shell Script to Get New Member Registration Notification from your Ghost site via Telegram Bot πŸ€– and Gotify Push Notification Server.

deploy

Requirements πŸ›

  • Telegram Bot API Key and Chat ID
  • Gotify API Key - https://github.com/gotify
  • Netlify Account for Host this Script
  • Netlify Webhooks for Trigger the Update from Ghost Dashboard

Usage πŸ“¦

  • Hosted at Netlify β˜‚
  • Attach Netlify webhook on your Ghost Custom integration with Member added Event
  • Telegram Bot πŸ€– API and Gotify API Key for sending the Notification Alerts
  • Netlify Environment variables for Store the Sensitive Data's like API Key and Extra Variables

Setup πŸ”§

  • Click the above button to Connect this script to your Netlify Account
  • Next it will automatically Create a Respo on your Github or Gitlab Account
  • Configure it -> in build Command add this chmod a+x ./members.sh && ./members.sh Next Choose the Advanced Settings and Add ENV variables yes add your Telegram BOT API Key, Chat ID, Gotify API Key and Site domain - Key Values πŸ‘‡

you can use anyone of the Notification service - Telegram or Gotify

key Value
BOT_API https://api.telegram.org/bot<YOUR BOT API KEY>/sendMessage
CHAT_ID <Channel ID or CHAT ID>
GOTIFY_URL https://push.example.com/message?token=XXXXXXXXXXXXXXX
SITE_DOMAIN example.com

Ghost Custom integration πŸ”©

  • log on to your Ghost Admin Dashboard
  • Goto Integrations
  • Click Add Custom integration to Create New Ghost Custom integration
  • Goto webhooks Column & Create a New Webhook - Give Name for your Webhook - Choose a Event Member added - in Target URL add your Netlify webhook URL (How to Get Netlify webhook URL? Goto Settings > Build & Deploy > Build hooks)
  • Save the Settings - That's all Successfully setup the Script for Alerts
  • Once the Member was Successfully Registered you will get the Notification alert on Telegram & Gotify

Development πŸ› 

git clone https://github.com/mskian/new-members.git

## Install
yarn dependencies

## Test Notifications (Create .env file for API Keys and variables)
touch .env

## Add this on .env file
BOT_API=https://api.telegram.org/bot<YOUR BOT API KEY>/sendMessage
CHAT_ID=<Channel ID or CHAT ID>
GOTIFY_URL=https://push.example.com/message?token=XXXXXXXXXXXXXXX
SITE_DOMAIN=example.com

## Test
yarn start -s example.com

LICENSE πŸ“œ

MIT

About

A Simple Script to Get New Member Registration Notification from your Ghost Site

License:MIT License


Languages

Language:JavaScript 52.6%Language:HTML 46.6%Language:Shell 0.7%