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.
Need help configuring the program? Have any questions regarding its use?
1. Amazing Product, and Support ty

2. I’m Having difficulty with the HTTP POST request to send 1 or more .pdf files to an API endpoint, after successful Parsing then save and rename.

• The First request sends the parsed strings as JSON ob, to API and returns “200 Success”.
• The 2nd POST attempts to “/addFile/“, and returns 500. ( it’s well documented API and server is capable ).
• My Headers also have the “Content-type”: “application/pdf” as docs suggest.

Any suggestions or any additional documentation on the HTTP Req in the actions section?
Hi Hugh,

Thanks ;)

Unfortunately the HTTP request action in Email Parser does not support file uploading. It only works with text (field values), not the contents of a file.

However, you can use script action in C# that calls the method WebClient.UploadFile() to upload the file. I have written this but I am not sure if it works as I do not have a web server for testing. I hope that, at least, it helps.

using System;
using System.Text;
using System.IO;
using System.Net.Mail;
using System.Collections.Specialized;
using EmailParserBackend.ScriptingInterface;

public class MyAction : ScriptBasedAction
{
public override bool Run(MailMessage email, NameValueCollection fields)
{
string file_path = fields["SavedAttachmentPath"];
System.Net.WebClient my_web_client = new System.Net.WebClient();
my_web_client.UploadFile("https://www.hugh-server.com/addFile/",file_path);
return (true);
}
}
Attachments
uploading_file_to_web_server.jpg
There’s no where on the web you can get the creater/developer to hand write a solution, In under 12hrs.

Outstanding.

Thank you again, Sr. Andrés

-HB
update:

putting this one together finally... C# is tricky to learn!

Will update again when I have a working version.

This software is still a daily lifesaver. Thank you
You are welcome ;)