Skip to content

Instantly share code, notes, and snippets.

@jaoltr
Created January 23, 2025 17:55
Show Gist options
  • Save jaoltr/50c43e1c635e0a5d50208a68b8032af1 to your computer and use it in GitHub Desktop.
Save jaoltr/50c43e1c635e0a5d50208a68b8032af1 to your computer and use it in GitHub Desktop.
Better Pushover Zoho Flow Deluge Custom Function
void pushoverWithOptions(string user_key, string token, int html, string title, string msg, string sound, string url, string url_title)
{
if(user_key = "")
{
user = "your_pushover_user_key";
}
else
{
user = user_key;
}
if(token = "")
{
app_token = "your_pushover_app_api_key";
}
else
{
app_token = token;
}
if(isnull(html))
{
html_option = 1;
}
else
{
html_option = html;
}
html_option = ifNull(html,1);
params = Map();
params.put("user",user);
params.put("token",app_token);
params.put("html",html_option);
params.put("title",title);
params.put("message",msg);
if(!isnull(sound))
{
params.put("sound",sound);
}
if(!isnull(url))
{
params.put("url",url);
}
if(!isnull(url_title))
{
params.put("url_title",url_title);
}
info params;
response = invokeurl
[
url :"https://api.pushover.net/1/messages.json"
type :POST
parameters:params
content-type:"application/x-www-form-urlencoded"
];
info response;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment