Automatic Automation

I am wondering if there’re any plans for web-based automation, or if it’s already possible through some functionality I’ve missed.

My main use case for such a thing would be a workflow triggered through IFTTT or Zapier or similar that allows me to act on newly created or updated Agenda notes—for instance, to take all todos in the Agenda note and add them to the task manager of choice.

(Another route that would unlock this use case for me is Dropbox syncing, which would allow me to use Hazel automation to recognize and do things to newly-updated Agenda note files. I know there’s lots of discussion about this already so I add it here merely as addenda.)

1 Like

We don’t have access to your notes in the cloud so anything involving a server required for your workflows is a no go I’m afraid. Using the x-callback-URLs is possible however, and could fit very well in such workflows. We hope to add the ability to read the contents of your library through x-callback-URLs in future updates.

Thanks, @mekentosj. I understand. I get the existing options via x-callback-URLs but the problem is that they need to be manually run. I don’t want anything to depend on my brain at the end of a meeting, ha. If there’s a way to make one run automatically, please point me in that direction!

x-callback-urls that provide content-reading features might do the trick. It wouldn’t be possible to create something that triggered on any new notes, I suppose, but it should be possible to make something like Keyboard Maestro or a cron job (I don’t use the latter) to regularly check for new notes and scan them for content.

Your best bet is to couple the use of x-callback-url with for example Automator on Mac, or Shortcuts on iOS. Alternatively you can ask tools like Keyboard Maestro to invoke an x-callback-url, or ask an AppleScript script or shell script to do so and couple that to a cron job.

That’s the idea, but as far as I can tell, the actions in any automation app would have to have some hacky way of reading the notes I pull up. E.g., call agenda://x-callback-url/open-note?id=some%20note, then use Keyboard Maestro to select menu items to copy the note’s text, etc. It’s workable, but it’d be better if there were (a) find-note?date=today (e.g., search by dates, get a list of notes as JSON or something, allowing the user to, say, grab the ID of the most recent one) and (b) read-note?id=some%20note&format=markdown actions added to the url scheme.

I know they’re on the list somewhere, just clarifying the use-case.

1 Like

Yeah, we hope to add read-support to the callback url options in a future update indeed.

1 Like

Just sharing a little OSX info that I recently discovered. Two people above made reference to running cron jobs. In OSX, cron has been deprecated in favor of launchd. In fact the current OSX implementation of cron is done using launchd. It’s much more flexible.

Where the crontab file has columns in a text file track when a particular line is supposed to be run, launchd uses XML files which provide more flexibility. So they say. I only found this out the other day and haven’t actually built anything with it yet. However, the doc looks straightforward. (https://www.launchd.info/)

What tipped the scales for me to even go off in the launchd direction was reading about what happens to a job that’s scheduled in the middle of the night. If your computer is off, neither cron nor launchd will run a job that should run during the off time. However:

If you schedule a launchd job by setting the StartCalendarInterval key and the computer is asleep when the job should have run, your job will run when the computer wakes up.

So, since I have a project that needs it, in the next few days or whatever I’ll be figuring out launchd.

Wish me luck. Thanks.

1 Like

Thanks for sharing, that sounds super useful!