Getting and Using Folder Id and File Id Parameters in Google Drive Save Source Action
- Getting File IDs in Google Drive
- In Google Drive, right-click on the file inserted into a folder and click Share > Share.
- On the screen that opens, make sure that the service account user has access to view it and click Copy Link.
- Paste the copied link somewhere. You can get the fileId from the part marked in red. This is the fileId you will use in the action.
- Example link: https://drive.google.com/file/d/1vNG371Q2ZAkC0X7e8AHm2lftTMRSqWO_/view?usp=sharing
- The field marked in bold here: fileId
- Likewise, to get the folderId in Drive, you can use the link to the folder: https://drive.google.com/drive/folders/18V8ZSYTNE8T_gKum3ZVUK5wHZQM3s2aa
- The field marked in bold here: folderId
Creating a Save Source Action in the Interface
Add a Button element from the Elements panel on the left side of the UI Design module and define the Save Source action in the onClick action of this button.
Parameters:
- Source Type → Google Drive
- Name → Name of the file (set by the user)
- Update Interval in Hour → 1 (This specifies how many hours the Quadrant system will synchronize the file.)
- Client Email → test-652@vector-search-test-443209.iam.gserviceaccount.com (In Google Drive environment, service account email address with viewing authorization)
- Private Key → -----BEGIN PRIVATE KEY-----\n ....... \n-----END PRIVATE KEY-----\n (private key information in the JSON file downloaded while preparing the Google Drive environment)
- Token Uri → https://oauth2.googleapis.com/token (token URI in the JSON file downloaded while preparing the Google Drive environment)
- Folder Id → 18V8ZSYTNE8T_gKum3ZVUK5wHZQM3s2aa (folderId shown above)
- File Id → 1vNG371Q2ZAkC0X7e8AHm2lftTMRSqWO_ (fileId shown above)
- Collection Name (optional) → googledrive1 (This sets a collection name starting with the username in the Qdrant system. If not entered, it is taken as DefaultCollection).
- Correlation Id (optional) → correlationId (This parameter allows the record to be added again if the source needs to be updated or if information such as privateKey, clientEmail changes.)
Creating Amazon S3 Save Source Action
Parameters
- Source Type → AWS
- Name → Name of the file (determined by the user)
- Update Interval in Hour → 1 (This specifies how many hours the Qdrant system will synchronize the file.)
- awsAccessKeyId → key (In the AWS environment, the steps to get this key are shown.)
- awsSecretAccessKey → key (In AWS environment, the steps to get this key are shown.)
- Bucket Name → test-bucket-vector-search (In the AWS environment, the steps to get this bucket name are shown)
- S3uri → s3://test-bucket-vector-search/s3Folder/ (In AWS environment, the steps to get this S3 uri are shown)
- Collection Name (optional) → googledrive1
- Correlation Id (optional) → correlationId
Creating a Manual Save Source Action
Parameters
- Source Type → Manual
- Name → Name of the file (determined by the user)
- Update Interval in Hour → 1 (This specifies how many hours the Qdrant system will synchronize the file)
- Folder Path → null
- File Path → null
- Base64 Content → "data:<mimetype_of_file>;base64,.... ” (A base64 conversion site can be used to get the content of the file in base64 format. This content must be specified along with the mime type of the file).
- Collection Name (optional) → googledrive1
- Correlation Id (optional) → correlationId