Is There a Way to Create a Workflow Entirely Programmatically Without Using a Template?

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

Hi, am I understanding correctly that there is currently no way to create a workflow entirely programmatically (not from a template)? Am I missing something? I am simply trying to let my users create their own workflows from my own web app.

Yeah, it’s not possible right now. :disappointed:

We’d like to do the same for CI/CD purposes as well (creating & updating workflows based on changes to our various repos), but it is not supported atm. :cry:

So what we’re trying to do as much as possible is to instead create generic workflows which do different things based on the supplied parameters (think “all in one” kinda thing).

But that probably won’t work for your use case (unless the actions your users can do are fairly predefined).

can you tell me more about your use case? Are there specific functions, API, capabilities, etc that you want to surface? You should check out the components API and the embedded capabilities with our Connect product: https://pipedream.com/docs/connect/components

That lets you embed any of our prebuilt triggers and actions in your frontend so you can run them on behalf of your users.

It kinda sounds like Fabien is almost looking for a white label version of Pipedream, or probably a more simplified wrapper around Pipedream under the hood.

I am looking at the component api yes, it’s very unclear to me if that solves my use case or not, in particular can a component be setup to do something in the background? {more examples in the doc would be great :)) I am building agents that are completely defined by my users, so I need to programmatically fully set up any arbitrary “job”.

I am using the connect API already, that part is great

it looks like Components might be what I need, I would love more examples though :slightly_smiling_face: like a more real life examples of let’s say a component that gets triggered every time an email arrives and post a message on slack or something.

By the way I managed to create a component (I think? there’s now ay to see them in the UI?) and when I try to retrieve it with /v1/components/http-example I get a 200 but no data

It works when I use the id, but there seem to be no api to list my own components

Also I have a http prop in it:

configurable_props": [{“name”: “http”,
“type”: “$.interface.http”,

But how do I programatically retrieve the unique url?

can a component be setup to do something in the background?
Yea totally, that’s exactly the use case we see from a lot of our Connect customers. You can deploy a trigger which would emit an event to you anytime your user receives an email, and you could then run an action to post a message to Slack (going with your examples).

Here’s a demo app that shows off some of the implementation: Demo - Pipedream Connect

Ok thanks, sounds good. I still don’t understand how I connect the trigger to the action if I can’t create a workflow programatically?

You can either consume the emitted event in your own application’s code and execute the relevant action based on that event, which is ideal if you want to be able to dynamically pick the action that action that your customers select w/ your agent, or you could define static trigger + action combinations in a workflow, but you’d build that ahead of time in the UI.

Given you’re building an agent, I assume there are not predefined combinations of triggers and actions that you want to support?

Yeah neither options are really ideal for me, I’d like to be able to setup arbitrary workflow programmatically, is this something that’s on your roadmap by any chance? I really just need an API endpoint to create a workflow from scratch (although I’m sure it’s not that easy to implement :slightly_smiling_face: )

Basically if I have to execute code in my own app, at that point I might as well just do the whole thing on my side

The connect API is still useful to not have to implement the auth though