credentials.json
key file or its contents in JSON format.
Create a service account.
Create credentials for a service account.
To ensure maximum compatibility across Unstructured service offerings, you should give the service account key information to Unstructured as
a single-line string that contains the contents of the downloaded service account key file (and not the service account key file itself).
To print this single-line string without line breaks, suitable for copying, you can run one of the following commands from your Terminal or Command Prompt.
In this command, replace <path-to-downloaded-key-file>
with the path to the credentials.json
key file that you downloaded by following the preceding instructions.
{folder_id}
: https://drive.google.com/drive/folders/{folder-id}
.
permissions_data
field, which is within the
data_source
field under the element’s metadata
field. This information lists the users or groups, if any, that have
permissions to read, update, or delete the element’s associated source document.
The following example shows what the output looks like. Ellipses indicate content that has been omitted from this example for brevity.
service_account_key
value as a JSON-formatted object
that contains the ID of the related registered secret and its encryption type. This information represents the
encrypted version of the contents of the Google Cloud service account’s credentials.json
key file. You get this
information by following the instructions in Secrets.If you specify the service_account_key
value as a plain-text string instead,
Unstructured might still create the connector successfully. However, when you then try to test or use the new connector,
the connector will fail and the following error message is returned:
Field is sensitive and must be wrapped in as a secret reference or new secret value
.<name>
(required) - A unique name for this connector.
<drive-id>
- The ID for the target Google Drive folder or drive.
service_account_key
, specify the ID of the registered secret and its encryption type, representing the encrypted contents of the credentials.json
key file. For more information, see Secrets.
extensions
, set one or more <extension>
values (such as pdf
or docx
) to process files with only those extensions. The default is to include all extensions.
pdf
or docx
instead of .pdf
or .docx
.recursive
to true
to recursively process data from subfolders within the target folder or drive. The default is false
if not otherwise specified.