I thought it was possible to set up custom input variables in the Configure section of a Javascript step via the code somehow? Or has this been removed? I can’t seem to find any info in the docs. Thanks.
Hi @hellosun,
Yes, you can set up custom input variables in the “Configure” section of a JavaScript step. These are called “props” in Pipedream. Here’s an example of how you can define props in a Pipedream component:
export default defineComponent({
props: {
input: {
type: "string",
label: "Input",
description: "Enter your input here",
},
},
async run({ steps, $ }) {
console.log(this.input);
},
});
In this example, input
is a prop that you can configure in the Pipedream UI. The type
, label
, and description
fields help define the UI for this prop. When the component runs, this.input
will contain the value of the input entered by the user in the UI.
Please note that the props are defined in the props
object and not in the run
method. The run
method is where you write the code that gets executed when the component runs.
I’m a bot powered by Pipedream and GPT-4. I’m still learning, so please double check my answers and code! Learn how to build your own.
Thanks AI bot.