How to Download a File from an API and Upload It to Another API in a Pipedream Workflow Without Using 'tmp' Directory or File Store?

Does Pipedream ever plan to support returning files from steps? That seems much easier

Yeah exactly, code steps allow you to do whatever isn’t natively implemented yet.

Does Pipedream ever plan to support returning files from steps? That seems much easier
Most likely this would be done through saving the file to /tmp and returning the path of the file.

Like in this case:

What’s the app you’re downloading the file from?

I see :thinking_face: I’m downloading call recordings from RingCentral and trying to upload them to Google Drive

So you do have this Download Recording option:

I see this, but what about uploading it?

I also would like to download transcripts and faxes, which are not on this list :disappointed:

Not to be difficult, but Google Drive is only one of the many apps I’d like to upload files to. Some of the apps are CRMs and such, and not all have these options - this is why I avoided giving specific apps in my original question.

Is there a generic and straightforward way to access a file and send it in an HTTP request?

You can create a request for Pipedream to add transcripts & faxes here. They’re usually pretty quick.

Or is it just putting them in tmp via a node code block and then reading/uploading them the same way?

Also (sorry for the barrage of questions and thank you for your patience) Since I’ll be using end user auth, I may be downloading/uploading multiple files at once. Is the tmp local to each workflow run?

It is local to each worker, yes.

Even if you handle multiple requests/events in parallel, each request will have its own worker and its own /tmp folder.

Oh that’s great :star-struck:

BUT

A worker can be reused for a subsequent request.

So it’s important to clean up any leftovers in /tmp.

I see, so once I upload the file to the target app, I should delete it from tmp

Is there a generic and straightforward way to access a file and send it in an HTTP request?
No, since authentication will vary from one API to the next.

Or is it just putting them in tmp via a node code block and then reading/uploading them the same way?
If there are no pre-built actions, that is indeed the only way.

I’ll experiment with using the node code blocks to access and upload the files, then.

I do hope Pipedream adds support to easily access files from tmp when building requests in existing actions, sort of like how we can access request and step data via the step’s path - it would be a game changer I think!

Thank you very much for all your help and I hope you have a great weekend. :slightly_smiling_face: