Jump to content

How to initiate a Twitter DM from Alfred?


Recommended Posts

I'd like to add more robust DM support to my Twitter Toolkit for Alfred workflow.

 

I've come up with a basic flow for how I think it could be achieved but would love your guidance and help on how to go about implementing it, since I'm not a developer:

 

  1. Authenticate a local Twitter client to get one's followee list; store the list containing IDs, usernames, and display names
  2. Load this list as a CSV into a List Filter
  3. Use dm to access type-to-suggest completion using that List Filter in Alfred's UI
  4. Upon actioning, open the URL prefilled with https://twitter.com/messages/{var:userId}-{query} (where query is the user ID of the recipient)
  5. If a space is typed after the username, use that text to prefill message text

 

The basic user-facing flow would be:

  1. Type `dm `
  2. Starting typing usernames to initiate autocomplete
  3. Choose the desired recipient from the list
  4. Type the text of your message
  5. Action in order to open a URL prefilled with the recipient ID and your type message.

 

Thoughts?

Link to comment

What do you mean "a local Twitter client"? Getting the list of people you follow is the hard part.

 

A List Filter sounds a bit silly. Unless you're creating the list of people you follow manually (which sounds unpleasant), then you won't want to be editing the workflow, either. It should be a Script Filter.

Link to comment
1 hour ago, deanishe said:

It should be a Script Filter

 

Cool, as I don't know how to write code to use the Script Filter, SGTM! 

 

I just need a way to populate Alfred so that after I type `dm`, it starts autosuggesting usernames from the people I follow, and then once I action it, it will grab that username and convert it to a user ID in order to slot-fill the URL! 😅

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...