To download a PDF attachment from an email to the /tmp directory in a Pipedream workflow, you’ll need to use a combination of the Email trigger to start the workflow when a new email with an attachment is received, and custom Node.js code to download the attachment to the /tmp directory. Unfortunately, the Email app documentation provided does not include a direct example for downloading attachments from emails. However, I can guide you through a general approach using Node.js, assuming you have access to the email’s attachment URL. First, ensure your workflow is triggered by new emails. This might involve using a pre-built Email trigger in Pipedream that listens for new emails. Once the workflow is triggered by an email with an attachment, you can use a Node.js code step to download the attachment. Here’s a general example of how you might write the Node.js code to download a file (in this case, a PDF attachment) to the /tmp directory. This example assumes you have the URL of the PDF attachment: import { axios } from "@pipedream/platform" import fs from 'fs' import path from 'path' export default defineComponent({ async run({ steps, $ }) { // Assuming you have the URL of the PDF attachment const pdfUrl = "URL_OF_THE_PDF_ATTACHMENT_HERE"; // Specify the path in the /tmp directory to save the PDF const filePath = path.join('/tmp', 'attachment.pdf'); // Download the PDF and save it to the specified path const response = await axios($, { url: pdfUrl, responseType: 'stream', }); // Create a write stream to save the file const writer = fs.createWriteStream(filePath); // Pipe the response data to the file response.data.pipe(writer); return new Promise((resolve, reject) => { writer.on('finish', resolve); writer.on('error', reject); }); }, }); Please replace "URL_OF_THE_PDF_ATTACHMENT_HERE" with the actual URL of the PDF attachment. This code uses the axios library to make a GET request to the PDF URL, specifying responseType: 'stream' to handle the PDF content as a stream. It then writes this stream to a file in the /tmp directory using Node.js’s fs module. Remember, this is a general approach.