How to Convert EML to PDF and Extract Attachments as Separate PDF Files using PDF.co and 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.
We will use this sample Email with attachments in this tutorial.
Step 1: Create a New Scenario
- To begin. First, log into your Make account and click the Create a New Scenario button.
Step 2: Select PDF.co Module
- Next, select the PDF.co module and choose the Make an API Call.
Step 3: Setup PDF.co Configuration
Let’s set up the PDF.co configuration.
- For the API Endpoint Path dropdown box, let’s use the
/v1/pdf/convert/from/email
endpoint to convert Email to PDF. - For the Input Type dropdown box, select the Override ‘url’ param with value.
- In the URL dropdown box, input the direct URL of your source file EML.
- Under the Body, type
embedAttachments
for Key and set it tofalse
the Value so we can convert only the body of the input email.
After setting up the configuration, run the scenario to see the result.
Step 4: Run Scenario Result
- Great! The scenario runs successfully, kindly copy the URL and paste it into your browser to view the output.
Step 5: Generated PDF Output
- Here’s the generated PDF output from the Email.
Since we’re done converting Email to PDF. We will now add another module and extract Email attachments as separate PDF files.
Step 6: Add Another Module
- Let’s add another module and select PDF.co. Then, choose the Make an API Call module.
Step 7: Setup PDF.co
- For the API Endpoint Path dropdown box, type
/v1/email/extract-attachments
endpoint to extract email attachments. - For the Input Type dropdown box, select the Override ‘url’ param with value.
- In the URL dropdown box, input the link of the sample Email with attachments.
- Under the Body, for Item 1 type
inline
for the Key and set it totrue
the Value. - For Item 2, type
async
for the Key and set it tofalse
for the Value.
Once you are done setting up the configuration, re-run the scenario to see the result.
Step 8: Result
- Excellent! We successfully run the scenario, kindly copy the temporary URLs and paste them into your browser to view the output.
Step 9: Extracted PDF Files
- Here are the extracted PDF files from Email attachments.
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.