12.10.2 A scenario for uploading the file to the ChatGPT platform
To upload a Google Drive file to the ChatGPT platform and save its ID, you need to create a 5-node scenario:
- (1) Schedule, to run the scenario, for example, once a week at the time of the desired time zone:
- (2) Download File, to download the desired file from Google Drive. To configure the node, you you need to perform authorization and fill in the File field with the value of the global variable created in the scenario for transferring Notion content to a Google Drive file:
- (3) Upload File, to upload a file to the ChatGPT platform. To configure a node, specify the API key and fill in the File field with the value of the previous node Download File
{{$2.result.file.content}}
.
- (4) SetGlobalVariables, to save the ID of the ChatGPT file. To configure a node, specify the value from the previous node Upload File as the value of the FileIdGPT global variable
{{$3.result.response_body.id}}
:
- (5) Webhook response, to return a response when the scenario is successful:
The result of executing the scenario will be a file uploaded to the ChatGPT platform and writing its identifier to the FileIdGPT global variable.