Skip to content

MHolkamp/thunderbird-joplin-export

 
 

Repository files navigation

Joplin Export Thunderbird Addon

Easily export your Thunderbird emails to Joplin.

build test codecov

Features

  • Export a text selection, a single email or multiple emails to Joplin.
  • Export by clicking the button or pressing the hotkey (by default "Ctrl+Alt+J")
  • Export the email as note or todo.
  • Add metadata to the title and body of the note:
    • Set a template for note title and body.
    • Trim the subject by regex. For example, remove "Re:" or "Fwd:".
    • Take a look at this section for details.
  • Add tags and attachments from the email.

Installation

Usage

  1. Start Joplin.
  2. Enable the webclipper and copy the API token.
  3. Configure the plugin. If you are using the default settings, only the API token needs to be added.
  4. Select any email. The Joplin button should be at the menu.
  5. Export the email by clicking the button. If there is any problem, a notification will pop up. After a successful export, the email should be in the specified Joplin notebook.
joplin_addon_setup.mp4

Include metadata

In this section you will find some examples how to include email metadata into note title or body. All metadata of the mail header object can be used.

By default, the note title template is {{subject}} from {{author}}. I. e. the subject and author keys are searched in the mail header object and inserted into the template if found. Since the subject contains often strings like Re: or Fwd:, these can be removed by defining a regex. The setting is called "Trim subject". For me, the regex ^(((Re|Fw|Fwd):|(\[.*\])) ?)* works best.

It is also possible to insert some metadata at the top of the note body. This can be done by defining a template in the "Note header" setting. The template should be specified in markdown syntax. Words surrounded by double curly brackets will be attempted to be replaced by the corresponding metadata, as done in the note title.

The following two code snippets show examples of what the templates might look like.

Plain text with closing separation line:

From: {{author}}
Subject: {{subject}}
Date: {{date}}
To: {{recipients}}

---

Table with closing separation line:

| | |
|-|-|
| From | {{author}} |
| Subject | {{subject}} |
| Date | {{date}} |
| To | {{recipients}} |

---

Troubleshooting

What to do when the export failed?

  1. Check that Joplin is running and the webclipper is enabled.
  2. Check that the plugin is configured correctly. There is a status field. The status should be "working". Make sure the API token is set correctly.
  3. Check the developer console. Usually it can be opened by pressing "Ctrl + Shift + I" or going to "Extras -> Developer Tools". There should be some error message.
  4. If the previous steps didn't resolve the issue, you can open a github issue or email me.

Related Projects

About

Easily export your Thunderbird emails to Joplin.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 84.6%
  • HTML 12.5%
  • JavaScript 2.0%
  • Shell 0.9%