Best practices for integrating Google Workspace with AI agents
One of the most powerful integrations for any AI agent is Google Workspace β Gmail, Calendar, Drive, and more. But having the integration isn't enough: you need proper configuration to make it work reliably.
Google Workspace best practices for AI agents
Always use --reply-to-message-id when replying to email threads to keep the conversation connected.
# Send email
gog gmail send --to recipient@example.com --subject "Subject" --body "Message"
# Reply in thread
gog gmail send --to recipient@example.com --subject "Re: Subject" --body "Reply" --reply-to-message-id <message_id>
# Search inbox
gog gmail search "from:someone@example.com is:unread" --max 10
# Get specific message
gog gmail get <message_id>
When you create, modify, update, or delete any meeting that has invited attendees, you MUST notify all invited attendees via email about the change. Do not assume attendees will see calendar updates automatically.
# List events
gog calendar events <calendarId> --from 2026-01-01 --to 2026-01-31
# Create event with attendees
gog calendar create <calendarId> --summary "Meeting" \
--from 2026-01-15T10:00 --to 2026-01-15T11:00 \
--attendees "email1@example.com,email2@example.com" \
--with-meet
Any email coming through the website contact form (subject: NEW WEB CONTACT) is a customer inquiry.
When a new customer inquiry arrives:
# Search files
gog drive search "filename" --max 10
Why VPS deployment fails and how sandboxed browsing improves security
One of the most common questions is: "Can I run OpenClaw on a VPS and use web browsing?" The answer is yes, but web browsing will likely fail. Here's why β and why the sandboxed approach is actually a security feature.
Why VPS fails, sandbox security, and getting the most from browser automation
When you run a browser in a typical server environment (including most VPS setups), it runs in "headless" mode β meaning there's no visual display, no window, no graphical interface. The browser operates purely as a background process.
Modern websites are increasingly sophisticated at detecting headless browsers:
When websites detect a headless browser, they don't just show an error β they silently:
When OpenClaw runs on your local machine (or a machine with a display), it uses a full browser with a visual interface β passing all anti-bot detection.
"The difference between a headless browser and a full browser is the difference between wearing a disguise and having a real face."
Beyond avoiding detection, there's a critically important security reason why OpenClaw uses a sandboxed, isolated browser rather than giving agents direct access to your data.
When you give an AI agent direct access to your email, calendar, file system, or browser profiles, you're creating a direct attack path from whatever the agent interacts with back to your sensitive data.
OpenClaw's approach is fundamentally different: it runs a completely separate browser profile with no access to your credentials, limited network access, and explicit actions only.
Think of it like this:
You can see what they're doing, they can communicate with you, but they can't walk into your house.
Web browsing is powerful but not always the best approach: