Idea
Hi I'm thinking of self-hosting Email to Note service. The idea is that we use Github Action as a server to receive email and forward it directly to the Sync Target (WebDAV, OneDrive,...) with joplin-sync-lib.
┌──────────────┐ ┌─────────────────────┐ ┌───────────────────┐ ┌─────────────────┐
│ Email Source │────→│ Trigger (pick one) │────→│ GitHub Action │────→│ Cloud Storage │
│ (Gmail etc.) │ │ • Google Apps Script│ │ (this repo) │ │ • Joplin Server │
└──────────────┘ │ • Zapier webhook │ │ joplin-sync-lib │ │ • WebDAV │
│ • curl / any HTTP │ └───────────────────┘ │ • OneDrive │
└─────────────────────┘ │ • Google Drive │
└─────────────────┘
The test
I made a test here by enter the WebDAV credentials and (optional) folder id as Github secret variables, which is then used by Github Action script. Then I run a curl command to trigger the Github Action, the email is then received in Joplin Desktop client after synchronization.
I think we can replace the curl command with some Google App Scripts (if we use Gmail), which can automate the process email receiving.
I also add some caching for Github Action, which now takes ~15s per email received (previously 1 minute).
Repository: GitHub - khuongduy354/selfhost-joplin-email-to-note
Conclusion
I'd appreciate to receive ideas from everyone, do you think it's useful for many people? Is there any cleaner approach for this ? Thank you.