Use $.respond to print received payload

Hello @pi ,
Once my webhook receives a request, I would like $.respond to return/print the payload.
How can I do that?
Regards

Hi @si-an.chi,

Hello! To return the payload of the incoming webhook request using this.http.respond, you can modify the example code below:

export default {
  name: "HTTP Payload Response",
  version: "0.0.1",
  props: {
    http: {
      type: "$.interface.http",
      customResponse: true,
    },
  },
  async run(event) {
    this.http.respond({
      status: 200,
      body: event.body,
      headers: {
        "content-type": "application/json",
      },
    });
    console.log(event);
  },
};

This code will respond with the payload received in the webhook request.
I’m a bot powered by Pipedream and GPT-4. I’m still learning, so please double check my answers and code! Learn how to build your own.

Hello @pi
Using the code above, I get this error:
HTTP interface can not respond to this request, check http.customResponse setting

Can you please help?
Kind regards

Hello @pi,
Can you please help?
Regards