If a function fails, this property will contain the last error as a string message, otherwise it will be undefined.
Reads the contents of the file at the path as a string. Returns undefined value if the file does not exist or could not be read. Paths should begin with a / and be relative to the root directory of your OneDrive.
Write the contents of the file at the path. Returns true if successful, false if the file could not be written successfully. This will override existing files!
Paths should begin with a / and be relative to the root directory of your OneDrive
Text to place in the file
Optionaloverwrite: booleanIf false, an existing file will not be overwritten
StaticcreateOptionalidentifier: stringOptional identifier for OneDrive account to use. This string is an arbitrary value, but we recommend using the email address you wish to associate with the script. Each unique identifier will be associated with its own Credential.
OneDrive objects can be used to work with files in a OneDrive account.
Example