[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6FJ4M78PTCZZ26QZFMD0WST":3,"skill-same:01M6FJ4M78PTCZZ26QZFMD0WST":89},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":25,"publishedAt":45,"linkOnly":46,"markdownContent":47,"markdownBody":48,"frontMatter":49,"refName":56,"commitSha":57,"skillDirectory":58,"forksCount":59,"repositoryHtmlUrl":60,"repositoryHomepageUrl":6,"ownerHtmlUrl":61,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":62,"install":63,"resources":76},"01M6FJ4M78PTCZZ26QZFMD0WST","claw",null,"Google Workspace via ClawEmail — Gmail, Drive, Docs, Sheets, Slides, Calendar, Forms. Use PROACTIVELY when the user asks to send email, create documents, manage files, schedule events, or work with any Google service.","kbarbel640-del\u002Fskills","kbarbel640-del","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F255315490?v=4","01M6CJPPQGCCESXMG3K7BBGQ5J","01M6CJPPX2PB2BCZERFVM2C2B3",1,"MIT","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fcto1\u002Fclawemail\u002FSKILL.md",[17,22],{"categoryNo":18,"categoryName":19,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000003","演示文稿","SCENARIO","使用场景",{"categoryNo":23,"categoryName":24,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000005","邮件与沟通",[5,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],"schedule","with","via","events","forms","manage","files","calendar","use","work","gmail","send email","slides","credentials","email","create","documents","google workspace","google","2026-11-10 10:12:30",false,"---\nname: claw\ndescription: \"Google Workspace via ClawEmail — Gmail, Drive, Docs, Sheets, Slides, Calendar, Forms. Use PROACTIVELY when the user asks to send email, create documents, manage files, schedule events, or work with any Google service.\"\nmetadata: {\"openclaw\":{\"emoji\":\"?\",\"requires\":{\"env\":[\"CLAWEMAIL_CREDENTIALS\"]},\"primaryEnv\":\"CLAWEMAIL_CREDENTIALS\"}}\n---\n\n# Claw — Google Workspace for AI Agents\n\nUse `claw` for Gmail, Drive, Docs, Sheets, Slides, Calendar, and Forms via your @clawemail.com account.\n\n## Setup\n\n1. Save your ClawEmail credentials JSON to `~\u002F.config\u002Fclawemail\u002Fcredentials.json`\n2. Set the environment variable: `export CLAWEMAIL_CREDENTIALS=~\u002F.config\u002Fclawemail\u002Fcredentials.json`\n\nGet credentials at https:\u002F\u002Fclawemail.com — sign up, then visit `\u002Fconnect\u002FYOUR_PREFIX` to authorize OAuth.\n\n## Getting an Access Token\n\nAll API calls need a Bearer token. Use the helper script to refresh and cache it:\n\n```bash\nTOKEN=$(~\u002F.openclaw\u002Fskills\u002Fclaw\u002Fscripts\u002Ftoken.sh)\n```\n\nThe script caches tokens for 50 minutes. Always assign to `TOKEN` before making API calls.\n\n---\n\n## Gmail\n\n### Search emails\n\n```bash\nTOKEN=$(~\u002F.openclaw\u002Fskills\u002Fclaw\u002Fscripts\u002Ftoken.sh)\ncurl -s -H \"Authorization: Bearer $TOKEN\" \\\n  \"https:\u002F\u002Fgmail.googleapis.com\u002Fgmail\u002Fv1\u002Fusers\u002Fme\u002Fmessages?q=newer_than:7d&maxResults=10\" | python3 -m json.tool\n```\n\nCommon query operators: `from:`, `to:`, `subject:`, `newer_than:`, `older_than:`, `is:unread`, `has:attachment`, `label:`, `in:inbox`.\n\n### Read a message\n\n```bash\ncurl -s -H \"Authorization: Bearer $TOKEN\" \\\n  \"https:\u002F\u002Fgmail.googleapis.com\u002Fgmail\u002Fv1\u002Fusers\u002Fme\u002Fmessages\u002FMESSAGE_ID?format=full\" | python3 -m json.tool\n```\n\nFor plain text body only, use `format=minimal` and decode the payload. For readable output:\n\n```bash\ncurl -s -H \"Authorization: Bearer $TOKEN\" \\\n  \"https:\u002F\u002Fgmail.googleapis.com\u002Fgmail\u002Fv1\u002Fusers\u002Fme\u002Fmessages\u002FMESSAGE_ID?format=full\" \\\n  | python3 -c \"\nimport json,sys,base64\nm=json.load(sys.stdin)\nhdrs={h['name']:h['value'] for h in m['payload']['headers']}\nprint(f\\\"From: {hdrs.get('From','')}\\nTo: {hdrs.get('To','')}\\nSubject: {hdrs.get('Subject','')}\\nDate: {hdrs.get('Date','')}\\n\\\")\ndef get_body(part):\n    if part.get('body',{}).get('data'):\n        return base64.urlsafe_b64decode(part['body']['data']).decode('utf-8','replace')\n    for p in part.get('parts',[]):\n        if p['mimeType']=='text\u002Fplain': return get_body(p)\n    for p in part.get('parts',[]):\n        b=get_body(p)\n        if b: return b\n    return ''\nprint(get_body(m['payload']))\n\"\n```\n\n### Send an email\n\n```bash\nTOKEN=$(~\u002F.openclaw\u002Fskills\u002Fclaw\u002Fscripts\u002Ftoken.sh)\npython3 -c \"\nimport base64,json\nraw = base64.urlsafe_b64encode(\n    b'To: recipient@example.com\\r\\nSubject: Hello\\r\\nContent-Type: text\u002Fplain; charset=utf-8\\r\\n\\r\\nMessage body here'\n).decode()\nprint(json.dumps({'raw': raw}))\n\" | curl -s -X POST \\\n  -H \"Authorization: Bearer $TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d @- \\\n  \"https:\u002F\u002Fgmail.googleapis.com\u002Fgmail\u002Fv1\u002Fusers\u002Fme\u002Fmessages\u002Fsend\"\n```\n\nFor HTML emails, replace `Content-Type: text\u002Fplain` with `Content-Type: text\u002Fhtml` and use HTML in the body.\n\n### Reply to a message\n\nSame as send, but add `In-Reply-To:` and `References:` headers from the original message, and include `threadId` in the JSON body:\n\n```bash\npython3 -c \"\nimport base64,json\nraw = base64.urlsafe_b64encode(\n    b'To: recipient@example.com\\r\\nSubject: Re: Original Subject\\r\\nIn-Reply-To: \u003Coriginal-message-id>\\r\\nReferences: \u003Coriginal-message-id>\\r\\nContent-Type: text\u002Fplain; charset=utf-8\\r\\n\\r\\nReply body'\n).decode()\nprint(json.dumps({'raw': raw, 'threadId': 'THREAD_ID'}))\n\" | curl -s -X POST \\\n  -H \"Authorization: Bearer $TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d @- \\\n  \"https:\u002F\u002Fgmail.googleapis.com\u002Fgmail\u002Fv1\u002Fusers\u002Fme\u002Fmessages\u002Fsend\"\n```\n\n### List labels\n\n```bash\ncurl -s -H \"Authorization: Bearer $TOKEN\" \\\n  \"https:\u002F\u002Fgmail.googleapis.com\u002Fgmail\u002Fv1\u002Fusers\u002Fme\u002Flabels\" | python3 -m json.tool\n```\n\n### Add\u002Fremove labels\n\n```bash\ncurl -s -X POST -H \"Authorization: Bearer $TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"addLabelIds\":[\"LABEL_ID\"],\"removeLabelIds\":[\"INBOX\"]}' \\\n  \"https:\u002F\u002Fgmail.googleapis.com\u002Fgmail\u002Fv1\u002Fusers\u002Fme\u002Fmessages\u002FMESSAGE_ID\u002Fmodify\"\n```\n\n---\n\n## Google Drive\n\n### List files\n\n```bash\nTOKEN=$(~\u002F.openclaw\u002Fskills\u002Fclaw\u002Fscripts\u002Ftoken.sh)\ncurl -s -H \"Authorization: Bearer $TOKEN\" \\\n  \"https:\u002F\u002Fwww.googleapis.com\u002Fdrive\u002Fv3\u002Ffiles?pageSize=20&fields=files(id,name,mimeType,modifiedTime,size)&orderBy=modifiedTime desc\" | python3 -m json.tool\n```\n\n### Search files\n\n```bash\ncurl -s -H \"Authorization: Bearer $TOKEN\" \\\n  \"https:\u002F\u002Fwww.googleapis.com\u002Fdrive\u002Fv3\u002Ffiles?q=name+contains+'report'&fields=files(id,name,mimeType,modifiedTime)\" | python3 -m json.tool\n```\n\nQuery operators: `name contains 'term'`, `mimeType='application\u002Fvnd.google-apps.document'`, `'FOLDER_ID' in parents`, `trashed=false`, `modifiedTime > '2025-01-01'`.\n\nCommon MIME types:\n- Document: `application\u002Fvnd.google-apps.document`\n- Spreadsheet: `application\u002Fvnd.google-apps.spreadsheet`\n- Presentation: `application\u002Fvnd.google-apps.presentation`\n- Folder: `application\u002Fvnd.google-apps.folder`\n- Form: `application\u002Fvnd.google-apps.form`\n\n### Create a folder\n\n```bash\ncurl -s -X POST -H \"Authorization: Bearer $TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"name\":\"My Folder\",\"mimeType\":\"application\u002Fvnd.google-apps.folder\"}' \\\n  \"https:\u002F\u002Fwww.googleapis.com\u002Fdrive\u002Fv3\u002Ffiles?fields=id,name\" | python3 -m json.tool\n```\n\n### Upload a file\n\n```bash\ncurl -s -X POST -H \"Authorization: Bearer $TOKEN\" \\\n  -F \"metadata={\\\"name\\\":\\\"report.pdf\\\"};type=application\u002Fjson\" \\\n  -F \"file=@\u002Fpath\u002Fto\u002Freport.pdf;type=application\u002Fpdf\" \\\n  \"https:\u002F\u002Fwww.googleapis.com\u002Fupload\u002Fdrive\u002Fv3\u002Ffiles?uploadType=multipart&fields=id,name\" | python3 -m json.tool\n```\n\n### Download a file\n\nFor Google Docs\u002FSheets\u002FSlides (export):\n\n```bash\ncurl -s -H \"Authorization: Bearer $TOKEN\" \\\n  \"https:\u002F\u002Fwww.googleapis.com\u002Fdrive\u002Fv3\u002Ffiles\u002FFILE_ID\u002Fexport?mimeType=application\u002Fpdf\" -o output.pdf\n```\n\nExport formats: `text\u002Fplain`, `text\u002Fhtml`, `application\u002Fpdf`, `application\u002Fvnd.openxmlformats-officedocument.wordprocessingml.document` (docx), `text\u002Fcsv` (sheets).\n\nFor binary files (download):\n\n```bash\ncurl -s -H \"Authorization: Bearer $TOKEN\" \\\n  \"https:\u002F\u002Fwww.googleapis.com\u002Fdrive\u002Fv3\u002Ffiles\u002FFILE_ID?alt=media\" -o output.file\n```\n\n### Share a file\n\n```bash\ncurl -s -X POST -H \"Authorization: Bearer $TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"role\":\"writer\",\"type\":\"user\",\"emailAddress\":\"user@example.com\"}' \\\n  \"https:\u002F\u002Fwww.googleapis.com\u002Fdrive\u002Fv3\u002Ffiles\u002FFILE_ID\u002Fpermissions\"\n```\n\nRoles: `reader`, `commenter`, `writer`, `owner`. Types: `user`, `group`, `domain`, `anyone`.\n\n### Delete a file\n\n```bash\ncurl -s -X DELETE -H \"Authorization: Bearer $TOKEN\" \\\n  \"https:\u002F\u002Fwww.googleapis.com\u002Fdrive\u002Fv3\u002Ffiles\u002FFILE_ID\"\n```\n\n---\n\n## Google Docs\n\n### Create a document\n\n```bash\nTOKEN=$(~\u002F.openclaw\u002Fskills\u002Fclaw\u002Fscripts\u002Ftoken.sh)\ncurl -s -X POST -H \"Authorization: Bearer $TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"title\":\"My Document\"}' \\\n  \"https:\u002F\u002Fdocs.googleapis.com\u002Fv1\u002Fdocuments\" | python3 -m json.tool\n```\n\n### Read a document\n\n```bash\ncurl -s -H \"Authorization: Bearer $TOKEN\" \\\n  \"https:\u002F\u002Fdocs.googleapis.com\u002Fv1\u002Fdocuments\u002FDOCUMENT_ID\" | python3 -m json.tool\n```\n\nFor plain text extraction:\n\n```bash\ncurl -s -H \"Authorization: Bearer $TOKEN\" \\\n  \"https:\u002F\u002Fdocs.googleapis.com\u002Fv1\u002Fdocuments\u002FDOCUMENT_ID\" \\\n  | python3 -c \"\nimport json,sys\ndoc=json.load(sys.stdin)\ntext=''\nfor el in doc.get('body',{}).get('content',[]):\n    for p in el.get('paragraph',{}).get('elements',[]):\n        text+=p.get('textRun',{}).get('content','')\nprint(text)\n\"\n```\n\n### Append text to a document\n\n```bash\ncurl -s -X POST -H \"Authorization: Bearer $TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"requests\":[{\"insertText\":{\"location\":{\"index\":1},\"text\":\"Hello, world!\\n\"}}]}' \\\n  \"https:\u002F\u002Fdocs.googleapis.com\u002Fv1\u002Fdocuments\u002FDOCUMENT_ID:batchUpdate\"\n```\n\n### Replace text in a document\n\n```bash\ncurl -s -X POST -H \"Authorization: Bearer $TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"requests\":[{\"replaceAllText\":{\"containsText\":{\"text\":\"OLD_TEXT\",\"matchCase\":true},\"replaceText\":\"NEW_TEXT\"}}]}' \\\n  \"https:\u002F\u002Fdocs.googleapis.com\u002Fv1\u002Fdocuments\u002FDOCUMENT_ID:batchUpdate\"\n```\n\n### Insert a heading\n\n```bash\ncurl -s -X POST -H \"Authorization: Bearer $TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"requests\":[{\"insertText\":{\"location\":{\"index\":1},\"text\":\"My Heading\\n\"}},{\"updateParagraphStyle\":{\"range\":{\"startIndex\":1,\"endIndex\":12},\"paragraphStyle\":{\"namedStyleType\":\"HEADING_1\"},\"fields\":\"namedStyleType\"}}]}' \\\n  \"https:\u002F\u002Fdocs.googleapis.com\u002Fv1\u002Fdocuments\u002FDOCUMENT_ID:batchUpdate\"\n```\n\nHeading styles: `HEADING_1` through `HEADING_6`, `TITLE`, `SUBTITLE`, `NORMAL_TEXT`.\n\n---\n\n## Google Sheets\n\n### Create a spreadsheet\n\n```bash\nTOKEN=$(~\u002F.openclaw\u002Fskills\u002Fclaw\u002Fscripts\u002Ftoken.sh)\ncurl -s -X POST -H \"Authorization: Bearer $TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"properties\":{\"title\":\"My Spreadsheet\"}}' \\\n  \"https:\u002F\u002Fsheets.googleapis.com\u002Fv4\u002Fspreadsheets\" | python3 -m json.tool\n```\n\n### Read cells\n\n```bash\ncurl -s -H \"Authorization: Bearer $TOKEN\" \\\n  \"https:\u002F\u002Fsheets.googleapis.com\u002Fv4\u002Fspreadsheets\u002FSPREADSHEET_ID\u002Fvalues\u002FSheet1!A1:D10\" | python3 -m json.tool\n```\n\n### Write cells\n\n```bash\ncurl -s -X PUT -H \"Authorization: Bearer $TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"values\":[[\"Name\",\"Age\",\"City\"],[\"Alice\",\"30\",\"NYC\"],[\"Bob\",\"25\",\"LA\"]]}' \\\n  \"https:\u002F\u002Fsheets.googleapis.com\u002Fv4\u002Fspreadsheets\u002FSPREADSHEET_ID\u002Fvalues\u002FSheet1!A1:C3?valueInputOption=USER_ENTERED\" | python3 -m json.tool\n```\n\n### Append rows\n\n```bash\ncurl -s -X POST -H \"Authorization: Bearer $TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"values\":[[\"Charlie\",\"35\",\"Chicago\"]]}' \\\n  \"https:\u002F\u002Fsheets.googleapis.com\u002Fv4\u002Fspreadsheets\u002FSPREADSHEET_ID\u002Fvalues\u002FSheet1!A:C:append?valueInputOption=USER_ENTERED&insertDataOption=INSERT_ROWS\" | python3 -m json.tool\n```\n\n### Clear a range\n\n```bash\ncurl -s -X POST -H \"Authorization: Bearer $TOKEN\" \\\n  \"https:\u002F\u002Fsheets.googleapis.com\u002Fv4\u002Fspreadsheets\u002FSPREADSHEET_ID\u002Fvalues\u002FSheet1!A1:D10:clear\"\n```\n\n### Get spreadsheet metadata\n\n```bash\ncurl -s -H \"Authorization: Bearer $TOKEN\" \\\n  \"https:\u002F\u002Fsheets.googleapis.com\u002Fv4\u002Fspreadsheets\u002FSPREADSHEET_ID?fields=properties.title,sheets.properties\" | python3 -m json.tool\n```\n\n---\n\n## Google Slides\n\n### Create a presentation\n\n```bash\nTOKEN=$(~\u002F.openclaw\u002Fskills\u002Fclaw\u002Fscripts\u002Ftoken.sh)\ncurl -s -X POST -H \"Authorization: Bearer $TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"title\":\"My Presentation\"}' \\\n  \"https:\u002F\u002Fslides.googleapis.com\u002Fv1\u002Fpresentations\" | python3 -m json.tool\n```\n\n### Get presentation info\n\n```bash\ncurl -s -H \"Authorization: Bearer $TOKEN\" \\\n  \"https:\u002F\u002Fslides.googleapis.com\u002Fv1\u002Fpresentations\u002FPRESENTATION_ID\" | python3 -m json.tool\n```\n\n### Add a new slide\n\n```bash\ncurl -s -X POST -H \"Authorization: Bearer $TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"requests\":[{\"createSlide\":{\"slideLayoutReference\":{\"predefinedLayout\":\"TITLE_AND_BODY\"}}}]}' \\\n  \"https:\u002F\u002Fslides.googleapis.com\u002Fv1\u002Fpresentations\u002FPRESENTATION_ID:batchUpdate\" | python3 -m json.tool\n```\n\nLayouts: `BLANK`, `TITLE`, `TITLE_AND_BODY`, `TITLE_AND_TWO_COLUMNS`, `TITLE_ONLY`, `SECTION_HEADER`, `ONE_COLUMN_TEXT`, `MAIN_POINT`, `BIG_NUMBER`.\n\n### Add text to a slide\n\nFirst get the slide's page object IDs, then insert text into a placeholder:\n\n```bash\ncurl -s -X POST -H \"Authorization: Bearer $TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"requests\":[{\"insertText\":{\"objectId\":\"PLACEHOLDER_OBJECT_ID\",\"text\":\"Hello from ClawEmail!\",\"insertionIndex\":0}}]}' \\\n  \"https:\u002F\u002Fslides.googleapis.com\u002Fv1\u002Fpresentations\u002FPRESENTATION_ID:batchUpdate\"\n```\n\n### Add an image to a slide\n\n```bash\ncurl -s -X POST -H \"Authorization: Bearer $TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"requests\":[{\"createImage\":{\"url\":\"https:\u002F\u002Fexample.com\u002Fimage.png\",\"elementProperties\":{\"pageObjectId\":\"SLIDE_ID\",\"size\":{\"width\":{\"magnitude\":3000000,\"unit\":\"EMU\"},\"height\":{\"magnitude\":2000000,\"unit\":\"EMU\"}},\"transform\":{\"scaleX\":1,\"scaleY\":1,\"translateX\":1000000,\"translateY\":1500000,\"unit\":\"EMU\"}}}}]}' \\\n  \"https:\u002F\u002Fslides.googleapis.com\u002Fv1\u002Fpresentations\u002FPRESENTATION_ID:batchUpdate\"\n```\n\n---\n\n## Google Calendar\n\n### List upcoming events\n\n```bash\nTOKEN=$(~\u002F.openclaw\u002Fskills\u002Fclaw\u002Fscripts\u002Ftoken.sh)\ncurl -s -H \"Authorization: Bearer $TOKEN\" \\\n  \"https:\u002F\u002Fwww.googleapis.com\u002Fcalendar\u002Fv3\u002Fcalendars\u002Fprimary\u002Fevents?timeMin=$(date -u +%Y-%m-%dT%H:%M:%SZ)&maxResults=10&singleEvents=true&orderBy=startTime\" | python3 -m json.tool\n```\n\n### Get events in a date range\n\n```bash\ncurl -s -H \"Authorization: Bearer $TOKEN\" \\\n  \"https:\u002F\u002Fwww.googleapis.com\u002Fcalendar\u002Fv3\u002Fcalendars\u002Fprimary\u002Fevents?timeMin=2025-03-01T00:00:00Z&timeMax=2025-03-31T23:59:59Z&singleEvents=true&orderBy=startTime\" | python3 -m json.tool\n```\n\n### Create an event\n\n```bash\ncurl -s -X POST -H \"Authorization: Bearer $TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n    \"summary\": \"Team Meeting\",\n    \"description\": \"Weekly standup\",\n    \"start\": {\"dateTime\": \"2025-03-15T10:00:00-05:00\", \"timeZone\": \"America\u002FNew_York\"},\n    \"end\": {\"dateTime\": \"2025-03-15T11:00:00-05:00\", \"timeZone\": \"America\u002FNew_York\"},\n    \"attendees\": [{\"email\": \"colleague@example.com\"}]\n  }' \\\n  \"https:\u002F\u002Fwww.googleapis.com\u002Fcalendar\u002Fv3\u002Fcalendars\u002Fprimary\u002Fevents\" | python3 -m json.tool\n```\n\n### Update an event\n\n```bash\ncurl -s -X PATCH -H \"Authorization: Bearer $TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"summary\":\"Updated Meeting Title\",\"location\":\"Conference Room A\"}' \\\n  \"https:\u002F\u002Fwww.googleapis.com\u002Fcalendar\u002Fv3\u002Fcalendars\u002Fprimary\u002Fevents\u002FEVENT_ID\" | python3 -m json.tool\n```\n\n### Delete an event\n\n```bash\ncurl -s -X DELETE -H \"Authorization: Bearer $TOKEN\" \\\n  \"https:\u002F\u002Fwww.googleapis.com\u002Fcalendar\u002Fv3\u002Fcalendars\u002Fprimary\u002Fevents\u002FEVENT_ID\"\n```\n\n### List calendars\n\n```bash\ncurl -s -H \"Authorization: Bearer $TOKEN\" \\\n  \"https:\u002F\u002Fwww.googleapis.com\u002Fcalendar\u002Fv3\u002Fusers\u002Fme\u002FcalendarList\" | python3 -m json.tool\n```\n\n---\n\n## Google Forms\n\n### Create a form\n\n```bash\nTOKEN=$(~\u002F.openclaw\u002Fskills\u002Fclaw\u002Fscripts\u002Ftoken.sh)\ncurl -s -X POST -H \"Authorization: Bearer $TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"info\":{\"title\":\"Feedback Form\"}}' \\\n  \"https:\u002F\u002Fforms.googleapis.com\u002Fv1\u002Fforms\" | python3 -m json.tool\n```\n\n### Add questions\n\n```bash\ncurl -s -X POST -H \"Authorization: Bearer $TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"requests\":[{\"createItem\":{\"item\":{\"title\":\"How would you rate this?\",\"questionItem\":{\"question\":{\"required\":true,\"scaleQuestion\":{\"low\":1,\"high\":5,\"lowLabel\":\"Poor\",\"highLabel\":\"Excellent\"}}}},\"location\":{\"index\":0}}}]}' \\\n  \"https:\u002F\u002Fforms.googleapis.com\u002Fv1\u002Fforms\u002FFORM_ID:batchUpdate\"\n```\n\n### Get form responses\n\n```bash\ncurl -s -H \"Authorization: Bearer $TOKEN\" \\\n  \"https:\u002F\u002Fforms.googleapis.com\u002Fv1\u002Fforms\u002FFORM_ID\u002Fresponses\" | python3 -m json.tool\n```\n\n---\n\n## Tips\n\n- **Always refresh token first:** Start every sequence with `TOKEN=$(~\u002F.openclaw\u002Fskills\u002Fclaw\u002Fscripts\u002Ftoken.sh)`\n- **JSON output:** Pipe through `python3 -m json.tool` for readable output, or `| python3 -c \"import json,sys;...\"` for extraction\n- **Pagination:** Most list endpoints return `nextPageToken`. Pass it as `?pageToken=TOKEN` for the next page\n- **Batch operations:** Docs, Sheets, and Slides support `batchUpdate` — send multiple operations in one request\n- **Error 401:** Token expired. Re-run `token.sh` to refresh\n- **Error 403:** Scope not authorized. The ClawEmail OAuth includes Gmail, Drive, Docs, Sheets, Slides, Calendar, and Forms scopes\n- **Rate limits:** Google APIs have per-user rate limits. Add brief delays between rapid successive calls\n- **File IDs:** Google Docs\u002FSheets\u002FSlides URLs contain the file ID: `https:\u002F\u002Fdocs.google.com\u002Fdocument\u002Fd\u002FFILE_ID\u002Fedit`\n\n## When to Use\n\n- User asks to send, read, or search email\n- User wants to create or edit documents, spreadsheets, or presentations\n- User needs to manage files in Google Drive\n- User wants to schedule or check calendar events\n- User asks to create forms or review form responses\n- Any task involving Google Workspace services\n","# Claw — Google Workspace for AI Agents\n\nUse `claw` for Gmail, Drive, Docs, Sheets, Slides, Calendar, and Forms via your @clawemail.com account.\n\n## Setup\n\n1. Save your ClawEmail credentials JSON to `~\u002F.config\u002Fclawemail\u002Fcredentials.json`\n2. Set the environment variable: `export CLAWEMAIL_CREDENTIALS=~\u002F.config\u002Fclawemail\u002Fcredentials.json`\n\nGet credentials at https:\u002F\u002Fclawemail.com — sign up, then visit `\u002Fconnect\u002FYOUR_PREFIX` to authorize OAuth.\n\n## Getting an Access Token\n\nAll API calls need a Bearer token. Use the helper script to refresh and cache it:\n\n```bash\nTOKEN=$(~\u002F.openclaw\u002Fskills\u002Fclaw\u002Fscripts\u002Ftoken.sh)\n```\n\nThe script caches tokens for 50 minutes. Always assign to `TOKEN` before making API calls.\n\n---\n\n## Gmail\n\n### Search emails\n\n```bash\nTOKEN=$(~\u002F.openclaw\u002Fskills\u002Fclaw\u002Fscripts\u002Ftoken.sh)\ncurl -s -H \"Authorization: Bearer $TOKEN\" \\\n  \"https:\u002F\u002Fgmail.googleapis.com\u002Fgmail\u002Fv1\u002Fusers\u002Fme\u002Fmessages?q=newer_than:7d&maxResults=10\" | python3 -m json.tool\n```\n\nCommon query operators: `from:`, `to:`, `subject:`, `newer_than:`, `older_than:`, `is:unread`, `has:attachment`, `label:`, `in:inbox`.\n\n### Read a message\n\n```bash\ncurl -s -H \"Authorization: Bearer $TOKEN\" \\\n  \"https:\u002F\u002Fgmail.googleapis.com\u002Fgmail\u002Fv1\u002Fusers\u002Fme\u002Fmessages\u002FMESSAGE_ID?format=full\" | python3 -m json.tool\n```\n\nFor plain text body only, use `format=minimal` and decode the payload. For readable output:\n\n```bash\ncurl -s -H \"Authorization: Bearer $TOKEN\" \\\n  \"https:\u002F\u002Fgmail.googleapis.com\u002Fgmail\u002Fv1\u002Fusers\u002Fme\u002Fmessages\u002FMESSAGE_ID?format=full\" \\\n  | python3 -c \"\nimport json,sys,base64\nm=json.load(sys.stdin)\nhdrs={h['name']:h['value'] for h in m['payload']['headers']}\nprint(f\\\"From: {hdrs.get('From','')}\\nTo: {hdrs.get('To','')}\\nSubject: {hdrs.get('Subject','')}\\nDate: {hdrs.get('Date','')}\\n\\\")\ndef get_body(part):\n    if part.get('body',{}).get('data'):\n        return base64.urlsafe_b64decode(part['body']['data']).decode('utf-8','replace')\n    for p in part.get('parts',[]):\n        if p['mimeType']=='text\u002Fplain': return get_body(p)\n    for p in part.get('parts',[]):\n        b=get_body(p)\n        if b: return b\n    return ''\nprint(get_body(m['payload']))\n\"\n```\n\n### Send an email\n\n```bash\nTOKEN=$(~\u002F.openclaw\u002Fskills\u002Fclaw\u002Fscripts\u002Ftoken.sh)\npython3 -c \"\nimport base64,json\nraw = base64.urlsafe_b64encode(\n    b'To: recipient@example.com\\r\\nSubject: Hello\\r\\nContent-Type: text\u002Fplain; charset=utf-8\\r\\n\\r\\nMessage body here'\n).decode()\nprint(json.dumps({'raw': raw}))\n\" | curl -s -X POST \\\n  -H \"Authorization: Bearer $TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d @- \\\n  \"https:\u002F\u002Fgmail.googleapis.com\u002Fgmail\u002Fv1\u002Fusers\u002Fme\u002Fmessages\u002Fsend\"\n```\n\nFor HTML emails, replace `Content-Type: text\u002Fplain` with `Content-Type: text\u002Fhtml` and use HTML in the body.\n\n### Reply to a message\n\nSame as send, but add `In-Reply-To:` and `References:` headers from the original message, and include `threadId` in the JSON body:\n\n```bash\npython3 -c \"\nimport base64,json\nraw = base64.urlsafe_b64encode(\n    b'To: recipient@example.com\\r\\nSubject: Re: Original Subject\\r\\nIn-Reply-To: \u003Coriginal-message-id>\\r\\nReferences: \u003Coriginal-message-id>\\r\\nContent-Type: text\u002Fplain; charset=utf-8\\r\\n\\r\\nReply body'\n).decode()\nprint(json.dumps({'raw': raw, 'threadId': 'THREAD_ID'}))\n\" | curl -s -X POST \\\n  -H \"Authorization: Bearer $TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d @- \\\n  \"https:\u002F\u002Fgmail.googleapis.com\u002Fgmail\u002Fv1\u002Fusers\u002Fme\u002Fmessages\u002Fsend\"\n```\n\n### List labels\n\n```bash\ncurl -s -H \"Authorization: Bearer $TOKEN\" \\\n  \"https:\u002F\u002Fgmail.googleapis.com\u002Fgmail\u002Fv1\u002Fusers\u002Fme\u002Flabels\" | python3 -m json.tool\n```\n\n### Add\u002Fremove labels\n\n```bash\ncurl -s -X POST -H \"Authorization: Bearer $TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"addLabelIds\":[\"LABEL_ID\"],\"removeLabelIds\":[\"INBOX\"]}' \\\n  \"https:\u002F\u002Fgmail.googleapis.com\u002Fgmail\u002Fv1\u002Fusers\u002Fme\u002Fmessages\u002FMESSAGE_ID\u002Fmodify\"\n```\n\n---\n\n## Google Drive\n\n### List files\n\n```bash\nTOKEN=$(~\u002F.openclaw\u002Fskills\u002Fclaw\u002Fscripts\u002Ftoken.sh)\ncurl -s -H \"Authorization: Bearer $TOKEN\" \\\n  \"https:\u002F\u002Fwww.googleapis.com\u002Fdrive\u002Fv3\u002Ffiles?pageSize=20&fields=files(id,name,mimeType,modifiedTime,size)&orderBy=modifiedTime desc\" | python3 -m json.tool\n```\n\n### Search files\n\n```bash\ncurl -s -H \"Authorization: Bearer $TOKEN\" \\\n  \"https:\u002F\u002Fwww.googleapis.com\u002Fdrive\u002Fv3\u002Ffiles?q=name+contains+'report'&fields=files(id,name,mimeType,modifiedTime)\" | python3 -m json.tool\n```\n\nQuery operators: `name contains 'term'`, `mimeType='application\u002Fvnd.google-apps.document'`, `'FOLDER_ID' in parents`, `trashed=false`, `modifiedTime > '2025-01-01'`.\n\nCommon MIME types:\n- Document: `application\u002Fvnd.google-apps.document`\n- Spreadsheet: `application\u002Fvnd.google-apps.spreadsheet`\n- Presentation: `application\u002Fvnd.google-apps.presentation`\n- Folder: `application\u002Fvnd.google-apps.folder`\n- Form: `application\u002Fvnd.google-apps.form`\n\n### Create a folder\n\n```bash\ncurl -s -X POST -H \"Authorization: Bearer $TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"name\":\"My Folder\",\"mimeType\":\"application\u002Fvnd.google-apps.folder\"}' \\\n  \"https:\u002F\u002Fwww.googleapis.com\u002Fdrive\u002Fv3\u002Ffiles?fields=id,name\" | python3 -m json.tool\n```\n\n### Upload a file\n\n```bash\ncurl -s -X POST -H \"Authorization: Bearer $TOKEN\" \\\n  -F \"metadata={\\\"name\\\":\\\"report.pdf\\\"};type=application\u002Fjson\" \\\n  -F \"file=@\u002Fpath\u002Fto\u002Freport.pdf;type=application\u002Fpdf\" \\\n  \"https:\u002F\u002Fwww.googleapis.com\u002Fupload\u002Fdrive\u002Fv3\u002Ffiles?uploadType=multipart&fields=id,name\" | python3 -m json.tool\n```\n\n### Download a file\n\nFor Google Docs\u002FSheets\u002FSlides (export):\n\n```bash\ncurl -s -H \"Authorization: Bearer $TOKEN\" \\\n  \"https:\u002F\u002Fwww.googleapis.com\u002Fdrive\u002Fv3\u002Ffiles\u002FFILE_ID\u002Fexport?mimeType=application\u002Fpdf\" -o output.pdf\n```\n\nExport formats: `text\u002Fplain`, `text\u002Fhtml`, `application\u002Fpdf`, `application\u002Fvnd.openxmlformats-officedocument.wordprocessingml.document` (docx), `text\u002Fcsv` (sheets).\n\nFor binary files (download):\n\n```bash\ncurl -s -H \"Authorization: Bearer $TOKEN\" \\\n  \"https:\u002F\u002Fwww.googleapis.com\u002Fdrive\u002Fv3\u002Ffiles\u002FFILE_ID?alt=media\" -o output.file\n```\n\n### Share a file\n\n```bash\ncurl -s -X POST -H \"Authorization: Bearer $TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"role\":\"writer\",\"type\":\"user\",\"emailAddress\":\"user@example.com\"}' \\\n  \"https:\u002F\u002Fwww.googleapis.com\u002Fdrive\u002Fv3\u002Ffiles\u002FFILE_ID\u002Fpermissions\"\n```\n\nRoles: `reader`, `commenter`, `writer`, `owner`. Types: `user`, `group`, `domain`, `anyone`.\n\n### Delete a file\n\n```bash\ncurl -s -X DELETE -H \"Authorization: Bearer $TOKEN\" \\\n  \"https:\u002F\u002Fwww.googleapis.com\u002Fdrive\u002Fv3\u002Ffiles\u002FFILE_ID\"\n```\n\n---\n\n## Google Docs\n\n### Create a document\n\n```bash\nTOKEN=$(~\u002F.openclaw\u002Fskills\u002Fclaw\u002Fscripts\u002Ftoken.sh)\ncurl -s -X POST -H \"Authorization: Bearer $TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"title\":\"My Document\"}' \\\n  \"https:\u002F\u002Fdocs.googleapis.com\u002Fv1\u002Fdocuments\" | python3 -m json.tool\n```\n\n### Read a document\n\n```bash\ncurl -s -H \"Authorization: Bearer $TOKEN\" \\\n  \"https:\u002F\u002Fdocs.googleapis.com\u002Fv1\u002Fdocuments\u002FDOCUMENT_ID\" | python3 -m json.tool\n```\n\nFor plain text extraction:\n\n```bash\ncurl -s -H \"Authorization: Bearer $TOKEN\" \\\n  \"https:\u002F\u002Fdocs.googleapis.com\u002Fv1\u002Fdocuments\u002FDOCUMENT_ID\" \\\n  | python3 -c \"\nimport json,sys\ndoc=json.load(sys.stdin)\ntext=''\nfor el in doc.get('body',{}).get('content',[]):\n    for p in el.get('paragraph',{}).get('elements',[]):\n        text+=p.get('textRun',{}).get('content','')\nprint(text)\n\"\n```\n\n### Append text to a document\n\n```bash\ncurl -s -X POST -H \"Authorization: Bearer $TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"requests\":[{\"insertText\":{\"location\":{\"index\":1},\"text\":\"Hello, world!\\n\"}}]}' \\\n  \"https:\u002F\u002Fdocs.googleapis.com\u002Fv1\u002Fdocuments\u002FDOCUMENT_ID:batchUpdate\"\n```\n\n### Replace text in a document\n\n```bash\ncurl -s -X POST -H \"Authorization: Bearer $TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"requests\":[{\"replaceAllText\":{\"containsText\":{\"text\":\"OLD_TEXT\",\"matchCase\":true},\"replaceText\":\"NEW_TEXT\"}}]}' \\\n  \"https:\u002F\u002Fdocs.googleapis.com\u002Fv1\u002Fdocuments\u002FDOCUMENT_ID:batchUpdate\"\n```\n\n### Insert a heading\n\n```bash\ncurl -s -X POST -H \"Authorization: Bearer $TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"requests\":[{\"insertText\":{\"location\":{\"index\":1},\"text\":\"My Heading\\n\"}},{\"updateParagraphStyle\":{\"range\":{\"startIndex\":1,\"endIndex\":12},\"paragraphStyle\":{\"namedStyleType\":\"HEADING_1\"},\"fields\":\"namedStyleType\"}}]}' \\\n  \"https:\u002F\u002Fdocs.googleapis.com\u002Fv1\u002Fdocuments\u002FDOCUMENT_ID:batchUpdate\"\n```\n\nHeading styles: `HEADING_1` through `HEADING_6`, `TITLE`, `SUBTITLE`, `NORMAL_TEXT`.\n\n---\n\n## Google Sheets\n\n### Create a spreadsheet\n\n```bash\nTOKEN=$(~\u002F.openclaw\u002Fskills\u002Fclaw\u002Fscripts\u002Ftoken.sh)\ncurl -s -X POST -H \"Authorization: Bearer $TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"properties\":{\"title\":\"My Spreadsheet\"}}' \\\n  \"https:\u002F\u002Fsheets.googleapis.com\u002Fv4\u002Fspreadsheets\" | python3 -m json.tool\n```\n\n### Read cells\n\n```bash\ncurl -s -H \"Authorization: Bearer $TOKEN\" \\\n  \"https:\u002F\u002Fsheets.googleapis.com\u002Fv4\u002Fspreadsheets\u002FSPREADSHEET_ID\u002Fvalues\u002FSheet1!A1:D10\" | python3 -m json.tool\n```\n\n### Write cells\n\n```bash\ncurl -s -X PUT -H \"Authorization: Bearer $TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"values\":[[\"Name\",\"Age\",\"City\"],[\"Alice\",\"30\",\"NYC\"],[\"Bob\",\"25\",\"LA\"]]}' \\\n  \"https:\u002F\u002Fsheets.googleapis.com\u002Fv4\u002Fspreadsheets\u002FSPREADSHEET_ID\u002Fvalues\u002FSheet1!A1:C3?valueInputOption=USER_ENTERED\" | python3 -m json.tool\n```\n\n### Append rows\n\n```bash\ncurl -s -X POST -H \"Authorization: Bearer $TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"values\":[[\"Charlie\",\"35\",\"Chicago\"]]}' \\\n  \"https:\u002F\u002Fsheets.googleapis.com\u002Fv4\u002Fspreadsheets\u002FSPREADSHEET_ID\u002Fvalues\u002FSheet1!A:C:append?valueInputOption=USER_ENTERED&insertDataOption=INSERT_ROWS\" | python3 -m json.tool\n```\n\n### Clear a range\n\n```bash\ncurl -s -X POST -H \"Authorization: Bearer $TOKEN\" \\\n  \"https:\u002F\u002Fsheets.googleapis.com\u002Fv4\u002Fspreadsheets\u002FSPREADSHEET_ID\u002Fvalues\u002FSheet1!A1:D10:clear\"\n```\n\n### Get spreadsheet metadata\n\n```bash\ncurl -s -H \"Authorization: Bearer $TOKEN\" \\\n  \"https:\u002F\u002Fsheets.googleapis.com\u002Fv4\u002Fspreadsheets\u002FSPREADSHEET_ID?fields=properties.title,sheets.properties\" | python3 -m json.tool\n```\n\n---\n\n## Google Slides\n\n### Create a presentation\n\n```bash\nTOKEN=$(~\u002F.openclaw\u002Fskills\u002Fclaw\u002Fscripts\u002Ftoken.sh)\ncurl -s -X POST -H \"Authorization: Bearer $TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"title\":\"My Presentation\"}' \\\n  \"https:\u002F\u002Fslides.googleapis.com\u002Fv1\u002Fpresentations\" | python3 -m json.tool\n```\n\n### Get presentation info\n\n```bash\ncurl -s -H \"Authorization: Bearer $TOKEN\" \\\n  \"https:\u002F\u002Fslides.googleapis.com\u002Fv1\u002Fpresentations\u002FPRESENTATION_ID\" | python3 -m json.tool\n```\n\n### Add a new slide\n\n```bash\ncurl -s -X POST -H \"Authorization: Bearer $TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"requests\":[{\"createSlide\":{\"slideLayoutReference\":{\"predefinedLayout\":\"TITLE_AND_BODY\"}}}]}' \\\n  \"https:\u002F\u002Fslides.googleapis.com\u002Fv1\u002Fpresentations\u002FPRESENTATION_ID:batchUpdate\" | python3 -m json.tool\n```\n\nLayouts: `BLANK`, `TITLE`, `TITLE_AND_BODY`, `TITLE_AND_TWO_COLUMNS`, `TITLE_ONLY`, `SECTION_HEADER`, `ONE_COLUMN_TEXT`, `MAIN_POINT`, `BIG_NUMBER`.\n\n### Add text to a slide\n\nFirst get the slide's page object IDs, then insert text into a placeholder:\n\n```bash\ncurl -s -X POST -H \"Authorization: Bearer $TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"requests\":[{\"insertText\":{\"objectId\":\"PLACEHOLDER_OBJECT_ID\",\"text\":\"Hello from ClawEmail!\",\"insertionIndex\":0}}]}' \\\n  \"https:\u002F\u002Fslides.googleapis.com\u002Fv1\u002Fpresentations\u002FPRESENTATION_ID:batchUpdate\"\n```\n\n### Add an image to a slide\n\n```bash\ncurl -s -X POST -H \"Authorization: Bearer $TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"requests\":[{\"createImage\":{\"url\":\"https:\u002F\u002Fexample.com\u002Fimage.png\",\"elementProperties\":{\"pageObjectId\":\"SLIDE_ID\",\"size\":{\"width\":{\"magnitude\":3000000,\"unit\":\"EMU\"},\"height\":{\"magnitude\":2000000,\"unit\":\"EMU\"}},\"transform\":{\"scaleX\":1,\"scaleY\":1,\"translateX\":1000000,\"translateY\":1500000,\"unit\":\"EMU\"}}}}]}' \\\n  \"https:\u002F\u002Fslides.googleapis.com\u002Fv1\u002Fpresentations\u002FPRESENTATION_ID:batchUpdate\"\n```\n\n---\n\n## Google Calendar\n\n### List upcoming events\n\n```bash\nTOKEN=$(~\u002F.openclaw\u002Fskills\u002Fclaw\u002Fscripts\u002Ftoken.sh)\ncurl -s -H \"Authorization: Bearer $TOKEN\" \\\n  \"https:\u002F\u002Fwww.googleapis.com\u002Fcalendar\u002Fv3\u002Fcalendars\u002Fprimary\u002Fevents?timeMin=$(date -u +%Y-%m-%dT%H:%M:%SZ)&maxResults=10&singleEvents=true&orderBy=startTime\" | python3 -m json.tool\n```\n\n### Get events in a date range\n\n```bash\ncurl -s -H \"Authorization: Bearer $TOKEN\" \\\n  \"https:\u002F\u002Fwww.googleapis.com\u002Fcalendar\u002Fv3\u002Fcalendars\u002Fprimary\u002Fevents?timeMin=2025-03-01T00:00:00Z&timeMax=2025-03-31T23:59:59Z&singleEvents=true&orderBy=startTime\" | python3 -m json.tool\n```\n\n### Create an event\n\n```bash\ncurl -s -X POST -H \"Authorization: Bearer $TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n    \"summary\": \"Team Meeting\",\n    \"description\": \"Weekly standup\",\n    \"start\": {\"dateTime\": \"2025-03-15T10:00:00-05:00\", \"timeZone\": \"America\u002FNew_York\"},\n    \"end\": {\"dateTime\": \"2025-03-15T11:00:00-05:00\", \"timeZone\": \"America\u002FNew_York\"},\n    \"attendees\": [{\"email\": \"colleague@example.com\"}]\n  }' \\\n  \"https:\u002F\u002Fwww.googleapis.com\u002Fcalendar\u002Fv3\u002Fcalendars\u002Fprimary\u002Fevents\" | python3 -m json.tool\n```\n\n### Update an event\n\n```bash\ncurl -s -X PATCH -H \"Authorization: Bearer $TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"summary\":\"Updated Meeting Title\",\"location\":\"Conference Room A\"}' \\\n  \"https:\u002F\u002Fwww.googleapis.com\u002Fcalendar\u002Fv3\u002Fcalendars\u002Fprimary\u002Fevents\u002FEVENT_ID\" | python3 -m json.tool\n```\n\n### Delete an event\n\n```bash\ncurl -s -X DELETE -H \"Authorization: Bearer $TOKEN\" \\\n  \"https:\u002F\u002Fwww.googleapis.com\u002Fcalendar\u002Fv3\u002Fcalendars\u002Fprimary\u002Fevents\u002FEVENT_ID\"\n```\n\n### List calendars\n\n```bash\ncurl -s -H \"Authorization: Bearer $TOKEN\" \\\n  \"https:\u002F\u002Fwww.googleapis.com\u002Fcalendar\u002Fv3\u002Fusers\u002Fme\u002FcalendarList\" | python3 -m json.tool\n```\n\n---\n\n## Google Forms\n\n### Create a form\n\n```bash\nTOKEN=$(~\u002F.openclaw\u002Fskills\u002Fclaw\u002Fscripts\u002Ftoken.sh)\ncurl -s -X POST -H \"Authorization: Bearer $TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"info\":{\"title\":\"Feedback Form\"}}' \\\n  \"https:\u002F\u002Fforms.googleapis.com\u002Fv1\u002Fforms\" | python3 -m json.tool\n```\n\n### Add questions\n\n```bash\ncurl -s -X POST -H \"Authorization: Bearer $TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"requests\":[{\"createItem\":{\"item\":{\"title\":\"How would you rate this?\",\"questionItem\":{\"question\":{\"required\":true,\"scaleQuestion\":{\"low\":1,\"high\":5,\"lowLabel\":\"Poor\",\"highLabel\":\"Excellent\"}}}},\"location\":{\"index\":0}}}]}' \\\n  \"https:\u002F\u002Fforms.googleapis.com\u002Fv1\u002Fforms\u002FFORM_ID:batchUpdate\"\n```\n\n### Get form responses\n\n```bash\ncurl -s -H \"Authorization: Bearer $TOKEN\" \\\n  \"https:\u002F\u002Fforms.googleapis.com\u002Fv1\u002Fforms\u002FFORM_ID\u002Fresponses\" | python3 -m json.tool\n```\n\n---\n\n## Tips\n\n- **Always refresh token first:** Start every sequence with `TOKEN=$(~\u002F.openclaw\u002Fskills\u002Fclaw\u002Fscripts\u002Ftoken.sh)`\n- **JSON output:** Pipe through `python3 -m json.tool` for readable output, or `| python3 -c \"import json,sys;...\"` for extraction\n- **Pagination:** Most list endpoints return `nextPageToken`. Pass it as `?pageToken=TOKEN` for the next page\n- **Batch operations:** Docs, Sheets, and Slides support `batchUpdate` — send multiple operations in one request\n- **Error 401:** Token expired. Re-run `token.sh` to refresh\n- **Error 403:** Scope not authorized. The ClawEmail OAuth includes Gmail, Drive, Docs, Sheets, Slides, Calendar, and Forms scopes\n- **Rate limits:** Google APIs have per-user rate limits. Add brief delays between rapid successive calls\n- **File IDs:** Google Docs\u002FSheets\u002FSlides URLs contain the file ID: `https:\u002F\u002Fdocs.google.com\u002Fdocument\u002Fd\u002FFILE_ID\u002Fedit`\n\n## When to Use\n\n- User asks to send, read, or search email\n- User wants to create or edit documents, spreadsheets, or presentations\n- User needs to manage files in Google Drive\n- User wants to schedule or check calendar events\n- User asks to create forms or review form responses\n- Any task involving Google Workspace services\n",{"name":5,"metadata":50,"description":7},{"openclaw":51},{"emoji":52,"requires":53,"primaryEnv":55},"?",{"env":54},[55],"CLAWEMAIL_CREDENTIALS","main","e7e336ac628c3e3bd771aff1aaa469c93778f94a","skills\u002Fcto1\u002Fclawemail",0,"https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del","2026-08-23 22:39:37",{"source":8,"skillName":5,"commands":64,"prompt":74,"zipAvailable":75},[65,68,71],{"tool":66,"command":67},"npx","npx skills add kbarbel640-del\u002Fskills --skill claw",{"tool":69,"command":70},"bunx","bunx skills add kbarbel640-del\u002Fskills --skill claw",{"tool":72,"command":73},"pnpm","pnpm dlx skills add kbarbel640-del\u002Fskills --skill claw","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fcto1\u002Fclawemail\u002FSKILL.md",true,[77,83],{"path":78,"resourceType":79,"resourceTypeDesc":80,"sizeBytes":81,"sourceHtmlUrl":82},"_meta.json","REFERENCE","参考文档",268,"https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fcto1\u002Fclawemail\u002F_meta.json",{"path":84,"resourceType":85,"resourceTypeDesc":86,"sizeBytes":87,"sourceHtmlUrl":88},"scripts\u002Ftoken.sh","SCRIPT","脚本",1914,"https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fcto1\u002Fclawemail\u002Fscripts\u002Ftoken.sh",[90,120,145,165,171,191],{"skillNo":91,"name":92,"nameZh":6,"description":93,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":94,"categories":95,"keywords":101,"publishedAt":45},"01M6G8J55967D6281ACMKAKTEQ","crowd-prompting","A marketplace where AI agents improve prompts, system instructions, tool descriptions, and other text-based content with domain expertise from real-world operations — and earn tokens for valuable contributions.","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fzzadrian\u002Fcrowd-prompting\u002FSKILL.md",[96],{"categoryNo":97,"categoryName":98,"taxonomyType":99,"taxonomyTypeDesc":100},"01JBSEEDCAT000000000000036","内容创作者","PROFESSION","适用职业",[102,103,104,27,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119],"crowd prompting","prompting","api","tokens","domain","world","prompts","operations","instructions","text","tool","system","improve","productivity","marketplace","https","content","ai agents",{"skillNo":121,"name":122,"nameZh":6,"description":123,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":124,"categories":125,"keywords":129,"publishedAt":45},"01M6G8J0PKPAYVET6BWE8W4C26","dilemm-ai","Compete in DilemmAI, the prisoner's dilemma AI arena at dilemm.ai. Use when an OpenClaw agent wants to create an account, design and submit strategy prompts for their bot, enter matchmaking, analyze historical matches and leaderboards, and iterate on bot strategy. Requires headless browser automation (no API available yet).","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fzyori\u002Fdilemm-ai\u002FSKILL.md",[126],{"categoryNo":127,"categoryName":128,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000023","Skill与智能体开发",[130,104,131,132,133,134,41,135,136,137,138,139,140,141,142,143,144,108,34],"dilemm ai","arena","analyze","browser","openclaw agent","automation","browser automation","bot","openclaw","design","strategy","headless","compete","submit","matchmaking",{"skillNo":146,"name":147,"nameZh":6,"description":148,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":149,"categories":150,"keywords":154,"publishedAt":45},"01M6G8HWAF3K9SW7NP3Z83CPJ6","arxiv-paper-reviews","Interact with arXiv Crawler API to fetch papers, read reviews, and submit comments. Use when working with arXiv papers, fetching paper lists by date\u002Fcategory\u002Finterest, viewing paper details with comments, or submitting paper reviews via API at http:\u002F\u002F150.158.152.82:8000.","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fzxrys\u002Fweak-accept\u002FSKILL.md",[151],{"categoryNo":152,"categoryName":153,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000021","资料检索与研究",[155,156,157,158,159,160,161,27,162,143,34,163,104,164,28],"arxiv paper reviews","reviews","arxiv","paper","crawler","papers","comments","fetch","read","http",{"skillNo":166,"name":147,"nameZh":6,"description":148,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":167,"categories":168,"keywords":170,"publishedAt":45},"01M6G8HQJ7N7WMY6YV7D7SSJ16","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fzxrys\u002Farxiv-paper-reviews\u002FSKILL.md",[169],{"categoryNo":152,"categoryName":153,"taxonomyType":20,"taxonomyTypeDesc":21},[158,157,156,155,28,160,161,27,159,143,34,162,163,104,164],{"skillNo":172,"name":173,"nameZh":6,"description":174,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":175,"categories":176,"keywords":177,"publishedAt":45},"01M6G8HM95Y64JNVFC2HN4E2BG","git-summary","Get a quick summary of the current Git repository including status, recent commits, branches, and contributors.","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fzweack\u002Fgit-summary\u002FSKILL.md",[],[178,179,180,181,182,183,184,185,186,187,188,189,190],"git","summary","git summary","commits","repository","win32","status","linux","contributors","true","quick","get","branches",{"skillNo":192,"name":193,"nameZh":6,"description":194,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":195,"categories":196,"keywords":201,"publishedAt":45},"01M6G8HGEGF05CNEJCGVYFSC4R","agent-constitution","Interact with AgentConstitution governance contracts on Base Sepolia. Check compliance, read rules, log actions, query governance state.","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fztsalexey\u002Fagent-constitution\u002FSKILL.md",[197,198],{"categoryNo":127,"categoryName":128,"taxonomyType":20,"taxonomyTypeDesc":21},{"categoryNo":199,"categoryName":200,"taxonomyType":99,"taxonomyTypeDesc":100},"01JBSEEDCAT000000000000037","律师与法务",[202,203,204,205,27,206,207,56,208,163,209,210,211,212,213,117,214,215,216],"agent constitution","constitution","contracts","tree","query","base","log","check","Rules","projects","compliance","actions","state","governance","github"]