Access is granted and the link sent without requiring file and recipient confirmation
Source references: 1After a name-based search, the workflow immediately creates reader permission and sends an email. It does not explicitly require confirmation of the selected `FILE_ID`, recipient address, or file sensitivity. Duplicate names or incorrect placeholder substitution could expose the file to the wrong person.
An unintended recipient could retain access to the Drive file and receive a link that can be used or forwarded. A sent email also cannot generally be removed from the recipient's mailbox.
These are placeholder commands and do not execute merely because the document is read. However, the live recipe directs the agent to search by name, then immediately grant read access and email the link, without requiring confirmation of a unique FILE_ID, the recipient, or file sensitivity. If a duplicate-name file is selected or the address is substituted incorrectly, an unintended person could gain access. A user can ask for an explicit pre-send confirmation and restrict execution to a specified file ID and recipient.
1. Find the file: `gws drive files list --params '{"q": "name = '\''Quarterly Report'\''"}'`2. Share the file: `gws drive permissions create --params '{"fileId": "FILE_ID"}' --json '{"role": "reader", "type": "user", "emailAddress": "client@example.com"}'`3. Email the link: `gws gmail +send --to client@example.com --subject 'Quarterly Report' --body 'Hi, please find the report here: https://docs.google.com/document/d/FILE_ID'`