# Pushover notifications from JavaScript rules

**URL:** <https://community.openhab.org/t/pushover-notifications-from-javascript-rules/130697>\
**Category:** Scripts & Rules\
**Tags:** js, jsscripting\
**Created:** [December 27, 2021, 6:34pm UTC](https://community.openhab.org/t/pushover-notifications-from-javascript-rules/130697 "2021-12-27T18:34:40Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![rlkoshak](https://community.openhab.org/user_avatar/community.openhab.org/rlkoshak/32/75251_2.png) [@rlkoshak](https://community.openhab.org/u/rlkoshak)\
**Post date:** [December 27, 2021, 11:11pm UTC](https://community.openhab.org/t/pushover-notifications-from-javascript-rules/130697/6 "2021-12-27T23:11:15Z")

</div>

Best practice is to create npm modules which will go in `$OH_CONF/automation/js/node_modules`. Once it’s an npm module, you can `require` the parts you need in your rule just like any third party library.

But the old style Nashorn `load` approach documented at [OH 3 Examples: Writing and using JavaScript Libraries in MainUI created Rules](https://community.openhab.org/t/oh-3-examples-writing-and-using-javascript-libraries-in-mainui-created-rules/108526) will still work to inline your code into your rules.

You can also create a rule that gets called by other rules. You can pass data through a triggering Item, or call the rule directly and pass data to the rule as a map. You can also set data in the `cache` which gets shared between rules.

There are lots of options.

---

_[View the full topic](https://community.openhab.org/t/pushover-notifications-from-javascript-rules/130697)._
