How to Save Files to the File Store?

To save files in Pipedream, you can use the /tmp directory, which is the only writable directory available in Pipedream workflows. Here’s an example of how you might write a file to the /tmp directory using Node.js: export default defineComponent({ async run({ steps, $ }) { const fs = require('fs'); const path = require('path'); // Define the path to the file in the /tmp directory const filePath = path.join('/tmp', 'your-filename.txt'); // Write data to the file fs.writeFileSync(filePath, 'Your file content here', 'utf8'); // Return the path to the file return filePath; }, }); In this example, replace 'your-filename.txt' with the desired file name and 'Your file content here' with the content you want to save to the file. This will write the file to the /tmp directory, and you can then use this file within your workflow or send it in an HTTP request.