Can I Retrieve All Gmail Emails from a Thread ID and Run a Node.js Script Using PD Connect?

This topic was automatically generated from Slack. You can find the original thread here.

Hi!
• Is there an action to retrieve all Gmail emails in a given Thread ID? I could not find it
• Is it possible to run a Node.js script using PD Connect? I am exploring if I can manually call Gmail API if the above is not possible

You can always run custom code with Connect via the Connect Proxy: Connect API Proxy — Pipedream

Would that work?

Yes, I ended up doing that and it worked well! Thanks.
But is there actually possibility to run Node.js code as well? Not just for api calls, but for building custom logic etc

We’re working on letting you publish custom tools now. Is there a DX that you’d most like to see? What would that look like?

I just want to send JS code to PD so it returns output. Use case could be, some util code to manipulate string etc. PD will run that script in Sandbox and return the result

In that model, are you using any connected accounts / making authenticated requests? Or it sounds like you’re literally just using Pipedream as a serverless execution environment?

Not necessarily. Yes, pretty much Serverless over PD Api. Would be cool to have this as I am planing to add code execution to my product and if PD had it that would save me time

And are you trying to write code on the fly and execute it via Pipedream, or would you want to publish specific tools that you can later call via Connect?

I will probably store codes on my side or generate on the fly. Just need execution environment to run that code

We’re working on adding support to let you publish custom Pipedream actions as tools that you can use via Connect now, so it’d be a slightly different DX to what you’re describing, would that work for you?