How to Get a Resume Link on Slack After a 3 Hour Delay?

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

I have an delay on 3 hours but I need the resume link on slack → So I quickly can accept if needed.

How to? :raised_hands:

show me how to get the resume_url for a $.flow.delay execution and send it to Slack

To get the resume_url for a $.flow.delay execution and send it to Slack, you can use the following Pipedream component code: import { axios } from "@pipedream/platform"; export default defineComponent({ props: { slackWebhookUrl: { type: "string", label: "Slack Webhook URL", }, }, async run({ $ }) { const { resume_url } = $.flow.delay(3 ** 60 ** 60 * 1000); // 3-hour delay // Send the resume_url to Slack using a webhook await axios(this, { method: "POST", url: this.slackWebhookUrl, data: { text: `Resume the workflow early by clicking this link: ${resume_url}`, }, }); }, }); Replace slackWebhookUrl with your Slack webhook URL. This code will delay the workflow for 3 hours and send the resume_url to Slack, allowing you to resume the workflow early if needed.

See another example here: https://pipedream.com/docs/code/nodejs/delay/#cancel-url-and-resume-url