Install
openclaw skills install clawback-shGmail security proxy with policy enforcement, approval workflows, and audit logging. Use when the user wants to read, search, or send Gmail with guardrails — send actions may require human approval before executing.
openclaw skills install clawback-shUse clawback for Gmail with policy enforcement. All operations go through a server-side proxy that enforces policies and logs an audit trail. Sends may require human approval.
Prerequisites
The clawback binary must be installed and on your PATH. If it's missing, releases are available at https://github.com/honeybadge-labs/clawback/releases.
Setup (once)
clawback auth login (device flow — opens browser)clawback auth status (verify connection)Common commands
clawback gmail search 'newer_than:7d' --max 10clawback gmail search 'from:boss@company.com' --all --jsonclawback gmail get <messageId> --jsonclawback gmail send --to a@b.com --subject "Hi" --body "Hello"clawback gmail send --to a@b.com --subject "Hi" --body-html "<p>Hello</p>"clawback gmail send --to a@b.com --subject "Re: Hi" --body "Reply" --reply-to-message-id <msgId> --thread-id <threadId>clawback gmail thread list 'subject:meeting' --max 20clawback gmail thread get <threadId> --jsonclawback gmail thread modify <threadId> --add STARRED --remove UNREADclawback gmail labels listclawback gmail labels create --name "Important/Clients"clawback gmail labels modify <messageId> --add STARRED --remove UNREADclawback gmail drafts list --jsonclawback gmail drafts create --to a@b.com --subject "Draft" --body "WIP"clawback gmail drafts send <draftId> (may require approval)clawback gmail drafts delete <draftId>clawback gmail history --since <historyId> --max 50clawback gmail batch delete <id1> <id2> <id3>clawback gmail batch modify <id1> <id2> --add INBOX --remove SPAMclawback gmail settings filters list --jsonclawback gmail settings send-as listclawback gmail settings vacation getclawback gmail settings forwarding listclawback gmail settings delegates listclawback approvals list --status pending --jsonclawback approvals get <approvalId> --jsonclawback policy list --jsonAgent behavior
--subject "hello" --body "hello".Handling approvals (exit code 8)
When a send command exits with code 8, it means the email needs human approval before it goes out.
clawback approvals get <approvalId> --json in the background every ~30s.Handling other errors
clawback auth login.Notes
CB_SERVER defaults to https://clawback.sh; set it to use a different server.--json plus --no-input plus --fail-empty for reliable output parsing.--connection <id> selects which Gmail connection to use; auto-detected if you have one connection.--all auto-paginates search results (gmail search and thread list).--select field1,field2 projects JSON output to specific fields.--results-only strips the envelope and returns just the data array.