This topic was automatically generated from Slack. You can find the original thread here.
how do I temporarily pause a workflow?
This topic was automatically generated from Slack. You can find the original thread here.
how do I temporarily pause a workflow?
To temporarily pause a workflow in Pipedream, you can use the $.flow.suspend
method in Node.js or pd.flow.suspend
in Python. This will pause the workflow execution until it’s manually resumed or cancelled. Here’s an example in Node.js: export default defineComponent({ async run({ steps, $ }) { const urls = $.flow.suspend(); $.send.email({ subject: "Please approve this important workflow", text: `Click here to approve the workflow: ${urls.resume_url}, and cancel here: ${urls.cancel_url}` }); // Pipedream suspends your workflow at the end of this step }, });
And in Python: ```
def handler(pd: ‘pipedream’): urls = pd.flow.suspend() pd.send.email( subject=“Please approve this important workflow”, text=f"Click here to approve the workflow: {urls[‘resume_url’]}, and cancel here: {urls[‘cancel_url’]}" ) # Pipedream suspends your workflow at the end of the step
isn’t there a button I can toggle?