marph91 / thunderbird-joplin-export

Easily export your Thunderbird emails to Joplin.
Mozilla Public License 2.0
28 stars 5 forks source link
email javascript joplin joplin-api thunderbird thunderbird-addon thunderbird-extension

Joplin Export Thunderbird Addon

Easily export your Thunderbird emails to Joplin.

build test codecov

Features

Installation

Usage

  1. Start Joplin.
  2. Enable the webclipper and copy the API token.
  3. Configure the plugin:
    1. Paste the API token to the token field.
    2. Save
    3. Refresh the available notebooks by pressing the small update button.
    4. Select a destination notebook.
    5. Save
  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.

https://user-images.githubusercontent.com/33229141/161036197-ab8c9801-8cad-400f-a114-8315f4363af3.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

Further ressources

Changelog

0.0.8

0.0.6

0.0.5

0.0.4

0.0.3

0.0.2

0.0.1