How Can I Assign a Name/Description to Webhook Calls Using an ID from the Body?

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

How do I give a name/description to webhook calls. I’ll like to see an Id from the body or something

image.png

To add a name or description to webhook calls in Pipedream, you can use the $.send.http function in a code step. You can extract an ID from the webhook payload and include it in the description. Here’s an example: export default defineComponent({ async run({ steps, $ }) { const webhookPayload = steps.trigger.event; const id = webhookPayload.id; // Assuming the webhook payload contains an "id" field // Send the webhook with a custom name and description await $.send.http({ method: "POST", url: "https://example.com/webhook", data: webhookPayload, name: `Webhook Call - ID: ${id}`, description: `This webhook call contains the ID: ${id}`, }); }, }); In this example, replace https://example.com/webhook with the actual webhook URL you want to send the request to. The name and description fields will be displayed in the Pipedream execution logs for this step.

: Just discovered the answer for this!

All you need to do is add whatever you want at the end of the workflow URL: await fetch('https://eoq2cwv9wejwu84.m.pipedream.net/test/wow');

image.png

And ignore the code from , it’s garbage (it doesn’t even work).

I apologize if the previous code example was not helpful. If you could provide more details about your use case or any specific issues you encountered, I’d be happy to help you further.