Workflow for Alfred: export to Markdown and create Bear note


This is a script I wrote for my own use, but maybe others would like it and care to modify it for their own purpose? It is an Alfred Workflow to take a plain text export from Dynalist (using and dashes (-) and copying to the clipboard) and then transform it into Markdown format. Then the clipboard is used to create a new note in Bear. Right now it turns first level headers into H1, second into H2 and removes the indent on level three list items. It could easily be modified to include H3 and reduce the indent on deeper level indents. If I update it later to do this I will post that here as well…

Here’s a link to the workflow.


I would use this but unfortunately I don’t use a mac, and those are all mac-os specific apps though

if it was in python or a webapp I would probably use it though

What's the best way to use dynalist to write an article

At the heart of it is just a very simple Perl script. Since there is some kind of wrapper from Alfred this won’t work directly on other systems, but someone who knows Perl should easily be able to adapt it:

$query = "{query}";

my $find1 = "^-";
my $replace1 = "#";
$query =~ s/$find1/$replace1/gm;

my $find2 = "^    -";
my $replace2 = "\n## ";
$query =~ s/$find2/$replace2/gm;

my $find3 = "^        -";
my $replace3 = "-";
$query =~ s/$find3/$replace3/gm;

print $query;


hm well I know absolutely nothing about perl

so basically your workflow is

  1. copy text in dynalist
  2. press a hotkey using alfred workflow file
  3. paste into bear?


Step 3 is not necessary as the script uses X-callback-URL schemes to automatically create the document, so just 2 steps.


I got excited about an alfred workflow to input to dynalist inbox, then realized I read the title wrong.


Sadly, the workflow is no longer available- could you post the workflow again, please?


Sorry about that. I don’t know if this still works as I haven’t used it lately, but here is the workflow: