Tell Pipedream the code you want, we generate it for you.
Pipedream’s built-in actions are great for running common API operations without having to write code, but sometimes you need code-level control in a workflow. You can write this code yourself, or you can let Pipedream generate it for you with AI.This feature is new, and we welcome feedback. Please let us know what we can improve or add to make this more useful for you.
Access the feature either from within a Node.js code cell or from any app in the step selector.
A window should pop up and ask for your prompt. Write exactly what you want to do within that step. Be verbose and see our tips for getting the best results.
Bad: “Send a Slack message”
Good: “Send a Slack message in the following format: Hello, ${name}. Let me select the channel from a list of available options.”
Once you’re done, hit Enter or click Generate.Code will immediately start streaming to the editor. You can modify the prompt and re-generate the code if it doesn’t look right, or click Use this code to add it to your code cell and test it.Pipedream will automatically refresh the step to show connected accounts and any input fields (props) above the step.
Edit the code however you’d like. Once you’re done, test the code. You’ll see the option to provide a :+1: or :-1: on the code, which helps us learn what’s working and what’s not.
You can also edit existing code with AI. Click the Edit with AI button at the top-right of any Node.js code step. You’ll see the code gen window appear with the original code from your step. Enter a prompt to suggest an edit, and we’ll give you the modified code.
Generating code works best with clear, precise, and detailed instructions of what you want to do in your step. The code gen service understands the Pipedream component API and references the API docs of integrated apps. For example, you can tell it to include specific props (input) or async options, and reference specific API endpoints you want to use for the selected app.
Send a message to the #general channel that says, “This message was sent with AI-generate code!” Format it as a Slack block, with a header named, “Hello, world!”Output: