Free plan
E-mail to JSON
Read an e-mail file: sender, subject, text and attachments
About this tool
This tool opens a saved e-mail file (.eml, or .msg from Outlook) and shows what is in it: who sent it and to whom, the subject, the dates, the message text, the links, and the names of the attachments. It does not send e-mail or open attachments. You can choose to include the original page code and all technical headers.
For example, you saved an old e-mail and want its text and the list of attachments without opening your mail program.
How to use it
- Choose this tool.
- Add your .eml or .msg file with Upload or drag and drop.
- Choose what to include, such as the text, the links or the full headers.
- Press Generate.
- Read the result on screen or copy it.
What you get back
You get the details of the e-mail as a structured list on screen. You can copy it or download it.
GOOD TO KNOW
No result file: the answer is data. Nothing in the message is fetched or run and attachments are only listed. Counts as one document.
TEST IT LIVE
Try E-mail to JSON in the Studio
One click opens the Studio with this tool already selected. Add your file and see the result in seconds.
Family
Documents
Plan
Free
Method
POST
Endpoint
/v1/documents/email
Tool ID
documents.email
Authentication
API key
Accepts
Text and settings
Background jobs
Yes
Usage group
Documents
For developers
Use it from your code
cURL
curl -X POST "https://app.h2i.davixlabs.io/v1/documents/email" \
-H "X-Api-Key: $DAVIX_H2I_API_KEY" \
-F 'file=@document.pdf' \
-F 'include_text=true' \
-F 'include_html=false' \
-F 'max_text_chars=0'Node.js
const { DavixH2I } = require('@davixlabs/h2i-sdk');
const h2i = new DavixH2I({ apiKey: process.env.DAVIX_H2I_API_KEY, baseUrl: process.env.DAVIX_H2I_URL });
const result = await h2i.documents.email({
"file": 'document.pdf',
"include_text": true,
"include_html": false,
"max_text_chars": 0
});
console.log(result.data, result.requestId);PHP
<?php
require 'vendor/autoload.php';
$h2i = new \Davix\H2I\Client(['apiKey' => getenv('DAVIX_H2I_API_KEY'), 'baseUrl' => getenv('DAVIX_H2I_URL')]);
$result = $h2i->documents()->email([
'file' => 'document.pdf',
'include_text' => true,
'include_html' => false,
'max_text_chars' => 0,
]);
echo $result->requestId;More in Documents
