AutoNotification New to AutoNotification...Not sure if I can do this

Discussion in 'Guides / Examples / Ideas Forum' started by Steve E., Jun 30, 2017.

  1. Steve E.

    Steve E. New Member

    Joined:
    Jun 30, 2017
    Messages:
    2
    Likes Received:
    0
    Greetings all,

    I am new to AutoNotification, but not Tasker.
    I am looking to create an auto calendar entry based off an email received. The email contains bits of information I am looking to extract and create an entry in my calendar. Of course the email is "pretty" and not easily scrubbed to pull data. Here is what I am working with from an email perspective:
    You have a new transaction!
    Jane Doe has created a new transaction. The details for this are below.
    Jane Doe
    Email: janedoe@email.com
    Mobile: 555-555-5555
    Telephone: 555-555-5555
    Purchased Item
    Date/Time: Saturday July 1st 2017 1:30pm
    Participant x 7
    Here are the things I want to pull out of an email and insert into a calendar entry.
    Calendar Date Entry for July 1st @ 1:30pm
    Jane Doe x 7 (as Title)
    Purchased Item (as Location)
    Email: Janedoe@email.com (as Notes)
    Mobile: 555-555-5555 (as Notes)
    Can this be done with Tasker and AN?
    I think I can get AN to see the message, and I think I can create an AN Query to see data, but what I dont know how to do is combine data from query, etc. Actually, I dont know how to do anything in Query, but I think it is possible at least.
    Any suggestions or insight would be helpful.
    Thanks,
    Steve E.
     
  2. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    Sorry for the delay!
    So can you confirm that AN can see the whole message?
    Do you mean that you're having trouble parsing out all the data from the message? :)

    Thanks!
     
  3. Steve E.

    Steve E. New Member

    Joined:
    Jun 30, 2017
    Messages:
    2
    Likes Received:
    0
    Sorry for my late reply.
    Yes, AN is seeing the message, I guess I just dont know how to pull out just the pieces I need from the message using Query.

    I think I am getting the full body of the message and I get the whole message, but I only want to parse bits and pieces to create a calendar entry.

    How do I find and combine say the last name and the number of participants?

    For example, I get that Jane Doe has made a reservation for 7. I think I need to assign several variables and parse the data to those variables.

    So, if I get this info from the message:
    Jane Doe has created a new transaction. The details for this are below.
    Jane Doe
    Email:janedoe@email.com
    Mobile: 555-555-5555
    Telephone: 555-555-5555
    Purchased Item
    Date/Time: Saturday July 1st 2017 1:30pm
    Participant x 7

    How do I put the RED text into variables and then can I turn those into a calendar entry in tasker?
    %LName = Doe
    %PurchasedItem = Room1
    %NumPart = 7
    %ResvDate=July 1, 2017
    %ResvTime=1:30PM

    So the the calendar entry would be:
    On %ResvDate and on %ResvTime (July 1, 2017 @ 1:30pm)
    %LName + "x" + %NumPart (Doe x 7)
    %PurchasedItem (Room1 as Location).


    I hope that makes sense. I dont know if I am asking for more than want AN and AQ can do for me.
    Thanks,
    Steve E.
     
  4. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    You could do it with an AutoTools Regex action, but the regex to get the info there could be a bit complex :)
    What I would do is split the text with the new line character using the Tasker Variable Split action and then get the info from each line. Let me know if you need help with that!
     

Share This Page