Is It Possible to Prompt User Input in a Manual Pipedream Workflow Similar to 'readline' in Node.js or 'prompt' in Browser?

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

Do you know if it is possible to prompt the user to enter information when running a Pipedream workflow manually on the UI? example, if I was running a node.js code on my terminal I could prompt users with the “readline” package, or on the browser using the “prompt” function. do you know if this could be possible on a Pipedream workflow?

In Pipedream, you cannot directly prompt users to enter information during the execution of a workflow in the same way you might use the “readline” package in Node.js or the “prompt” function in a browser. Pipedream workflows are designed to run automatically in response to triggers, and they don’t support interactive user input during execution. However, you can achieve similar functionality by using Pipedream’s UI to configure workflow inputs before execution. You can define props in your workflow steps, which allow users to input data when setting up the workflow. Here’s an example of how you might define a prop in a Pipedream component: export default defineComponent({ props: { userInput: { type: "string", label: "User Input", description: "Enter the information you want to process", }, }, async run({ steps, $ }) { const input = this.userInput; // Use the input in your workflow logic console.log(`User input: ${input}`); }, }); In this example, userInput is a prop that the user can fill in when configuring the workflow. This allows you to capture user input before the workflow runs. If you need more interactive input, you might consider integrating with a form service or another app that can collect user input and trigger the workflow with that data.

Yeah

You could prompt from outside of Pipedream after using $.flow.rerun, and then send the data to the resume URL.

When the external service calls back into the resume_url, you have access to the callback data within $.context.run.callback_request

That’s pretty easy to do within Slack workflows, which allow you to easily “build a UI” to collect information prompted to users.

So something like:
• Run Pipedream workflow, which calls a Slack workflow URL.
• Slack workflow prompts user to enter information (this would probably be a “send message to user” action, with a button for them to click which opens a modal to enter the info).
• Slack workflow send the information back to Pipedream when calling the resume_url.
• Done.

And if the users are not on Slack, then… :man-shrugging:

You could throw something together using Google Forms (or some other alternative), and figure out some way to link the form submission back to the workflow execution/resume_url.

Wowww, thank you for the input . I bet that is implememtable in Pipedream workflows, in my specific use case, I hid that in my stack a Pipedream workflow empowers a form, where I only can enter a test request into a html form, which then translate to axios request where I can incrementally edit code based on what was entered. Following your advice I’d have to talk to Pipedream how if they wanted to like externally delegate the user prompting ~to Slack~ anywhere.I appreciate you coming up with such a creative solution!