gws-workflow-file-announce
Resolve a Drive file and send one confirmed announcement to a Google Chat space.
Codex Runtime
- Dependencies: connected Drive and Chat apps or gws CLI; Google Workspace credentials
connected Drive and Chat apps or gws CLI
Google Workspace credentials
- Execution: Operate directly in the main Codex agent.
- Prefer connected Google Drive and Chat capabilities; the
gws CLI fallback is gws workflow +file-announce.
- Never print, log, or expose secret values.
Inputs and Preflight
- Require a Drive file ID, Chat space name such as
spaces/SPACE_ID, account context, and optional message.
- Check connected Drive and Chat capabilities first. If unavailable, confirm
gws authentication and inspect the workflow help/schema.
- Drive metadata lookup is Read-only and may proceed. Upload and Chat send operations are mutations.
Procedure
- Fetch only the file name, stable ID, URL, and access metadata needed to prepare the announcement.
- Draft the announcement from the verified file name and URL, or use the requested custom message.
- Present the exact Chat-space target, file, and message content. Obtain clear confirmation before sending.
- Send once with connected Chat. Otherwise run:
gws workflow +file-announce --file-id <ID> --space <SPACE> --message '<TEXT>'
- If the user first requests a local-file upload, treat that as a separate mutation: confirm the destination and file, upload through connected Drive or
gws drive +upload, then reconfirm the announcement content.
- Verify the returned Chat message and report its stable identifier or URL.
Safety and Errors
- Never upload or announce before explicit target/content confirmation.
- Do not announce a file the target audience cannot access; report access uncertainty instead of changing permissions implicitly.
- Never expose credential material or unrelated Drive/Chat content.
- After an uncertain send response, check the target space read-only before retrying.
Output Contract
Return the file ID/name, Chat-space target, confirmed message, route used, message ID or URL, any upload result, and all access or delivery limitations. State clearly when nothing was sent.
1---2name: gws-workflow-file-announce3description: Google Workflow: Announce a Drive file in a Chat space.4---56# gws-workflow-file-announce78Resolve a Drive file and send one confirmed announcement to a Google Chat space.910## Codex Runtime1112- **Dependencies:** connected Drive and Chat apps or gws CLI; Google Workspace credentials13- `connected Drive and Chat apps or gws CLI`14- `Google Workspace credentials`15- **Execution:** Operate directly in the main Codex agent.16- Prefer connected Google Drive and Chat capabilities; the `gws` CLI fallback is `gws workflow +file-announce`.17- Never print, log, or expose secret values.1819## Inputs and Preflight20211. Require a Drive file ID, Chat space name such as `spaces/SPACE_ID`, account context, and optional message.222. Check connected Drive and Chat capabilities first. If unavailable, confirm `gws` authentication and inspect the workflow help/schema.233. Drive metadata lookup is Read-only and may proceed. Upload and Chat send operations are mutations.2425## Procedure26271. Fetch only the file name, stable ID, URL, and access metadata needed to prepare the announcement.282. Draft the announcement from the verified file name and URL, or use the requested custom message.293. Present the exact Chat-space target, file, and message content. Obtain clear confirmation before sending.304. Send once with connected Chat. Otherwise run:31 ```bash32 gws workflow +file-announce --file-id <ID> --space <SPACE> --message '<TEXT>'33 ```345. If the user first requests a local-file upload, treat that as a separate mutation: confirm the destination and file, upload through connected Drive or `gws drive +upload`, then reconfirm the announcement content.356. Verify the returned Chat message and report its stable identifier or URL.3637## Safety and Errors3839- Never upload or announce before explicit target/content confirmation.40- Do not announce a file the target audience cannot access; report access uncertainty instead of changing permissions implicitly.41- Never expose credential material or unrelated Drive/Chat content.42- After an uncertain send response, check the target space read-only before retrying.4344## Output Contract4546Return the file ID/name, Chat-space target, confirmed message, route used, message ID or URL, any upload result, and all access or delivery limitations. State clearly when nothing was sent.