AutoWeb Gmail API - Get tites, senders from box email

Discussion in 'AutoApps' started by Damianek420, Jul 1, 2019.

  1. Damianek420

    Damianek420 New Member

    Joined:
    Jul 1, 2019
    Messages:
    4
    Likes Received:
    0
    @joaomgcd
    I would like to receive information about unread Gmail messages and their senders after the first unlock in the morning. I know that you can do the same with autonotify but without specific queries. I added 'list messages' with the query 'newer_than:1d is:unread'. Then 'Get message' that returns %payload_headers_value() but it's hard to pull out the title/sender because in different cases they have a different index and regex will not be able to handle it either. Any ideas? Please help
     
  2. Damianek420

    Damianek420 New Member

    Joined:
    Jul 1, 2019
    Messages:
    4
    Likes Received:
    0
    S1 knows?
     
  3. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    8,593
    Likes Received:
    731
    Can you please export your task's description (not xml) so I can take a look? Long-click the task in Tasker->export description Thanks in advance
     
  4. Damianek420

    Damianek420 New Member

    Joined:
    Jul 1, 2019
    Messages:
    4
    Likes Received:
    0
    @joaomgcd
    Yes bro, here you are:

    Zzz (55)
    A1: Variable Set [ Name:%index To:0 Recurse Variables:Off Do Maths:On Append:Off ]
    A2: AutoWeb Web Service [ Configuration:API: Gmail
    API Action: List messages
    Include spam trash: false
    User ID: me
    Search: newer_than:1d is:unread Timeout (Seconds):120 ]
    A3: For [ Variable:%mess_id Items:%aid() ]
    A4: AutoWeb Web Service [ Configuration:API: Gmail
    API Action: Get Message
    Format: full
    User ID: me Timeout (Seconds):120 ]
    A6: Array Push [ Variable Array:%mail_title Position:%index Value:%payload_headers_value22 Fill Spaces:Off ]
    A7: Array Push [ Variable Array:%mail_from Position:%index Value:%payload_headers_value23 Fill Spaces:Off ]
    A8: Variable Add [ Name:%index Value:1 Wrap Around:0 ]
    A9: End For


    Problem is in index because in different cases they have a different index. Maybe it can be done in different Way but i dont have idea :(
     
  5. Damianek420

    Damianek420 New Member

    Joined:
    Jul 1, 2019
    Messages:
    4
    Likes Received:
    0
  6. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    8,593
    Likes Received:
    731
    Sorry for the delay. Can you please give me an example of headers so I can maybe find how you could differentiate them?
     

Share This Page