Jump to content

Pushbullet | send texts and current tab to Android and Windows


Recommended Posts

Posted (edited)

This is my first workflow and my knowledge about coding is very limited so feel free to suggest anything, however small.

Basically this workflow allows you to push (send) any text or the current website to your pushbullet account. This is especially useful for:

  1. those that own multiple devices and want to push something to all devices at once
  2. own an android, windows, or chromebook devices and want to bridge the gap with your MacOS device. 

 

You can download the workflow here.

Instructions

1. Login to Pushbullet.com. 
2. Get your API access token from https://www.pushbullet.com/#settings
3. Paste the token into the script, replacing the <API access token here>.

4. You can type push followed by any text and press return. To send the current tab, type push url.

 

Bonus: if you want to see your android notifications, or push something to your Mac from an android, use Noti.center which also uses pushbullet. You can push something to Mac by pushing it to your android, and it will mirror up to the Mac as well.  

Edited by Billdrk7
Changed download link
Link to comment
5 minutes ago, Billdrk7 said:

feel free to suggest anything, however small

 

How long are transfer.sh uploads valid for? It's generally a good idea to put your workflow on permanent storage because people will still want to download your workflow 5+ years from now.

Link to comment
3 minutes ago, deanishe said:

 

How long are transfer.sh uploads valid for? It's generally a good idea to put your workflow on permanent storage because people will still want to download your workflow 5+ years from now.

Nice catch! I forgot about that. Moved to my personal storage on Mega (or is there a more standard way to upload these things?)

Link to comment
Just now, Billdrk7 said:

or is there a more standard way to upload these things?

 

GitHub is very popular. You can easily stick the source and any documentation on there, too.

Link to comment
1 hour ago, Billdrk7 said:

feel free to suggest anything, however small.

 

On the /usr/bin/osascript, you should remove the comments at the top. They don’t make sense in this context.


On the /bin/bash, use with input as argv, never with input as {query}. The latter is a legacy option and requires some escaping (which you’re not doing!). You’ll need to change {query} to ${1} in your code for it to work.


Finally, replace 'Access-Token: <API Access Token Here>' with "Access-Token: ${API_TOKEN}" (important: note the quotes were changed to double quotes). Then go into your Workflow configuration (where you wrote the “About”) and add a new Workflow Environment Variable named API_TOKEN, set your own API token in the value, then select “Don’t export”.


That way it’s easier for users to use your Workflow, because they don’t have to mess with the code; they add the variable where it’s supposed to be stored. Plus, you don’t have to worry about manually removing your own token every time you make an update.


Let me know if anything was unclear.

 

39 minutes ago, deanishe said:

How long are transfer.sh uploads valid for?

 

14 days. In theory. They’re constantly being discontinued and picked back up; no idea what’s going on over there anymore.


First they launched. Then they were discontinued. Then they were bought/sponsored by some “decentralised cloud storage” company and the uptime was terrible, constantly down (I know who I’ll never do business with!). Then alpha.transfer.sh was officially recommended (but not on the website, you had to know who to ask) as the good version that was up more often (not always). Then they were discontinued again. Now they’re back up, no idea why or by whom. All the while I keep removing and adding it from my Workflow and scripts.


When it’s up, it’s super convenient. It supports uploads via curl’s --upload-file while most others use --form file=@ which has specific quoting rules; has short but non sequential URLs; the name is part of the URL; files can be previewed online; and they don’t stay up for long so less chance of them being nabbed by some random person.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...