Workflow to send email with a Saved search CSV file attached - workflow

I am just wondering if Netsuite workflow allows us to send an email with a CSV file of a Saved search attached, for example:
We want:
State 1: send an email at a scheduled time using a transactional
saved search as a condition, but instead of attaching a PDF file or
inline text, we would prefer to have a CSV file of all of that saved
search result
State 2: after email is sent, update a custom field
Looking forward to your advices

Related

LabDaq - sending attachment

I would like to attach a PDF file as the "result" for a LabDaq test and have it sent out through all the HL7 interfaces. The PDF file is not generated by LabDaq but rather added as an attachment. We see a way to select to have all attachments forwarded. However, we don't want to make a universal change for all attachments but rather a specific change for select attachments. For reference, the attachments are reference lab results.
You'll need to use the Mirth (Nextgen) Connect's Attachment Handler.
There's an overview on how to use it on the User Guide or on this blog post https://kailo.tech/health-it/mirth-connect-bits/mirth-connect-attachment-handler/
The blog post should explain how you can read a file and use the base64 string on an HL7 message.

Zapier: from spreadsheet to Facebook Offline events tracking

I've got a database containing offline conversions (email, phone, name, purchase_amount, etc). I can export this database in .csv or .xls and I can also email this file on a daily basis to a Gmail account.
As Zapier has a Google Sheet to "Facebook offline event" API, I tried this workflow with Zapier.com:
Export my database in .xls: OK
Mail it to my Gmail account as an email attachment: OK
Grab the attachment and upload file to Google Drive using Zapier: OK
This is the part where I'm in trouble: I want to copy the content of the .xls file that is on Google Drive to a new Google Sheet. I can't figure out how to do this in Zapier.
Finally, on every new spreadsheet created or new row added (depending on how I configure the Zap) , pushing the data to Facebook API.
I'm not a developer so I want to avoid coding if possible. I tought I could easily do it with zapier but it seems that working with data inside a file is not so easy.
Any help would be much appreciated.
Thank you,
Best regards,
Tim.
If it were me I would look into the scripting capabilities of Google Sheets to try and achieve this, having your code execute from a single place eliminates other possible points of failure. That said, I have put together a somewhat hacky, code free solution that should set you up to do what you are looking to achieve. I break it down step by step below:
Step 1: Export database as .csv file. I could only get this to work with .csv files and not .xlsx files. There may be the ability to do so but it would require further trial and error.
Step 2: Mail it to your Gmail account where I assume there is a Zap which triggers to upload the attachment to your drive account automatically.
Step 3: Setup a second Zap that is connected to your Gmail account
that triggers when you receive an email with an attachment.
Step 4: Isolate the attachment file from the results of the triggered Zap and use it as input for the following formatter action step.
Step 5: Setup your formatter action step using the text option. Within the formatter template select trim white space and use the attachment, isolated from the trigger step, as its input. See example photo here.
Step 6: Setup your final step which is the create Google Sheet function of the Google Sheets Zap. Enter a title for your new sheet, it will probably need to be a unique value I used the attachment ID from step one as my title but you can set it to whatever you would like. In the headers section type =IMPORTDATA("") . Between the two quotation marks place the output of the previous formatter step and then run the Zap. See example photo here.
Explanation: When Zapier catches the attachment file from your inbound email it seems to be stored as raw data. Given this we cannot simply dump this information into a spreadsheet as it would be unreadable. However it seems Zapier has a method for converting this raw data through the endpoint https://zapier.com/engine/hydrate. When we input the raw attachment data into the formatter step Zapier provides a link pointing to the URL for converting the data into its original format. We take this URL and using the Google worksheet function IMPORTDATA() we are able to import the file using Zapier's file conversion engine. Now that the data is in your new sheet you can set up an additional Zap to do something with it. Also note that the Zap to upload the attachment to your Google Drive is not necessary with this setup. That said if you are looking to keep backups of your data then keep it on otherwise you may have the opportunity to save yourself some zaps.
Hope this helps!
Many thanks for your awesome reply. I also tried the "trim whitespace" to get the data back. I only missed the "importdata" function which is super powerful. Indeed it only works with .csv. With .xls file, importdata gives the source code of xls file which is useless.
I ended with 2 zaps:
Grab Gmail attachment, upload to Google Drive (for backup & monitoring) and create new spreadsheet
Send Facebook offline conversion when new spreadsheet is added (filter: only continue when file name is xxxx), lookup spreadsheet row (I took one column that has the same value for each row) and finaly I could match my columns with the Facebook API.

Extract Email Address from Nested Tables in HTML Emails

I will be receiving approx 500 emails over the next day or so. The emails are all identical in layout i.e. HTML emails that display information inside a table. There are nested tables within the email.
I need to extract the email address from each email and store it in a file (text/csv). Rather than "copy & paste", is there a php script or some browser plugin I can use to do this?
GF
I will use php parse by id,class or name and a little script to go throw all the pages inside that folder to extract it as a csv I'll use fputcsv.
Hope it helped.

How to automatically save emails to ascii files?

I have a data stream that will be sent as daily emails containing temperature and wind speed from a measurement site. I would like to to automatically filter out these emails from the other emails I receive, then save the email body content to its own text file. Each text file must have a distinct file name; for example it could include the time that the email was sent or received. All files must all end up in a chosen directory. And ideally the process would be robust enough that it could run unattended for weeks. Our email system is Outlook but I could choose to send the email to my gmail account, for example. What is the big picture of how to do this?
Bigger picture: create a VBA script that runs on the Items_ItemAdd event, which fires whenever an email arrives.
Specifics: Use the solution on this page, but in the Items_ItemAdd routine change the olSaveAsMsg to olSaveAsTxt to get the text format you want.
Note that the file name format in the example should match what you need, but you'll need to add criteria to the Items_ItemAdd routine to check that the message is one that you want to save. For example, you could read the Item.Subject property.
it means you are working with exchange, i suggest to use imap protocol to read the mails, and you will be able to save the body.

File uploading and email in JSP

I need to make a simple page in JSP. I've never worked in JSP before ever.
I have a form that has two fields: one is a file upload field and the other is a textbox. The user enters one email address in the field and uploads a file and upon submission. I should be able to email the attachment to the email address entered.
I need a quick code snippet that does this.
try to see this code, might need some debugging though :)
or this one from here (through the JavaMail API):
SmtpSender smtp=SmtpSender.getInstance();
MailToBeSent send=new MailToBeSent();
send.setSubject("Hello");
send.setFromAddress("some#bar.com","Someone");
send.addToAddress("another#foo.com","Anotherone");
send.setBody("Hello, test with the file attachment!");
byte[] bin=.....
send.attacheFile(bin,"photo.jpg","image/jpeg");
smtp.sendMail(send);