This is a simple project I used for extracting all senders from the given label/folder from my G Suite account.
If you want to use it, you have to setup a project in Google Cloud Console to get credentials.
Everything is described in detailed post on blog.