email parsing automation

Email Parser

Extract data from emails and automate your workflow

The forum is now read only. Please, go to the the main Email Parser website if you need help.
Post here if you experience problems or get unexpected errors.
I saw another thread with the similar issue: and their fix was updating to version 4.8, which I already have.

What is happening is that the e-mail contains two lines of data, but only the LAST line
ends up in SQL.
here's the log of activity on this:

I saw another thread with the similar issue: and their fix was updating to version 4.8, which I already have.

What is happening is that the e-mail contains two lines of data, but only the LAST line
ends up in SQL.
here's the log of activity on this:

The email contains the following fields:

From "rich gouette" <richgouette@gmail.com>
To nicholsitems@gmail.com
CC empty
BCC empty
Subject Orca Scan: 2 barcodes from iPhone
Body Barcode Name Quantity Description Type DateBAG 3565A|2|10 ......
Body_HTML <html><head><meta http-equiv="content-type" content="text/h ......
DateTimeSent 2018/08/02 10:44:53
DateTimeReceived 2018/08/02 10:45:05
RawHeader Delivered-To: nicholsitems@gmail.comReceived: by 2002:a17 ......
DateTimeProcessed 2018/08/02 10:45:06

Reading attached file nicholsbarcodes.csv

AttachmentsContent ---------- nicholsbarcodes.csv:Barcode,Name,Quantity,Desc ......


········ Running filter only emails from to nicholsitems@gmail.com

The 'To' field of the email contains "nicholsitems@gmail.com"

Filter passed


········ Running parser Parse Attachment

The parser produced the following results:

itemID BAG 3565A
TPS 71002110C
reorderqty 2
1
customerID 100321
100321
taker CHP
CHP


········ Running action save attachments


Filtering attachments:

The attachment nicholsbarcodes.csv matches the attachment filter


Saving attachments:

Attachment saved to \\it-app01\vmi_imports\nicholsbarcodes.csv


The following fields will be available for the next automated processes:

Attachment \\it-app01\vmi_imports\nicholsbarcodes.csv


········ Running action for each attachment

Found 1 value for Attachment







Set 1 of 1

Attachment \\it-app01\vmi_imports\nicholsbarcodes.csv


········ Running action Create a new file name


The following new fields will be available for the next actions:

new_filename 20180802 104453 - nicholsbarcodes.csv


········ Running action rename attachment

Running rename "\\it-app01\vmi_imports\nicholsbarcodes.csv" "20180802 104453 - nicholsbarcodes.csv"


········ Running action archive email

Done







········ Running action saveToSQL

Connecting to SQL server

Connected

Running SQL sentence:

INSERT_INTO:
(itemID,quantity,order_level,customerID,customer_name,shiptoID,min,max)
VALUES('TPS 71002110C','1','0','100321','MYCUSTOMERNAME','MYSHIPTOID','0','10')

1 row affected
[/quote]


a pic of my parser flow is attached..

Thanks,
Rich
Attachments
Capture.PNG
Capture.PNG (23.79KiB)Viewed 622 times
Hi,

If you want to add two rows to the SQL database you need to run two times the SQL sentence. "INSERT INTO..." For this you need to use the same concept as the attachments but instead of "for each attachment" you have to do a "for each itemID, reorderqty .. etc". See the screenshot below
Attachments
one_sql_for_each_set_in_email.jpg
one_sql_for_each_set_in_email.jpg (110.14KiB)Viewed 620 times