Skip to content

Instantly share code, notes, and snippets.

@benstevinson
Last active August 29, 2015 14:03
Show Gist options
  • Save benstevinson/b8448d6268c5403f7589 to your computer and use it in GitHub Desktop.
Save benstevinson/b8448d6268c5403f7589 to your computer and use it in GitHub Desktop.
This Alfred workflow allows you to send push notifications of arbitrary text to your phone.
curl -X POST \
-H "x-instapush-appid: APP_ID" \
-H "x-instapush-appsecret: APP_SECRET" \
-H "Content-Type: application/json" \
-d '{"event":"Pusher","trackers":{"message":"{query}"}}' \
https://api.instapush.im/v1/post
exit
# Remove these lines - Guide -
# This Alfred workflow allows you to send push notifications of arbitrary text to your phone. I use it for a simple todo list.
# In Instapush, create a new app and grab its app ID and Secret tokens and put it into this curl request.
# Then, create a new event, titled whatever you'd like. In mine, it's called Pusher, and it has a tracker called message.
# Those two fields are located on line 5.
# Make a new workflow in Alfred that triggers a Terminal run using the above code. the {query} field is what Alfred uses to pass
# an argument to the curl request.
# Make sure you specify that you require an argument, otherwise the push notification will be blank.
# I set mine up to trigger on the word push, so if I start Alfred and type in push "phrase", "phrase" will be sent to my phone.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment