Add custom file properties

Custom file properties are key/value pairs used to store custom metadata for a file, such as tags, IDs from other data stores, information shared between workflow applications, and so on.

To add properties to your app, use the properties resource.

Properties can also be used in search expressions.

This is the structure of a typical property that might be used to store your database's ID for a Drive file on the file itself.

{
  'key':        'additionalID',
  'value':      '8e8aceg2af2ge72e78',
  'visibility': 'PRIVATE'
}
Custom properties have the following limits:

  • Maximum of 100 custom properties per file, totaled from all sources.
  • Maximum of 30 public properties per file, totaled from all sources.
  • Maximum of 30 private properties per file from any one application.
  • Maximum of 124 bytes size per property (including both key and value) string in UTF-8 encoding. For example, a property with a key that is ten characters long can only have 114 characters in the value. A property that requires 100 characters for the value can use up to 24 characters for the key.
  • Writing a file property has the same performance implications as other write operations.
For more information, refer to the properties resource.