Obtaining and Using the Folder ID and File ID Parameters in Google Drive Save Source Action
Obtaining File IDs in Google Drive
- In Google Drive, right-click on the file added to a folder and click on Share → Share.
- In the screen that opens, make sure that the service account user account has view access.
- Click the Copy link button.
- Paste the copied link somewhere.
- Get the File ID and Folder ID from the link:
Example link: https://drive.google.com/file/d/1vNG371Q2ZAkC0X7e8AHm2lftTMRSqXX_/view?usp=sharing
- This field: 1vNG371Q2ZAkC0X7e8AHm2lftTMRSqXX_ → File ID
Example link for the folder: https://drive.google.com/drive/folders/18V8ZSYTNE8T_gKum3ZVUK5wHZQXXXXaa
- This field: 18V8ZSYTNE8T_gKum3ZVUK5wHZQXXXXaa → Folder ID
Creating the Save Source Action in the Interface
- In the UI Design module, add a Button element from the Elements panel on the left side.
- Define the Save Source action in the onClick action of this button.
- Configure the following parameters:
Save Source Parameters for Google Drive
- Source Type: Google Drive
- Name: File name (specified by the user)
- Update Interval in Hour: 1 (This specifies how often the system will synchronise the file.)
- Client Email: test-652@vector-search-test-443209.iam.gserviceaccount.com (The email address of the service account with viewing permissions in Google Drive)
- Private Key:
-----BEGIN PRIVATE KEY-----MIIEvQIBADANBgkqhkiG9w0BAQEFAASC...Y29kZXJpbmcsIG11dGxpbGluZyBzZWN1cml0eQpFbWFpbCBzZXJ2aWNlcyB0ZXN0aW5nCg==p92jslK3jf82jd92Ksl39Dksl9dk20sP==L2V4YW1wbGVzL3Rlc3Rfa2V5X2RhdGE=QW55IHRleHQgdGhhdCBsb29rcyByZWFsaXN0aWMgaXMganVzdCBmb3Igc2hvdw==-----END PRIVATE KEY-----
- (Private key information from the Google Drive JSON file)
- Token Uri: https://oauth2.googleapis.com/token (Token URI obtained from the JSON file while preparing the Google Drive environment)
- Folder Id: 18V8ZSYTNE8T_gKum3ZVUK5wHZQM3s2aa (Google Drive folder ID)
- File Id: 1vNG371Q2ZAkC0X7e8AHm2lftTMRSqWO_ (Google Drive file ID)
- Collection Name (optional): googledrive1 (Specifies a specific collection name in the Qdrant system. If not entered, it is taken as DefaultCollection.)
- Correlation Id (optional): correlationId (Ensures that the record is re-added when the source is updated or the ID changes.)
Creating a Save Source Action for Amazon S3
- In the UI Design module, add a Button.
- Define the Save Source action in the onClick action of this button.
- Configure the following parameters:
Amazon S3 Save Source Parameters
- Source Type: AWS
- Name: File name (Specified by the user.)
- Update Interval in Hour: 1 (Specifies how often the file will be synchronised.)
- awsAccessKeyId: key (AWS access key)
- awsSecretAccessKey: key (AWS secret access key)
- Bucket Name: test-bucket-vector-search (Bucket name used in the AWS environment)
- S3uri: s3://test-bucket-vector-search/s3Folder/ (S3 file path in the AWS environment)
- Collection Name (optional): googledrive1
- Correlation Id (optional): correlationId
Creating a Manual Save Source Action
- In the UI Design module, add a Button.
- Define the Save Source action in the onClick action of this button.
- Configure the following parameters:
Manual Save Source Parameters
- Source Type: Manual
- Name: File name (Specified by the user.)
- Update Interval in Hour: 1 (Specifies how often the file will be synchronised.)
- Folder Path: null
- File Path: null
- Base64 Content:
data:<mimetype_of_file>;base64,……
- (A Base64 conversion site can be used to obtain the content of the file in Base64 format.)
- Collection Name (optional): googledrive1
- Correlation Id (optional): correlationId
By following these steps, you can successfully manage your resources on the Kuika platform using Google Drive, AWS S3, or the Manual method.