Notifly from CMS
CMS, in which dozens or hundreds of sites run, usually send mail themselves, but that’s slow and often doesn’t arrive. Notifly provides an instant channel for the site admin: new comment — push, new order — push, PHP error — push.
Where to start
Section titled “Where to start”- A site on Tilda → Notifly in Tilda, option 2: the form webhook goes straight into the Notifly Webhook Router. No code and no hosting of your own.
- You only need form leads and cannot reach the PHP → WebScript
of the “Form submit” type: paste the ready-made
<script>into the page template or an HTML block, and every submitted form arrives as a push. The snippet forwards all form fields, so do not put it on forms with passwords or payment details. - WordPress, 1C-Bitrix and other CMS → the recipe for your CMS in the table below. The code is ready, but you have to put it on the site’s server and fill in the token: you need access to the files (FTP, SSH or a hosting panel) and a basic understanding of PHP.
- Is the site up at all? → Active monitors: Notifly itself checks the site and tells you if it goes down. No code, everything in the admin panel.
Available recipes
Section titled “Available recipes”| CMS / platform | What we cover |
|---|---|
| WordPress | Comments, registrations, updates, WooCommerce orders |
| 1C-Bitrix | Orders, forms, errors, agent jobs |
| Drupal | Node hooks, watchdog, new users |
| MODX | Form events, resources, plugins |
| Joomla | Users, articles, forms, PHP errors |
| OpenCart | Orders, low stock, registrations |
| PrestaShop | Orders, new customers, out of stock |
| Tilda | Form leads via webhook |
Universal helper function for PHP
Section titled “Universal helper function for PHP”Most recipes use the same micro-function. Put it into the CMS system autoload script:
<?phpfunction notifly_send(string $title, string $message, int $priority = 5): void { $url = getenv('NOTIFLY_URL') ?: 'https://api.notifly.ru'; $token = getenv('NOTIFLY_TOKEN') ?: 'AGdjfk_L.dKe8q'; $body = json_encode([ 'title' => mb_substr($title, 0, 200), 'message' => mb_substr($message, 0, 1500), 'priority' => $priority, ], JSON_UNESCAPED_UNICODE);
$ch = curl_init("$url/message?token=$token"); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_POST => true, CURLOPT_HTTPHEADER => ['Content-Type: application/json'], CURLOPT_POSTFIELDS => $body, CURLOPT_TIMEOUT => 5, CURLOPT_CONNECTTIMEOUT => 3, ]); curl_exec($ch); curl_close($ch);}It’s best to set NOTIFLY_URL and NOTIFLY_TOKEN via the PHP-FPM environment
or .htaccess/SetEnv, so you don’t store the token in the code.
General principles
Section titled “General principles”- The channel token stays on the server. Call
/messagefrom server-side PHP only. The only thing you may put on a page is a WebScript snippet: its token can only send this script’s events. - Do not send PII (names, email, addresses) unnecessarily. Show a short link to the CMS admin.
- Throttling. During a spam wave of comments, don’t turn Notifly into a Telegram channel.
A simple cache in
wp_cache/bx_cachewill do.