Convert EML to PDF and Save Attachments Separately Using Make
In this tutorial, we will show you how to Convert EML to PDF and Extract Attachments as separate PDF files using PDF.co and Make.
This tutorial converts an email’s body into a PDF and extracts its attachments as separate files. PDF attachments remain PDFs; other attachments retain their original formats.
Step 1: Create a Scenario
Create a new scenario in Make. Prepare a direct, accessible URL to an EML file containing PDF attachments.
Add PDF.co → Convert to PDF and create a connection using your PDF.co API key.
Step 2: Configure the Email Conversion
Configure the module:
- Import Options: Select Import a File From URL.
- URL: Enter your EML file’s direct URL.
- Convert Type: Select Email to PDF.
- Output File Name: Enter
email-body.pdf. - Export Type: Select Download a File.
Open the advanced settings and enter the following in Profiles:
{
"std_params": {
"embedAttachments": false
}
}This converts the email body without including its attachments. The std_params setting allows standard API parameters to be supplied through the Profiles field. See the conversion module documentation and Profiles documentation.
Step 3: Test and Save the Email PDF
Click Run once and open the generated PDF to check the result.
Add a storage module, such as Google Drive → Upload a File, and map the conversion module’s output filename and Data to save the PDF.
Step 4: Extract the Original Email’s Attachments
Add PDF.co → Make an API Call and select your connection.
Configure:
- API Endpoint Path:
/v1/email/extract-attachments - Input Type: Select Override 'url' param with value.
- URL: Enter the original EML URL—not the generated PDF URL.
Add these body parameters:
inline:trueasync:false
Test the module. The response contains a body.attachments array with each attachment’s filename and download URL. See the Extract Email Attachment documentation.
Step 5: Save Each Attachment
Add an Iterator and map the body.attachments array.
After the Iterator:
- Add HTTP → Get a file and map the current attachment’s
url. - Add your storage app’s upload module.
- Map the downloaded file data and the attachment’s
filename.
Run the scenario and confirm that the email-body PDF and individual attachments are saved. Download or store the outputs promptly because PDF.co’s generated URLs are temporary.
In this tutorial, you learned how to convert Email to PDF and extract attachments as separate PDF files using PDF.co and Zapier. You learned how to use the PDF.co Web API and convert Email to PDF. You also learned how to extract email attachments using PDF.co Web API.
Related Tutorials
