Save shared links on slack to Pocket
Save links shared with you to your Pocket reading list with just a single reaction on the message.
- Clone the repo.
- Create Slack App and Pocket App.
- Create '/slack_pocket/local.py' :
Slack_Token = 'your_slack_token'
Consumer_Key = 'your_pocket_key'
Server_Url = 'http://your_server_url'
- Setting up Slack App:
- Create a Slack App, give desired oAuth permissions and store the API key somewhere safe.
- Create a Slash Command and add Request URL: 'yourserver/register'
- Enable Event subscription and set Request URL: 'yourserver/event'.
- For verifying Event URL, change view of '/event' url in your app to 'hit()' and verify. Change back to view 'event()' once verified.
- In Event Subscription, Add Workspace Event -> 'reaction_added'
- Update app scopes in 'oAuth & Permissions'. Make sure the following listed scopes are authorised:
- Setting up Database I've used Firebase Realtime DB. For setting it up:
- Create an App in Firebase Console.
- Download Admin SDK and save it the root of dir.
- Change initializing configs:
cred = credentials.Certificate('admin_sdk.json')
firebase_admin.initialize_app(cred, {
'databaseURL': 'https://your_app.firebaseio.com'
})
- Install PocketMe to your Team.
- "/register" :
- Use this slash command to register to PocketMe.
- You will be given a URL on which you can click and authorize into your Pocket Account
- Registration done 😁
- Saving links using reaction: :spiral_note_pad:" is the only reaction that is compatible at present.
Just react with :spiral_note_pad: emoticon on the message and it will save the link to your Pocket, if you are registered.