How to Proceed with Sending a Webhook Message in a New Workflow?

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

Hey.
I am new.
I am trying to create a workflow.
I succeeded to connect an SMS to an alternate email but I don’t know how to continue from here.
I have a url to send a webhook message to.
This is the address: https://tvwebhook.capitalise.ai
This is the webhook message: {“alertId”: “d3bb481b-7bd4-4a15-bd0c-15dfc371ef8a”}

I don’t know what the next step is to do :frowning:
I don’t know what to choose after the + and what I should set.
That’s all I need to just send this message to this address.

this is my workflow: Sign Up - Pipedream

can you help?

It seems like your question is incomplete. Could you please provide more details or specify what assistance you need with Pipedream?

Hey.
I am new.
I am trying to create a workflow.
I succeeded to connect an SMS to an alternate email but I don’t know how to continue from here.
I have a url to send a webhook message to.
This is the address: https://tvwebhook.capitalise.ai
This is the webhook message: {“alertId”: “d3bb481b-7bd4-4a15-bd0c-15dfc371ef8a”}

I don’t know what the next step is to do :frowning:
I don’t know what to choose after the + and what I should set.
That’s all I need to just send this message to this address.

this is my workflow: Sign Up - Pipedream

It sounds like you’re looking to send a webhook message to a specific URL as part of your workflow. Since you’ve already connected an SMS to an alternate email, the next step is to add an action that sends a POST request to your specified URL with the webhook message. Here’s how you can do that using a custom code step in Pipedream: 1. Click the “+” button in your workflow to add a new step. 2. Choose the “Run Node.js code” option. 3. In the code editor that appears, you can use the following Node.js code snippet: import { axios } from "@pipedream/platform" export default defineComponent({ async run({ steps, $ }) { const url = "https://tvwebhook.capitalise.ai"; const data = { "alertId": "d3bb481b-7bd4-4a15-bd0c-15dfc371ef8a" }; return await axios($, { method: "post", url, data, }) }, }) This code sends a POST request to https://tvwebhook.capitalise.ai with the JSON payload {"alertId": "d3bb481b-7bd4-4a15-bd0c-15dfc371ef8a"}. 4. After adding this code, click “DEPLOY” to save your changes and activate the workflow. Now, whenever your workflow is triggered, it will send the webhook message to the specified URL as part of its execution. If you encounter any issues or have further questions, feel free to visit Support - Pipedream for more support options.

