# change body on webhook post method

**URL:** <https://community.hubspot.com/t/change-body-on-webhook-post-method/56964>\
**Category:** APIs & Integrations\
**Created:** [May 13, 2022, 9:13pm UTC](https://community.hubspot.com/t/change-body-on-webhook-post-method/56964 "2022-05-13T21:13:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rechavar](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/rechavar/32/194703_2.png) [@rechavar](https://community.hubspot.com/u/rechavar)\
**Post date:** [May 13, 2022, 9:13pm UTC](https://community.hubspot.com/t/change-body-on-webhook-post-method/56964/1 "2022-05-13T21:13:54Z")

</div>

Hey everybody!

This time Im needing a way to change te body request in a post method using workflow weebhook. need to use some properties to build the request boddy and place them in specific named variables.

“chatPlatform”: “whatsapp”,

“chatChannelNumber”: “your\_phone”,

etc…

Is this possible, been reading for a while a everybody says no and im a quit fear tho hehe

Have a great weekend!!

---

<div class="post-metadata">

**Author:** ![Teun](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/teun/32/28739_2.png) [@Teun](https://community.hubspot.com/u/Teun)\
**Post date:** [May 16, 2022, 6:16am UTC](https://community.hubspot.com/t/change-body-on-webhook-post-method/56964/2 "2022-05-16T06:16:10Z")

</div>

Hi @rechavar ,

You can not change the post body in a webhook action. You can however use the [custom code action](https://developers.hubspot.com/docs/api/workflows/custom-code-actions) with [Axios](https://github.com/axios/axios) and make a post request that way. This could look something like this:

```lia-code-sample
const axios = require('axios')

exports.main = async (event, callback) => {
 const firstname = event.inputFields['firstname']

 try {
 axios({
 method: 'post',
 headers: {
 'accept': 'application/json',
 'content-type': 'application/json',
 },
 url: '<YOUR-URL>',
 data: JSON.stringify({
 chatPlatform: 'whatsapp',
 chatChannelNumber: 'your_phone'
 }),
 json: true,
 })
 .then((response) => {
 console.log(response.data)
 })
 .catch((error) => {
 console.log(error)
 })
 } catch (err) {
 console.error(err)
 throw err
 }

 callback({
 outputFields: {
 firstname: firstname,
 },
 })
}

```
