Pushcut: Run shortcuts from push notifications

#1

A few weeks ago I released the iOS app Pushcut which can trigger shortcuts and URLs from push notifications.

The main driver for building it was to have better control over my home automation. I felt that sometimes “fully automatic” is not working well - and what I really wanted was a way to be asked a question, or given options to choose from. Basically the right options at the right time.

With Pushcut, you can create notification definitions with multiple actions each. An action can run a shortcut or open a custom URL. The notifications can be triggered via HTTP webhook (eg: via IFTTT or Zapier, or a home automation server), and for the pro users a powerful JSON API lets you customize each aspect of the notification dynamically.

For example:

Dimming the lights automatically at sunset - not ideal.
Being asked “Hey, it is getting dark - should we run the Evening scene?” - much better.

Same goes for opening your garage or unlocking your door - that should not happen automatically when you are near your house. But a quick notification with the option to unlock can be a wonderful thing.

Of course, Pushcut is not only useful for home automation, but really any kind of automation where you want your device to be a part of.

I believe it is a great building block for automation projects and I hope you can integrate it into your setup in meaningful ways.

Check it out and let me know what you think, Automators!

4 Likes
#2

Congrats on the launch. Looks nice and clean, and it’s probably a little easier to use than the Scriptable approach I’ve hacked together… I might check it out!

That said, I can’t figure out something: can you create Pushcut notifications with a Shortcut? Apologies if this is obvious.

#3

thanks!

I think Pushcut and Scriptable can work great together, eg: you can use the scriptable:/// URL scheme in Pushcut actions to run scripts from remote notifications.

about your question:
if by “create” you mean send a previously defined pushcut notification, then yes!
you can simply use the “Get Contents of URL” action to send an HTTP POST to the Pushcut API.

you can even use the Request Body editor to attach JSON values to make a dynamic notification.

1 Like
#4

So Pushcut requires a web connection?

#5

That is one concern I have too! I tried it out today and I love the interface and what it is doing! I am not into other apps beside Shortcuts but it adds features I really miss. And that’s precisely: I want to automate my daily routines by having push notifications from which I can trigger shortcuts. So for example: “its time to do your workout. Do you want to start the workout shortcut?” or “Its time to go to bed, do you want to trigger the sleeptime shortcut?” etc.
Such a Time/Date trigger in Pushcut would be perfect! But being online for the push notification to happen (in the evenings I often have my phone in airplane mode) is a real drawback. Nonetheless: I really like the app so far!

1 Like
#6

once logged in you can play around offline too (create and test your notifications) - but triggering notifications is exclusively possible through the API at the moment - which will require your phone to be online.

I have it on my “someday maybe” list to add scheduled and location-based triggers directly to the app. however, since I have heard this request a few times now I might throw this in as the next bigger feature.

what is the automators forum temperature on what the next big feature should be?

  1. proper IFTTT/Zapier integrations?
  2. rich content (images, markup, html?) in expanded notification view
  3. offline scheduling / location-based triggers baked in
1 Like
#7

How about a pushcut:// URL protocol handler. Then the network isn’t needed.

I would hope you wouldn’t want to host the automation any more often than necessary - as the data should be useless to you and the bandwidth / server cost would be reduced with local support.

#8

interesting idea - not sure what you would want to use it for?

it feels to me, if you are in a place where you can run a URL, you can already trigger your automation directly. what would you expect to be able to use the pushcut:// URL for?

the only thing that comes to mind would be to schedule a notification in X seconds… other ideas?

and: yes, I do not not care one bit about the data ; ) the hosting, if anything, is just work and expenses ^^

#9

Testing at 35,000 feet a workflow you would normally run through your server - is one use case.

If you can get to the equivalent of a “cron job” - timed pushes and delayed pushes - that would be grand.

And I think this is nicer as you said you could tailor notifications.

#10

