Loading...
Loading...
Listen for one or more IMAP inboxes with the IDLE command, fetch unread email metadata plus text previews, and forward each message to OpenClaw webhooks. Use when tasks need near-real-time mailbox monitoring, multi-account inbox ingestion via environment variables, and automatic trigger delivery into OpenClaw automation.
npx skill4agent add tiangong-ai/skills email-imap-fetchidlepollreferences/env.mdassets/config.example.envpython3 scripts/imap_idle_fetch.py check-configpython3 scripts/imap_idle_fetch.py listen --cycles 1 --idle-seconds 120 --max-messages 10python3 scripts/imap_idle_fetch.py listenidlepollUNSEENIMAP_CYCLES=0pollsystemdlaunchdsupervisortype=statustype=messageaccountmailboxsequidsubjectfromtodatemessage_idsnippetwait_modeidlepollwait_eventsevent=webhook_deliveredtype=errorevent=webhook_failed--cycles0--idle-seconds--poll-seconds--idle-modeidlepoll--max-messages--mark-seen--no-mark-seen--snippet-chars--connect-timeout--retry-secondsIMAP_CYCLESIMAP_IDLE_MODEIMAP_IDLE_SECONDSIMAP_POLL_SECONDSIMAP_MAX_MESSAGESIMAP_MARK_SEENIMAP_SNIPPET_CHARSIMAP_CONNECT_TIMEOUTIMAP_RETRY_SECONDSOPENCLAW_WEBHOOKS_ENABLEDOPENCLAW_WEBHOOKS_TOKENOPENCLAW_WEBHOOKS_BASE_URLOPENCLAW_WEBHOOKS_MODEagentwakeOPENCLAW_WEBHOOKS_ENDPOINTOPENCLAW_WEBHOOKS_PATHOPENCLAW_WEBHOOKS_WAKE_MODEOPENCLAW_WEBHOOKS_DELIVEROPENCLAW_WEBHOOKS_TIMEOUTOPENCLAW_WEBHOOKS_NAMEOPENCLAW_WEBHOOKS_AGENT_IDOPENCLAW_WEBHOOKS_CHANNELOPENCLAW_WEBHOOKS_TOOPENCLAW_WEBHOOKS_MODELOPENCLAW_WEBHOOKS_THINKINGOPENCLAW_WEBHOOKS_AGENT_TIMEOUT_SECONDSOPENCLAW_WEBHOOKS_SESSION_KEY_PREFIX2idleIMAP_IDLE_MODE=polltype=errorreferences/env.mdassets/config.example.envscripts/imap_idle_fetch.py