{"id":"dbcbc778-e753-4e31-a17f-520ed61305fb","shortId":"y5unns","kind":"skill","title":"gws-events-subscribe","tagline":"Google Workspace Events: Subscribe to Workspace events and stream them as NDJSON.","description":"# events +subscribe\n\n> **PREREQUISITE:** Read `../gws-shared/SKILL.md` for auth, global flags, and security rules. If missing, run `gws generate-skills` to create it.\n\nSubscribe to Workspace events and stream them as NDJSON\n\n## Usage\n\n```bash\ngws events +subscribe\n```\n\n## Flags\n\n| Flag | Required | Default | Description |\n|------|----------|---------|-------------|\n| `--target` | — | — | Workspace resource URI (e.g., //chat.googleapis.com/spaces/SPACE_ID) |\n| `--event-types` | — | — | Comma-separated CloudEvents types to subscribe to |\n| `--project` | — | — | GCP project ID for Pub/Sub resources |\n| `--subscription` | — | — | Existing Pub/Sub subscription name (skip setup) |\n| `--max-messages` | — | 10 | Max messages per pull batch (default: 10) |\n| `--poll-interval` | — | 5 | Seconds between pulls (default: 5) |\n| `--once` | — | — | Pull once and exit |\n| `--cleanup` | — | — | Delete created Pub/Sub resources on exit |\n| `--no-ack` | — | — | Don't auto-acknowledge messages |\n| `--output-dir` | — | — | Write each event to a separate JSON file in this directory |\n\n## Examples\n\n```bash\ngws events +subscribe --target '//chat.googleapis.com/spaces/SPACE' --event-types 'google.workspace.chat.message.v1.created' --project my-project\ngws events +subscribe --subscription projects/p/subscriptions/my-sub --once\ngws events +subscribe ... --cleanup --output-dir ./events\n```\n\n## Tips\n\n- Without --cleanup, Pub/Sub resources persist for reconnection.\n- Press Ctrl-C to stop gracefully.\n\n> [!CAUTION]\n> This is a **write** command — confirm with the user before executing.\n\n## See Also\n\n- [gws-shared](../gws-shared/SKILL.md) — Global flags and auth\n- [gws-events](../gws-events/SKILL.md) — All subscribe to google workspace events commands","tags":["gws","events","subscribe","cli","googleworkspace","agent-skills","ai-agent","automation","discovery-api","gemini-cli-extension","google-admin","google-api"],"capabilities":["skill","source-googleworkspace","skill-gws-events-subscribe","topic-agent-skills","topic-ai-agent","topic-automation","topic-cli","topic-discovery-api","topic-gemini-cli-extension","topic-google-admin","topic-google-api","topic-google-calendar","topic-google-chat","topic-google-docs","topic-google-drive"],"categories":["cli"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/googleworkspace/cli/gws-events-subscribe","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add googleworkspace/cli","source_repo":"https://github.com/googleworkspace/cli","install_from":"skills.sh"}},"qualityScore":"0.700","qualityRationale":"deterministic score 0.70 from registry signals: · indexed on github topic:agent-skills · 25185 github stars · SKILL.md body (1,748 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-04-22T06:52:35.701Z","embedding":null,"createdAt":"2026-04-18T20:25:13.013Z","updatedAt":"2026-04-22T06:52:35.701Z","lastSeenAt":"2026-04-22T06:52:35.701Z","tsv":"'/chat.googleapis.com/spaces/space':150 '/chat.googleapis.com/spaces/space_id':63 '/events':172 '/gws-events/skill.md':213 '/gws-shared/skill.md':21,205 '10':92,99 '5':103,108 'ack':123 'acknowledg':128 'also':201 'auth':23,209 'auto':127 'auto-acknowledg':126 'bash':49,145 'batch':97 'c':184 'caution':188 'cleanup':114,168,175 'cloudev':70 'comma':68 'comma-separ':67 'command':193,220 'confirm':194 'creat':37,116 'ctrl':183 'ctrl-c':182 'default':56,98,107 'delet':115 'descript':57 'dir':132,171 'directori':143 'e.g':62 'event':3,7,11,17,42,51,65,135,147,152,160,166,212,219 'event-typ':64,151 'exampl':144 'execut':199 'exist':83 'exit':113,120 'file':140 'flag':25,53,54,207 'gcp':76 'generat':34 'generate-skil':33 'global':24,206 'googl':5,217 'google.workspace.chat.message.v1.created':154 'grace':187 'gws':2,32,50,146,159,165,203,211 'gws-event':210 'gws-events-subscrib':1 'gws-share':202 'id':78 'interv':102 'json':139 'max':90,93 'max-messag':89 'messag':91,94,129 'miss':30 'my-project':156 'name':86 'ndjson':16,47 'no-ack':121 'output':131,170 'output-dir':130,169 'per':95 'persist':178 'poll':101 'poll-interv':100 'prerequisit':19 'press':181 'project':75,77,155,158 'projects/p/subscriptions/my-sub':163 'pub/sub':80,84,117,176 'pull':96,106,110 'read':20 'reconnect':180 'requir':55 'resourc':60,81,118,177 'rule':28 'run':31 'second':104 'secur':27 'see':200 'separ':69,138 'setup':88 'share':204 'skill':35 'skill-gws-events-subscribe' 'skip':87 'source-googleworkspace' 'stop':186 'stream':13,44 'subscrib':4,8,18,39,52,73,148,161,167,215 'subscript':82,85,162 'target':58,149 'tip':173 'topic-agent-skills' 'topic-ai-agent' 'topic-automation' 'topic-cli' 'topic-discovery-api' 'topic-gemini-cli-extension' 'topic-google-admin' 'topic-google-api' 'topic-google-calendar' 'topic-google-chat' 'topic-google-docs' 'topic-google-drive' 'type':66,71,153 'uri':61 'usag':48 'user':197 'without':174 'workspac':6,10,41,59,218 'write':133,192","prices":[{"id":"1afa10ef-6035-42d9-a60c-b621e7908f37","listingId":"dbcbc778-e753-4e31-a17f-520ed61305fb","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"googleworkspace","category":"cli","install_from":"skills.sh"},"createdAt":"2026-04-18T20:25:13.013Z"}],"sources":[{"listingId":"dbcbc778-e753-4e31-a17f-520ed61305fb","source":"github","sourceId":"googleworkspace/cli/gws-events-subscribe","sourceUrl":"https://github.com/googleworkspace/cli/tree/main/skills/gws-events-subscribe","isPrimary":false,"firstSeenAt":"2026-04-18T21:51:52.184Z","lastSeenAt":"2026-04-22T06:52:35.701Z"},{"listingId":"dbcbc778-e753-4e31-a17f-520ed61305fb","source":"skills_sh","sourceId":"googleworkspace/cli/gws-events-subscribe","sourceUrl":"https://skills.sh/googleworkspace/cli/gws-events-subscribe","isPrimary":true,"firstSeenAt":"2026-04-18T20:25:13.013Z","lastSeenAt":"2026-04-22T06:40:13.463Z"}],"details":{"listingId":"dbcbc778-e753-4e31-a17f-520ed61305fb","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"googleworkspace","slug":"gws-events-subscribe","github":{"repo":"googleworkspace/cli","stars":25185,"topics":["agent-skills","ai-agent","automation","cli","discovery-api","gemini-cli-extension","google-admin","google-api","google-calendar","google-chat","google-docs","google-drive","google-sheets","google-workspace","oauth2","rust"],"license":"apache-2.0","html_url":"https://github.com/googleworkspace/cli","pushed_at":"2026-04-22T06:40:36Z","description":"Google Workspace CLI — one command-line tool for Drive, Gmail, Calendar, Sheets, Docs, Chat, Admin, and more. Dynamically built from Google Discovery Service. Includes AI agent skills.","skill_md_sha":"f2e45e90f9a1ebea58995f560a9768ff98f1656b","skill_md_path":"skills/gws-events-subscribe/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/googleworkspace/cli/tree/main/skills/gws-events-subscribe"},"layout":"multi","source":"github","category":"cli","frontmatter":{"name":"gws-events-subscribe","description":"Google Workspace Events: Subscribe to Workspace events and stream them as NDJSON."},"skills_sh_url":"https://skills.sh/googleworkspace/cli/gws-events-subscribe"},"updatedAt":"2026-04-22T06:52:35.701Z"}}