Blog via Email


Is there any tool where I can add new content to Hugo via email? Something like Posterous .

Is there an “off the shelf” solution? No.

Can it be done? Yes. Here’s one approach, but it has a lot of moving parts (ugly):

email -> IFTTT -> Dropbox -> incron -> script

At a high level:

  1. Configure a recipe on IFTTT to create a .txt file in your Dropbox account when an email is sent from you to with a tag of your choosing in the subject.
  2. Run the Dropbox client to sync files locally.
  3. Monitor the local Dropbox directory for changes using incron, and run a script when a new file arrives.
  4. The script:
    a. Manipulates the front matter (e.g., converts date to correct format, adds fields, etc.)
    b. Moves the file to a subdirectory of your content folder, changing the extension to .md
    c. Runs hugo to rebuild the site.

Can it be done? Yes.

Should it be done? Probably not, unless the sole purpose is to create draft content on your local (dev) machine. The approach outlined above circumvents source control, quality control, etc. In short, I don’t like it.

1 Like

Thank you for this answer. I also thought of doing this:

IFTTT -> Email -> Google Spreadsheet (new row) -> script

Still ugly though :sweat_smile: