This will provide you with a Cloud Storage bucket into which you can upload PDFs. They will automatically be converted to txt files and stored under the same name, with .txt appended.
To put this to use:
- Create a new project in Google Cloud
- Select project
- Go to compute engine and activate the API
- Cloud storage -> create
- Enter bucket name -> Create -> enforce public access prevention
- Cloud functions -> create function
- if being prompted, enable all required APIs
- give a name to the Cloud Function
- trigger type: Cloud Storage
- Bucket: select the bucket you created
- click grant all
- click next
- Enable required APIs
- select python 3.12
- insert main.py's and requirements.txt's code
- click deploy