Search code examples
migration

Google groups mail conversation retrieval approach


Since I'm working to collect the google group mail conversation using group unique mail id. but there is no google-API approach. Kindly give me any ideas/approaches to achieve this.


Solution

  • You can do it with the Gmail API

    For this you need to

    • use the method users.messages.list
    • authenticate with a userId that is member of the Google group
    • set userId to me
    • set the query parameter q to to:EMAIL-OF-THE-GROUP

    Whereby EMAIL-OF-THE-GROUP is to be replaced with your actual group email.

    This query returns you the emails in a user's inbox that were addressed to the group email rather than the user's personal email.