Code Monkey home page Code Monkey logo

Comments (4)

MrJulEnergy avatar MrJulEnergy commented on July 26, 2024

Sending an EMail seems to be a dead an since we either need to use an existing EMail account (for example gmail) and then store a password and username somewhere, or alternativly host our own smtp server, which isnt as simple as it sounds

from zntrack.

MrJulEnergy avatar MrJulEnergy commented on July 26, 2024

#797 Tries to add a method of storing sensitive data

from zntrack.

MrJulEnergy avatar MrJulEnergy commented on July 26, 2024

I wrote the following Node which can send an Notification to a Discord server when given an webhook_url. Note that zntrack.local_config() isnt currently implemented in ZnTrack

class NotifyMe(zntrack.Node):
    webhook_url = zntrack.local_config()
    previus_node = zntrack.deps()

    def run(self):
            try:
                node_name = self.previus_node.name
                time = datetime.now().strftime("%H:%M:%S")
                day = datetime.now().strftime("%B %d. %Y")
                msg = {"content": f"Your Workflow has reached {node_name} at {time} on {day}!"}
            except AttributeError:
                msg = {"content": f"Your Workflow has reached this Node at at {time} on {day}!"}
            
            response = requests.post(self.webhook_url, json=msg)

            if response.status_code == 204:
                pass
            else: 
                raise Exception("Could not send Message")

from zntrack.

PythonFZ avatar PythonFZ commented on July 26, 2024

Maybe something like https://github.com/caronc/apprise

from zntrack.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.