Skip to content

dnsxyz/template-two-alerts-to-sms

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

Mailscript templates: two alerts within a minute send an sms

You can use this template to setup a workflow that listens in to incoming messages and whenever two emails containing the word "alert" in their subject arrive within a minute of each other send an sms to a specified number.

Workflow

version: "0.1"
addresses:
  address@mailscript.com:
    keys:
      - name: owner
        read: true
        write: true
accessories:
  - name: sms to me
    type: sms
    sms: "+123456789"
  - name: address@mailscript.com
    type: mailscript-email
    address: address@mailscript.com
    key: owner
workflows:
  - name: Alerts to sms
    trigger:
      accessory: address@mailscript.com
      config:
        times:
          thisManySeconds: 60
          thisManyTimes: 2
        criterias:
          - subjectContains: alert
    actions:
      - accessory: sms to me
        config:
          type: sms
          text: Two alerts arrived within 60 seconds

Manual setup

Setup your sms accessory to be able to receive texts:

mailscript accessories:add --name "sms to me" --sms +123456789

Setup the workflow:

mailscript workflows:add \
  --name "2 alerts to sms" \
  --trigger address@mailscript.com \
  --times 2 \
  --seconds 60 \
  --subjectcontains alert \
  --action "sms to me" \
  --text "Two alerts arrived within 60 seconds"

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published