Hi, thank you for your comment.
I tried the code you provided and it gives me an error message:
TIMEOUT: TIMEOUT
at Timeout._onTimeout (file:///var/task/lambda_handler.mjs:934:23)
at listOnTimeout (node:internal/timers:573:17)
at process.processTimers (node:internal/timers:514:7)

try tagging Pi with @ and add your message for it to continue the conversation

It looks like you’re encountering a Timeout error with your code. This typically happens when your code exceeds the default time limit set for executions in Pipedream. Here are a couple of steps you can take to address this issue: 1. Investigate the cause of the long execution time: The timeout error is specific to your workflow. It might be due to a request to a third-party API that’s taking longer than expected, or perhaps your workflow is processing a large amount of data. Review your code to identify any such bottlenecks. 2. Adjust the execution time limit: If the long execution time is expected due to the nature of your workflow, you might need to increase the execution time limit. You can do this in your workflow’s settings. If you need to adjust the execution limit for an event source, please reach out for support at Support - Pipedream. Additionally, ensure that you’re properly handling asynchronous operations in your code. Make sure all Promises are awaited, or callback functions are promisified. This can help prevent issues where your code is still trying to run past the execution limit. For more guidance on handling asynchronous code in Node.js on Pipedream, you can refer to the documentation on running asynchronous code. If you continue to face issues or need further assistance, don’t hesitate to reach out for support at Support - Pipedream.

I need you to explain step by step how I increase the execution time limit

To increase the execution time limit of your Pipedream workflow, follow these steps: 1. Navigate to the Pipedream dashboard and select the workflow for which you want to increase the execution time limit. 2. Inside the workflow view, locate the Settings option. This can typically be found in the top right corner or in a menu associated with your workflow. 3. In the Settings menu, look for a section or option labeled Execution Timeout Limit or similar. This is where you can adjust the time limit for your workflow’s execution. 4. Adjust the execution timeout limit according to your needs. Note that there is a maximum time per execution limit that varies depending on your subscription tier: - For Free tiers, the maximum is 300 seconds (5 minutes). - For Paid tiers, the maximum is 750 seconds (12.5 minutes). 5. After setting the desired execution time limit, save your changes. Remember, increasing the execution time limit allows your workflow more time to complete its tasks, but it’s also important to understand why your workflow may be exceeding its current limit. It could be due to long-running operations, such as requests to third-party APIs that do not respond quickly, or processing a large amount of data. If you’re consistently hitting the execution limit, consider optimizing your workflow or breaking it into smaller, more manageable parts. For more detailed instructions and information on execution limits, please refer to the Pipedream documentation on workflow settings and execution limits.

It still doesn’t work even in the biggest time frame you can put

It seems like you’re experiencing an issue, but I need a bit more information to provide you with the best possible assistance. Could you please clarify what specific task or operation you’re trying to accomplish, especially if it’s related to using Frame.io with Pipedream? This will help me understand the context and offer a more targeted solution.

at Function.AxiosError.from (/tmp/__pdg__/dist/code/f34840375e921854ee389f939ddf38ddbec6168ee059d5302575a8c6b8d0dbbe/node_modules/.pnpm/axios@1.6.7/node_modules/axios/dist/node/axios.cjs:837:14)
    at RedirectableRequest.handleRequestError (/tmp/__pdg__/dist/code/f34840375e921854ee389f939ddf38ddbec6168ee059d5302575a8c6b8d0dbbe/node_modules/.pnpm/axios@1.6.7/node_modules/axios/dist/node/axios.cjs:3087:25)
    at RedirectableRequest.emit (node:events:518:28)
    at ClientRequest.eventHandlers.<computed> (/tmp/__pdg__/dist/code/f34840375e921854ee389f939ddf38ddbec6168ee059d5302575a8c6b8d0dbbe/node_modules/.pnpm/follow-redirects@1.15.5/node_modules/follow-redirects/index.js:38:24)
    at ClientRequest.emit (node:events:518:28)
    at TLSSocket.socketErrorListener (node:_http_client:495:9)
    at TLSSocket.emit (node:events:518:28)
    at null.emitErrorNT (node:internal/streams/destroy:169:8)
    at null.emitErrorCloseNT (node:internal/streams/destroy:128:3)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)

    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at null.callAxios (/tmp/__pdg__/dist/code/f34840375e921854ee389f939ddf38ddbec6168ee059d5302575a8c6b8d0dbbe/node_modules/.pnpm/@pipedream+platform@1.6.0/node_modules/@pipedream/platform/dist/axios.js:110:26)
    at Object.run (file:///tmp/__pdg__/dist/code/f34840375e921854ee389f939ddf38ddbec6168ee059d5302575a8c6b8d0dbbe/component.mjs:10:12)
    at null.executeComponent (/var/task/launch_worker.js:294:22)
    at MessagePort.messageHandler (/var/task/launch_worker.js:791:28)

It appears you’re encountering an error when making an HTTP request using Axios within a Pipedream component. This error typically occurs when the request fails due to issues like network errors, incorrect URLs, or server errors (4XX or 5XX status codes). To address this issue, consider the following steps: 1. Verify the URL and HTTP Method: Ensure that the URL you’re trying to access is correct and that you’re using the appropriate HTTP method (GET, POST, etc.). 2. Check API Documentation: If you’re making a request to an external API, review the API documentation to ensure you’re following the required request format, including necessary headers, parameters, and authentication. 3. Review Error Handling: Use the @pipedream/platform Axios for improved error handling. This customized Axios version provides detailed error messages, making it easier to debug issues. Here’s how to use it: ```
import { axios } from “@pipedream/platform”; export default defineComponent({ props: { function: { type: “app”, app: “function”, }, }, async run({ steps, $ }) { try { return await axios($, { url: https://api.fxn.ai/user, headers: { Authorization: Bearer ${this.function.$auth.api_key}, }, }); } catch (error) { // Log the error for debugging console.log(error); // Optionally, handle the error based on its type or status code throw error; // Rethrow the error if you want the workflow to stop here } }, });