I definitely vote for three as this would help me avoiding to get into 1.
Sadly the IFTTT workflow does not work for me. I have setup the applet with the URL to pushcut api (I copied the url from the pushcut “notification” to the webhook). But when triggered nothing happens on my iPhone. Is there any troubleshooting guide?
When I put the url into my browser I get this message: “{“error”:“Invalid request. Post to /{secret}/notifications/{name} for sending notifications.”}”

#11

I have started today to implement a local scheduling feature - if I have a good run I can maybe get it out by next week.

about your IFTTT problem: the error indicates that something is off with the URL structure itself (otherwise you would get a 404 not found or something) - did something go wrong with the copy/paste?

I suggest you DM or email me (feedback@pushcut.io) so we can figure this out.

EDIT: ok, only now read “in the browser” - yes, the browser will send a GET instead of a POST.
maybe I should just allow GETs as well for easier testing. you could use the curl command to make sure the basics are working?

2 Likes
#12

FYI - I just updated the backend to support GET as well.
Now you can paste the Pushcut URL into your browser and trigger the notification that way too.

It was a stupid limitation without any reason really that only frustrates people - I am glad you opened my eyes ; )

2 Likes
#13

So that would mean eg Keyboard Maestro could trigger - by curl or by pasting into a browser.

#14

The local scheduling concept is related to what I was talking about, too. I’d like to be able to dynamically schedule a new Pushcut event as a result of another Shortcut, such that you can jump from one Shortcut to others in a sort of cycle.

One use case would be running a “Daily set up” Shortcut that schedules Pushcut notifications throughout the day to start subroutines for whatever you should be doing at that time. In your reply you say that you can send a Pushcut notification from a Shortcut Get Contents of URL action, but can it schedule one for later?

That’s what I’m currently using Scriptable for: I run a Shortcut that uses a dynamically-chosen date/time to trigger a notification at that date/time. That scheduled notification then runs another Shortcut to do something else. Theoretically you can use this to jump from Shortcut to Shortcut by scheduling the next notifications with each run.

2 Likes
#15

interesting - I will definitely think about that sort of thing…

what I have on my list was to add a “snooze” action type - but maybe a delayed scheduling feature could be an interesting addition as well. not sure where this will take me - especially in combination with a more “offline friendly” approach.

what I have used in the past was google calendars with IFTTT/Zapier stuff attached. you can easily create meetings in the calendar from scripts or shortcuts and an IFTTT applet picks up on them. what I liked about this is that you have full visibility and the possibility to manually intervene.

1 Like
#16

I think that part of the point is you can take a common (boring) :slight_smile: notification and make it much more.

If I’ve got that right then you have two functions in Pushcut:

  1. The ability to take a notification and do something with it.
  2. The ability to transform a notification.

The two aren’t quite the same. But the latter says there’s value in local notifications with Pushcut.

#17

That’s exactly how I use scriptable too. I run a shortcut when I get to work, and among other things, it schedules notifications in scriptable linked to another shortcuts that I run through the day.

For example, The shortcut looks for my scheduled lunch time, pass it to scriptable that enables a notification 5 min before the lunchtime, so when the time arrives I got a notification, and then I’m able to run the lunch time shortcut.

1 Like
#18

I hear you guys, and I see a feature there. It should be simple to add URL support to “schedule” a notification with an x-callback-url.

for your lunchtime example: I think I would still prefer to create a zapier or ifttt thing that triggers 5 min the lunchtime calendar event - any reason you do not like this approach?

#19

Well… I haven’t really test the ifttt/zappier approach. I just prefer to manage it offline I think (which I do not know if it’s possible with ifttt).

I also set repeating notifications within an interval of 2, 4, 6 and 8 minutes, or until I pay attention to it, and then delete the notifications not delivered. This way I’m pretty sure that I don’t skip it. I guess that it would be possible with ifttt…

#20

Congrats on the launch of the app! I’m not a programmer, but have been testing iBeacons at home. Will this work with an iBeacon?