This topic was automatically generated from Slack. You can find the original thread here.
Hellos! I’m learning how to use Pipedream and could use some help.
Is there a way for me to add values as part of the flow and then use those values dynamically later in the flow? This way, I don’t have a trigger, but I’d just add the values at the top and run the flow manually and it does what I need. Let me know. Thanks!
Hellos! I’m learning how to use Pipedream and could use some help.
Is there a way for me to add values as part of the flow and then use those values dynamically later in the flow? This way, I don’t have a trigger, but I’d just add the values at the top and run the flow manually and it does what I need. Let me know. Thanks!
Yes, you can add values as part of your flow and use them later in the flow. You can use the “Manual” trigger to run the flow manually. To add values, you can create a code step and define the values you want to use. Then, you can reference these values in subsequent steps of your flow. Here’s an example: 1. Create a new workflow with a “Manual” trigger. 2. Add a “Code” step and define your values like this: export default defineComponent({ async run({ steps, $ }) { const value1 = "example value 1"; const value2 = "example value 2"; return { value1, value2 }; }, }); 3. In the next steps of your flow, you can access these values using steps.<code_step_name>.return_value.value1 and steps.<code_step_name>.return_value.value2, where <code_step_name> is the name you assigned to the code step in step 2. Remember to replace <code_step_name> with the actual name of your code step.
It could be nice to have something like that as an actual trigger, so that we can run a workflow manually with different values, directly from the Pipedream UI (without having to edit the workflow each time in order to update those values).
Totally — that’s definitely been an ask! Depending on the use case, you might be able to create a form that you link to your workflow as a trigger, but we’ve discussed productizing the real use case in the past.
For us it’s mostly to run pipelines. Typically, those pipelines run with default values (yesterday, or last hour, etc.).
But sometimes, for various reasons, we may need to run them with a value that’s different than the default (two days ago, or last week, or even all historical)
So we just need a simple way to manually specify those values when we need to.
For me the use case is that I can’t deploy this yet because the full workflow can’t be automated yet. So I need a way to put those field manually. IF I have a table where I can put key/values, that makes it easier than inserting these values in an XML every time.