This can be only fixed by storing token.pickle file in gcs bucket or secret mananger and then calling it from cloud run function. This is because probably cloud run does't allow to store certain files and also its stateless.