Turn Feishu bot messages into Markdown notes in your Obsidian vault.
- Receive text messages that contain URLs
- Extract the first URL from the message body
- Fetch page content through Crawl4AI
- Save the result as a Markdown note with frontmatter
- Write notes directly into a local Obsidian-compatible directory
- Run in Feishu long-connection mode
- Run in local HTTP server mode for debugging or custom automation
- Run one-off clipping jobs from the CLI
- Support Crawl4AI fallback strategies for problematic sites
- Deploy with Docker Compose
- A message is sent to a Feishu bot, or posted to the local ingest endpoint.
- ClippingBot extracts the first URL from the incoming text.
- ClippingBot requests content from Crawl4AI.
- ClippingBot renders a Markdown note with metadata.
- The note is written to the configured vault directory.
git clone https://github.com/parap1uie-s/ClippingBot.git
cd ClippingBot
cp .env.example .env
python3 -m clippingbot.mainpython3 -m clippingbot.cli "Example Domain https://example.com"curl -X POST 'http://127.0.0.1:8787/ingest' \
-H 'Content-Type: application/json' \
-d '{"text":"Example Domain https://example.com"}'Required:
CLIPPINGBOT_OBSIDIAN_VAULTCLIPPINGBOT_CRAWL4AI_BASE_URL- One of:
CLIPPINGBOT_CRAWL4AI_EMAILCLIPPINGBOT_CRAWL4AI_BEARER_TOKEN
Common optional settings:
CLIPPINGBOT_OBSIDIAN_INBOXCLIPPINGBOT_CRAWL4AI_FILTERCLIPPINGBOT_CRAWL4AI_TIMEOUT_SECONDSCLIPPINGBOT_CRAWL4AI_MODECLIPPINGBOT_CRAWL4AI_CRAWL_FALLBACK_DOMAINSCLIPPINGBOT_NOTE_TAGSCLIPPINGBOT_NOTE_OVERWRITE_EXISTINGCLIPPINGBOT_FILENAME_MAX_LENGTHCLIPPINGBOT_FEISHU_APP_IDCLIPPINGBOT_FEISHU_APP_SECRETCLIPPINGBOT_FEISHU_DELIVERY_MODECLIPPINGBOT_FEISHU_REPLY_ENABLEDCLIPPINGBOT_FEISHU_REPLY_RECEIVE_ID_TYPE
See .env.example for a complete example.
ClippingBot supports two runtime modes:
longconnFeishu long-connection modewebhookLocal HTTP server mode
Unified entrypoint:
python3 -m clippingbot.mainClippingBot supports three Crawl4AI fetch modes:
mdAlways use/mdcrawlAlways use/crawlautoUse/mdby default and fall back to/crawlwhen needed
This is useful for sites where /md may return an interstitial or verification page while /crawl can still extract the article body.
Each clip is written as a Markdown file that includes:
- frontmatter
- source URL
- source channel
- clip timestamp
- original share text
- captured Markdown content
cp .env.example .env
docker compose up -d --buildIf ClippingBot and Crawl4AI both run in containers, prefer using a shared Docker network and a service-style base URL such as:
CLIPPINGBOT_CRAWL4AI_BASE_URL=http://crawl4ai:11235ClippingBot accepts text messages that contain URLs, for example:
Example Domain https://example.com
For webhook-style delivery, the repository also supports standard Feishu im.message.receive_v1 payloads.
clippingbot/main.py: runtime entrypointclippingbot/feishu_longconn.py: Feishu long-connection listenerclippingbot/server.py: HTTP server and ingest endpointclippingbot/crawl4ai_client.py: Crawl4AI client and fallback logicclippingbot/note_writer.py: Markdown note rendering and persistence.env.example: example configurationdocker-compose.yml: Docker deployment entry
- Only the first URL in a message is processed
- Duplicate handling is filename-based using a URL hash
- Feishu bot behavior still depends on upstream app permissions and event subscription configuration