Question on applying label while uploading the attachments.
I was able to upload attachments into google drive through API. Is it possible to apply label while uploading the attachments. Please advise
Question on applying label while uploading the attachments.
I was able to upload attachments into google drive through API. Is it possible to apply label while uploading the attachments. Please advise
The feature which allows for adding labels to the drive file metadata for Google workspace is currently in beta.
Beta: Use automated classification with DLP for Drive
Being that it is a beta feature this feature has not been added to the Google drive API, nor has any information been released that it will in the future be added to the google drive api.
There for i strongly recommend that you add a feature request so that Google is aware that you would like to be able to use this new feature in their API as well feature request
From December 7, 2021 announcement (bold selection mine):
Earlier this year we announced a beta for three features which can help categorize content and enhance content protection at scale. Drive labels are now generally available, and automated classification with Workspace data loss prevention and labels-driven sharing restrictions will become generally available in the coming weeks. Check back on the Workspace blog for updates.
Also, for API usage of labels, it seems to be available, according to help article:
Is it possible to apply labels through an API?
There is a labels API (beta) that you can use to create, edit, apply, and remove labels programmatically. Email drive-labels-feedback@google.com to request access to the labels API beta.