AutoWeb Gmail API get message body data decoding needed

Discussion in 'AutoApps' started by henryxxxx, Jul 19, 2019.

  1. henryxxxx

    henryxxxx New Member

    Joined:
    May 13, 2019
    Messages:
    3
    Likes Received:
    0

    Body data is somehow encoded and payload body data won't come through.

    Needing some way for Autoweb to decode body data.

    I found this, https://github.com/googleapis/google-api-ruby-client/issues/145 . Could I decode somehow with AutoTools?

    I don't know, if payload body data is needed, then it doesn't seem to go through. Only body parts data comes through. I get something like this with developer.google.com page below, https://developers.google.com/gmail/api/v1/reference/users/messages/get? , results below:

    "body": {
    "size": 0
    },
    "parts": [
    {
    "partId": "0",
    "mimeType": "text/plain",
    "filename": "",
    "headers": [
    {
    "name": "Content-Type",
    "value": "text/plain; charset=UTF-8"
    },
    {
    "name": "Content-Transfer-Encoding",
    "value": "7bit"
    }
    ],
    "body": {
    "size": 925,
    "data": "/here is encoded stuff one"
    }
    },
    {
    "partId": "1",
    "mimeType": "text/html",
    "filename": "",
    "headers": [
    {
    "name": "Content-Type",
    "value": "text/html; charset=UTF-8"
    },
    {
    "name": "Content-Transfer-Encoding",
    "value": "7bit"
    }
    ],
    "body": {
    "size": 48412,
    "data": "/here I think is that payload encoded stuff which is much much longer, and not sure if it comes through as the payload variable remains empty after data is requested/"
    }
    }
    ]
    },
    "sizeEstimate": 54609
    }
     
  2. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    Hmmm is it maybe in base64?
     
  3. henryxxxx

    henryxxxx New Member

    Joined:
    May 13, 2019
    Messages:
    3
    Likes Received:
    0
    I remember that I did read that it was something like base64. I currently don't have awareness to decode it, and such as with AutoTools or other tools it seems I would need to invest some time to the matter to dig deeper as to how to decode it by some way. And like I said I think that maybe the payload didn't come through. Would be really great if AutoWeb somehow could decode it.
     
  4. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    Yeah, I'll have to look into that, thanks! :) BTW the Variable Convert action can convert Base64 if that's the case!
     
  5. henryxxxx

    henryxxxx New Member

    Joined:
    May 13, 2019
    Messages:
    3
    Likes Received:
    0
    Great, I didn't know that one before. Then maybe it's not Base64 or not entirely Base64 as I was unable to convert it. It decoded it to a bunch of question mark symbols.
     

Share This Page