Raindrop.io
Hotaru saves items straight to Raindrop.io: title, link, excerpt, image and tags, into a collection (SI-531). This replaces the n8n flow that forwarded items to Raindrop. Code: packages/core/src/services/raindrop.ts and the API calls in packages/core/src/integrations/raindrop-api.ts.
Connecting
Each user connects their own Raindrop account under Settings → Raindrop.io (/settings/raindrop) with a test token:
- In Raindrop, open Settings → Integrations (
https://app.raindrop.io/settings/integrations). - Under For Developers, create a new app. Any name works.
- Open the app, choose Create test token, and paste the token into Hotaru.
Hotaru checks the token with Raindrop (GET /user) before it keeps it, and shows the account’s name. A test token doesn’t expire and gives access to that account’s bookmarks only. Pasting a new token replaces the old one and keeps the settings. Disconnect forgets the token. Bookmarks in Raindrop stay, and saved items keep their saved mark.
The token is stored encrypted in integrations.credentials: AES-256-GCM, with a key derived from BETTER_AUTH_SECRET by HKDF (crypto/secrets.ts). A copy of the database alone doesn’t give the token away. If BETTER_AUTH_SECRET changes, the stored tokens can’t be read any more: saving fails with “Connect again”, and every user has to paste their token once more.
OAuth isn’t built. For a personal instance a test token does the same job, and it needs no client ID, secret or redirect URL. OAuth can follow if Hotaru ever has users who shouldn’t have to create a Raindrop app.
Settings
| Setting | Default | What it does |
|---|---|---|
| Save to | Unsorted | The collection a save goes to unless you choose another one |
| Ask for the collection and tags | On | On: the bookmark button opens a dialog. Off: one click saves to the collection above at once |
Saving
Once Raindrop is connected, the bookmark button sits on every card that has a link, and in the reader’s toolbar. Without a connection there is no button, and b does nothing. The b key saves the selected item (or the one in the reader). Shift + click or Shift + B always opens the dialog, even with asking turned off.
The dialog offers your Raindrop collections (nested ones under their parent) and a tags field, the same tag field as on the Sources page. It suggests your Raindrop tags, most used first, as soon as it has focus. Enter on an empty field saves. AI tags will be filled in here once items get them (M2).
What Raindrop gets:
| Raindrop field | From |
|---|---|
link |
The item’s URL |
title |
The item’s title |
type |
video for YouTube items, article when Hotaru has the article’s own text (extracted from the page, or the full article loaded), otherwise link. Raindrop’s filters by type (Articles, Videos) then work without Raindrop fetching the page |
excerpt |
The item’s excerpt (plain text) |
cover |
The item’s original image URL. Hotaru’s own image cache is behind its login, so Raindrop couldn’t load that. Without an image, Hotaru asks Raindrop to find one on the page (pleaseParse) |
tags |
The tags from the dialog: trimmed, without duplicates, at most 30 |
collection |
The chosen collection, or the default one. -1 is Unsorted |
Saving an item again updates its bookmark (collection, tags, title) instead of making a second one. If the bookmark was deleted in Raindrop since, Hotaru creates a new one.
Saved state and retries
Every save is stored in item_saves, and each stream entry carries its status as raindropStatus. The button shows it:
| Status | Button |
|---|---|
| None | Outlined bookmark |
saving |
Pulsing bookmark |
saved |
Filled bookmark in firefly green |
failed |
Red bookmark. A click tries again; the dialog shows why it failed |
When a save fails for a passing reason (no connection, a timeout, a rate limit, an error on Raindrop’s side), the scheduler tries again on its own: after 1 minute, 5 minutes, 30 minutes, 2 hours and 12 hours, so six tries in all. A rate limit waits at least as long as Raindrop asks. The scheduler checks on every tick, one save after another, at most 20 per tick. A save cut off by a restart (still saving five minutes later) is picked up the same way, and so are the saves rules queue for new items. With SCHEDULER_ENABLED=false nothing is retried on its own; a click on the red bookmark tries again.
Failures that a retry can’t fix are not retried: Raindrop refusing the request (HTTP 400), or rejecting the token (HTTP 401). A rejected token shows on the settings page. Once you paste a new token, every failed save is tried again.
A save that goes through for the first time can send the item on to Readwise Reader and MyMind, as their routing says (forwarding.md). That’s what the n8n flows after Raindrop did.
Raindrop allows 120 requests a minute per user. One save is one request, so that limit only matters for scripts.
API
All endpoints need a login or an API token. Changes need a write token.
| Method and path | What it does |
|---|---|
GET /api/v1/integrations/raindrop |
The connection: connected, account, defaultCollectionId, askOnSave, lastError. Never the token |
PUT /api/v1/integrations/raindrop |
Connect with { "token": "…" }. 422 when Raindrop rejects it |
PATCH /api/v1/integrations/raindrop |
Change defaultCollectionId and askOnSave |
DELETE /api/v1/integrations/raindrop |
Disconnect (204) |
GET /api/v1/integrations/raindrop/choices |
Collections and tags to save with. 409 when not connected |
GET /api/v1/items/:id/raindrop |
Where the item was saved: { "save": … }, or null |
POST /api/v1/items/:id/raindrop |
Save it, with optional collectionId and tags. 502 with message and save when Raindrop fails, 409 when not connected, 422 when the item has no link |
The SDK has a method for each: raindrop(), connectRaindrop(), updateRaindrop(), disconnectRaindrop(), raindropChoices(), raindropSave() and saveToRaindrop().
const hotaru = createClient({ baseUrl: 'https://hotaru.example.com', token });await hotaru.saveToRaindrop(itemId, { collectionId: 12345, tags: ['svelte'] });Tests
The tests never talk to the real Raindrop. Unit tests run a local fake of the API (raindrop.spec.ts). The Playwright test (raindrop.e2e.ts) starts one on port 4199, and the e2e server points at it with RAINDROP_API_URL. Leave that variable unset in production.