How easy to automate web postings, and any tips?

I'm pretty bummed that one of my favorite web services, Buffer, has to lose one of its key features (posting to Facebook personal profiles) starting tomorrow. Buffer is a service that lets you queue up social media posts and post them simultaneously to a number of social media sites, on a schedule that you determine.

So now that Buffer can't support Facebook personal profiles any more (due to a change on FB's side), I'm wondering about the feasibility of re-creating this kind of automated routine in KM, or perhaps Automator, or a combination of the two. Here's how I'd envision it:

  1. I would manually create a local spreadsheet in my Dropbox which I would regularly update with the social media posts that I'd like to schedule for the future.
  2. KM would open the spreadsheet at specified times, copy the contents of A1 to the clipboard, delete A1 (so that B1 becomes A1 in preparation for the next running of the macro), then would manually open each of the social media sites (FB, Twitter, LinkedIn) and manually paste the text into the post field, and click post.

I'm trying to think through whether it would be worth building this macro, or if there would be any difficulties in doing so. Stuff I've thought of:

  1. The computer would have to be on, otherwise it won't execute and I'll actually miss the trigger of posting, so all future posts will then resume at the next running of the macro.
  2. I can't think of any easy way to incorporate image posting with my spreadsheet idea. Some posts might have an image, some might not. How would I program KM to know, and if so, how well could it react to the various social media site's upload mechanisms for posting images?
  3. The minute any of the social media sites changes their design, I can't guarantee that my KM macro would adapt very well to it (e.g. if it was looking for the graphic of a post button).
  4. How good is KM at reacting to a web page and its variable loading time?
  5. What if KM begins its macro on a schedule, but I happen to be using the computer for something intensive at the same time? That could get problematic. Can KM trigger a macro but also make sure the user is idle at that particular time?
  6. ???

I thought to post it here to see if anyone has any bright ideas on ways this might work (or not work) if I chose to begin building it.

This is the real crux of the problem. Controlling those sorts of web sites is a difficult challenge.

Keyboard Maestro is generally pretty good at telling if a web page is ready, and there are other things you can do, like Pause Until a specific image is on the screen to ensure things like the Upload button are there, etc.

A Keyboard Maestro macro can check the IDLE time, and if it is near zero, then you can put up an alert and have the macro wait for you to OK it.

As far as images go, it will depend on how the target sites support images, and what you want to do with them.

It would all likely be possible, but be quite a complex macro to write, and would no doubt be quite fragile, so likely to break in the future. The big problem with this is that the breakage could be significantly bad if you try to post blindly to a public facing web site that has changed - who knows what you might end up posting.

1 Like

Agreed. Thanks for the insight and additional ideas, Peter. It's always fascinating to brainstorm the new and unique ways KM can transform my work.

Is possible to create a macro to ask for user input as to what to post using the clipboard? I just don't know how to trigger the post area on the Facebook site using Keyboard Maestro.

I'm not sure exactly what you are asking for.

  1. You can use the KM Prompt for User Input action, but it does NOT provide for a multi-line text area for user input.
    • For that, you would need to use Custom HTML Prompt action.
    • While these are complex to set up, you might search this Forum for examples.
  2. If you want to get the user input from his/her current text selection, you can use the KM Copy action to copy to the Clipboard

I don't use Facebook, but in general you can use KM to click on any button on a web page.
Here are some ideas:

  1. Click Browser Link actions
  2. Use Execute a JavaScript in Browser action to find/select the web page button, and then click on it.
  3. Move or Click Mouse action using a Found Image .
  4. Use a KM Type a Keystroke if the web page provides for keyboard shortcut to the button/link

I've never used any of the above with Facebook, but I have use all of them in different Macros for different web pages.