Ciao,I try to help you, but consider that I am very very inexperienced
I hope this code can help you as a starting point
var ListFile = Drive.Files.list({q: 'trashed = false and not mimeType = "application/vnd.google-apps.folder"',maxResults: 1,
corpora: 'teamDrive',supportsTeamDrives: true,
teamDriveId: '1AlHQhWfln-keUk9PcA',includeTeamDriveItems: true});var file = DriveApp.getFileById(ListFile.items[0].id)GmailApp.sendEmail(Recipient, Subject, Body, {attachments:file});Best regardsAndrea
On Thursday, 30 May 2019 03:41:29 UTC+2, Dawn wrote:Hello All, Can you point me to documentation and/or tutorials for accessing images in a Team Drive folder by fileID to include in an email from Google Sheets via a custom function in Google Apps script?
IMPORTANT:
This is a business and not a personal e-mail, this message and its attachments are confidential and may also be legally privileged.
If you are not the intended recipient, or have received this e-mail in error, please notify immediately the sender and delete this message and all its attachments.
Any unauthorized review, copying, disclosure, dissemination, or distribution of this message and/or its attachments is strictly forbidden.--
You received this message because you are subscribed to a topic in the Google Groups "Google Apps Script Community" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-apps-script-community/T6jTcNwGnEA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-apps-script-c...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-apps-script-community.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/175aa9d8-3cae-40df-bcfe-b64b3535ea92%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
driveId
— ID of shared drive to search.includeItemsFromAllDrives
— Whether shared drive items should be included in results. If not present or set to false, then shared drive items are not returned. Note: On June 1, 2020, this parameter will be ignored and shared drive items will be returned in results.corpora
— Bodies of items (files/documents) to which the query applies. Supported bodies are default
, domain
, drive
, and allDrives
. Prefer default
or drive
to allDrives
for efficiency.supportsAllDrives
— Whether the requesting application supports both My Drives and shared drives. If false, then shared drive items are not included in the response. Note: On June 1, 2020, this parameter will be ignored and all applications are assumed to support shared drivesYou received this message because you are subscribed to the Google Groups "Google Apps Script Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-script-c...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-apps-script-community.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/CACri9O6zv86Pun%2B%3DuQrj0b%3D_RxcFpuBSgpyoNFO%2Bx9um5%2B977g%40mail.gmail.com.