Order confirmation email to Google sheet

I am creating a screnario Where Whenever I receive a confirmation email for an online purchase, automatically add the details (amount, date, vendor) to a Google Sheet for expense tracking.

There are 4 things in email body that I want to move in google sheet. Please see the screenshot and let me know how can i acheive this?

use free AI. Groq is free. Feed it the email and ask for specific values to return. Ask to return a collection of kay and values of the following from the email Keys: items(s) , Total, Estimated Delivery, Vendor and the values are what comes after the : for each key.

Here is how to do it with just 4 modules

note- this process can become bit complicated for different scenario here i tries to do it with a polling trigger and whatever i have done here is just on the basic level this only works if the mail has only one bullet list under the order summary

first we need to set up our gmail account which we would be using for extraction of order summary

then we extract the email subject as HTML

by using set variable module

output module:

after that we separate the items of the order summary i.e order,cost, estimated delivery and vendor using another set variable module

variable value: -
{{slice(split(replace(replace(27.HTML Content; “

  • ”; “$%^”); “
  • ”; “$%^”); “$%^”); 1; 5)}}

    output below
    image

    now we map it to google sheet by splitting the values

    output

    you can see it didn’t convert the &amp to & from html but you can do it while mapping it to the fields of the xl sheet

    hope this helps if you have some other idea in mind then feel free to share

    1 Like

    Thank you @abhilash_naik

    I have a quick question. I just want to know how did you do this.

    • ”; “$%^”); “
      ”; “$%^”); “$%^”); 1; 5)}}

    because we wanted to replace it with some value by which we can later split it but as we see in the html tags there are values liek - ; \ already being used i used $%^ together you can use any value you like which is not present in the html so that you can separate it using split function

    any why is used 1 and 5 is because if the format of the order summary is same always then
    i know that when i split the html it will be like

    1 some html tag
    2Order
    3Cost
    4ETA
    5Vendor
    6some html tag