Deploy / Update Workflows via Git, API, CLI
I want to write and test workflows on my local machine, storing the workflow's code in my existing version control system.
I also want to programmatically deploy workflows using a CLI, for example using a command like pipedream deploy. This way, I can deploy workflows locally or as part of my CI/CD pipeline.
Related: #1139
We've launched the first version of the Pipedream CLI: https://docs.pipedream.com/cli/reference/
The CLI supports managing Event Sources for now (not yet workflows), so I updated the title of this ticket to reflect the need for managing workflows via CLI, and am keeping it open to track that request.
@dylburger Thank you! I am finding Pipedream really useful, Workflow management via CLI would be great. I'm pretty new to this service, but picking up the concept and how to get real utility out of it is not a chore. I'll DM you if I can.
Adding a comment from #857 here. When we support an API / CLI for deploying workflows, we plan to also let you serialize workflows to plaintext (e.g. JavaScript code with some config locally), which means you'd be able to store them in Git. That feature would enable the request below.
"For testing my workflow with a real case, I need to deploy my code, so everytime I test something I create a new version of the workflow. My workflow ends up with lots of versions. Most of them have bugs or are here for testing/debugging Sometimes I want to go back to a specific version but I can't remember which one it was, it can be 10 versions back or more, it's hard to identify versions and difference between them
Describe the solution you'd like Something closer to real code versioning, so more like git commits:
being able to add a comment to a version. This would be a "quick win", as I could just tag a revision that I know is working before creating more revisions, So I can easily come back to it even if I created many revisions after. Nice to have: being able to compare 2 versions of a workflow"
This would be very useful.
Would love to get this supported, this way we can migrate our processes from unstable Zapier zaps and Integromat scenarios to proper code solution with some tests.
Geetings. I'm a newby to Pipedream, but after several weeks of working with workflows between Dropbox and ClickUp etc., I've been able to accomplish a lot processing information from phone to the ClickUp app. However, as I have developed these routines, there have been instances where I have deleted a step... I know, I know, even though it warns me about the delete, I just needed it to get out of the way so I could try another option, and of course when I did... I lost the routine. I only had to do that once, and fortunately it wasn't filled with a lot of functions, etc. I've looked and asked about a utility that will allow me to save a step, maybe as an archive, so it suggested I follow this issue.
At this point, my only option is to cut and paste the code between the async(events, steps, auths) {...} and place them in a .js files defined as functions. Does anyone have a better method? Then, I can test the code, and if it works, cut and paste the new version back into my .js functions file. Thanks.
👍 for this, right now it's the only thing preventing my team from using your service!
@cakemountain I hear you and we are working on an early version of this now! We’ll be sharing details on that here. We’d love y’all and anyone else watching this issue to test the beta when it’s ready.
@dylburger love hearing it. Do you have an approximate release timeline for the beta?
I don’t, but I’ll let you know as soon as we have clarity on that.
@dylburger okay gotcha. if you're taking applicants for early access or beta testing we're highly motivated. Reach out to me on LinkedIn if you want to connect.
this is my local workflow for writing tests inside of VSCode and constantly redeploying changes to pipeDream:
one file, 4 shells:

essentially:
pd dev(watch for changes)pd logs(so i don’t need the web browser)- jest tests on my code
- a scratchpad for doing random stuff
community post: https://pipedream.com/community/t/developing-code-steps-in-a-workflow-locally/1489
+1
Would LOVE ❤️ this feature.
We manage code in a monorepo and storing workflows would be 👌 👌 👌
This would be great! Looking forward to hearing some updates, hopefully.
@sjn001tvh and anyone else that needs it, you can hit https://api.pipedream.com/v1/users/me/workflows (use the Authorization: Bearer ... header from the settings page) to download a JSON array of your workflows, including custom code in any components.
Interesting - so this would be a code view of a complete workflow then? And in theory, we will next have a way to push these back? (Well one at a time. ;) And I assume we will have an endpoint to get one workflow eventually?
It's not listed as an endpoint in their REST API docs. I also tried getting a workflow by ID without success. You may find that some POST/PUT requests work, but I wouldn't count on it in terms of creating/updating nested objects and such.
I just don't like the idea of building a complicated workflow that my users will depend on without having version control / backups. So this is better than nothing.
Oh - duh - I misread you as someone from PD. :)
@sjn001tvh and anyone else that needs it, you can hit https://api.pipedream.com/v1/users/me/workflows (use the
Authorization: Bearer ...header from the settings page) to download a JSON array of your workflows, including custom code in any components.
How would you paginate?