Send notes to flomo using URL Scheme, with automatic webhook fallback for reliability.
> ⚠️ 首次使用提示: 安装后请先运行 ./scripts/configure.sh 进行配置
./scripts/configure.sh
运行后会交互式询问:
.env 文件)配置默认保存到 .env 文件,这样更便于管理和隔离。
scripts/flomo_send.sh "Your note content" "#tag1 #tag2"
Or manually via URL scheme:
open "flomo://create?content=Hello%20World&tag=daily"
The script uses a dual-channel strategy for maximum reliability:
If the flomo app is not installed or open command fails, it automatically falls back to webhook.
# Simple note
./scripts/flomo_send.sh "My quick thought"
# With tags
./scripts/flomo_send.sh "Meeting notes from today" "#work #meeting"
# From clipboard
./scripts/flomo_send.sh "$(pbpaste)" "#clippings"
# From stdin
echo "Note from pipe" | ./scripts/flomo_send.sh
If you ran ./scripts/configure.sh during setup, webhook is already configured.
To manually configure, set environment variable:
# Option 1: Full webhook URL
export FLOMO_WEBHOOK_URL="https://flomoapp.com/iwh/xxxxxxxxxxxxxxxx"
# Option 2: Just the token
export FLOMO_WEBHOOK_TOKEN="xxxxxxxxxxxxxxxx"
# Then run script
./scripts/flomo_send.sh "Note with fallback" "#test"
./scripts/flomo_send.sh "Your note here"
Tags in format #tagname will be automatically parsed by flomo.
./scripts/flomo_send.sh "Reading notes" "#books #learning"
./scripts/flomo_send.sh "Line 1
Line 2
Line 3" "#journal"
Note: The flomo_send.sh script currently supports text only. To send images, use URL Scheme directly:
# Via URL Scheme directly (supports up to 9 images)
open "flomo://create?image_urls=%5B%22https://example.com/img1.jpg%22%5D&content=Photo%20notes"
Image URLs must be:
See references/api.md for more details on image parameters.
Direct URL scheme usage (macOS only):
flomo://createcontent (optional): The note content, URL-encoded, max 5000 charsimage_urls (optional): JSON array of image URLs, URL-encoded, max 9 imagesText only:
open "flomo://create?content=Your%20URL-encoded%20content"
With images:
open "flomo://create?image_urls=%5B%22https://example.com/img.jpg%22%5D&content=Photo%20notes"
The image_urls parameter format:
encodeURIComponentSave a link:
./scripts/flomo_send.sh "https://example.com/article" "#readlater #tech"
Daily journal:
./scripts/flomo_send.sh "Morning reflection: feeling productive today" "#journal"
Quick idea capture:
./scripts/flomo_send.sh "App idea: AI-powered plant water reminder" "#ideas"
Remote/SSH session (uses webhook):
export FLOMO_WEBHOOK_TOKEN="your-token"
./scripts/flomo_send.sh "Note from server" "#server-log"
⚠️ API 和 URL Scheme 功能需要 flomo PRO 会员 才能使用。
curl command availableFLOMO_WEBHOOK_URL or FLOMO_WEBHOOK_TOKEN environment variable set| Variable | Description | Example |
|---|---|---|
| ---------- | ------------- | --------- |
FLOMO_WEBHOOK_URL | Full webhook URL | https://flomoapp.com/iwh/abc123 |
FLOMO_WEBHOOK_TOKEN | Webhook token only | abc123 |
Add to your ~/.bashrc, ~/.zshrc, or ~/.bash_profile:
export FLOMO_WEBHOOK_TOKEN="your-webhook-token-here"
"Error: Webhook not configured"
→ Set FLOMO_WEBHOOK_URL or FLOMO_WEBHOOK_TOKEN environment variable
"Error: flomo URL scheme failed"
→ Normal if app not installed; check if webhook fallback succeeded
Unicode/Chinese characters not working
→ The script auto-encodes UTF-8; if issues persist, check Python3 availability
For detailed webhook API documentation, see references/api.md.
共 1 个版本