# Need Help with POST Request to Voiceflow from Airtable

**URL:** <https://community.postman.com/t/need-help-with-post-request-to-voiceflow-from-airtable/74784>\
**Category:** Help Hub\
**Tags:** tests, request, api\
**Created:** [February 2, 2025, 7:19pm UTC](https://community.postman.com/t/need-help-with-post-request-to-voiceflow-from-airtable/74784 "2025-02-02T19:19:05Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![spaceflight-specia10](https://avatars.discourse-cdn.com/v4/letter/s/c0e974/32.png) [@spaceflight-specia10](https://community.postman.com/u/spaceflight-specia10)\
**Post date:** [February 2, 2025, 7:19pm UTC](https://community.postman.com/t/need-help-with-post-request-to-voiceflow-from-airtable/74784/1 "2025-02-02T19:19:05Z")

</div>

Hi all

I’m currently trying to upload data from Airtable to Voiceflow.

So far, I’ve successfully made a **GET** request to Airtable and stored the data in a variable in Postman. However, when I make my **POST** request, I receive the following error:

```auto
{
  "errors": {
    "data.name": {
      "message": "kb doc name required"
    }
  }
}

```

Here’s the body of my POST request:

json

CopyEdit

```auto
{
  "name": "Products",
  "data": [{{JSON.parse(voiceflow_data_parsed)}}]
}

```

I’m not sure how to resolve this issue. Do you have any insights on what might be causing this error?

Thanks in advance for your help!

---

<div class="post-metadata">

**Author:** ![buchananr2](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/buchananr2/32/31615_2.png) [@buchananr2](https://community.postman.com/u/buchananr2)\
**Post date:** [February 9, 2025, 12:11am UTC](https://community.postman.com/t/need-help-with-post-request-to-voiceflow-from-airtable/74784/2 "2025-02-09T00:11:55Z")

</div>

To my knowledge you cannot execute `JSON.parse` in a variable replacement on the body. You can however leverage the `pre-request` script to set that as a variable then send the variable in the POST

```js
//pre-request script
pm.variables.set("parsed", JSON.parse(voiceflow_data_parsed));

```

Then in the body you can set

```auto
{
  "name": "Products",
  "data": [{{parsed}}]
}

```

---

<div class="post-metadata">

**Author:** ![spaceflight-specia10](https://avatars.discourse-cdn.com/v4/letter/s/c0e974/32.png) [@spaceflight-specia10](https://community.postman.com/u/spaceflight-specia10)\
**Post date:** [February 10, 2025, 5:18am UTC](https://community.postman.com/t/need-help-with-post-request-to-voiceflow-from-airtable/74784/3 "2025-02-10T05:18:57Z")

</div>

Thanks for coming to me the issue was that my post request was not in the format voiceflow expected, so with the help of ChatGPT I created the below pre-request script **(which is the solution)**

// ‘voiceflow\_data (_Is is the variable you must created to store your data from the GET request_)’

let voiceflow\_data\_parsed = JSON.parse(pm.environment.get(“voiceflow\_data”)); // Parse the data

let formattedData = {  
“data”: {  
“name”: “Pick your document title”,  
“schema”: {  
“searchableFields”: [“xxx”, “xxx”, “xxx”, “xxx”],  
“metadataFields”: [“YYY”, “YYY”]  
},  
“items”: voiceflow\_data\_parsed.fields // This assumes ‘fields’ is an array of objects from your GET request  
}  
};

// Convert to string before sending  
let finalPayload = JSON.stringify(formattedData);

// Store the formatted payload to send in the POST request  
pm.environment.set(“voiceflow\_payload”, finalPayload);

Also apologies if the code is inaccurate. I am new to development and I am only dipping my toe in as I am focusing on AI automation.

---

<div class="post-metadata">

**Author:** ![buchananr2](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/buchananr2/32/31615_2.png) [@buchananr2](https://community.postman.com/u/buchananr2)\
**Post date:** [February 10, 2025, 4:39pm UTC](https://community.postman.com/t/need-help-with-post-request-to-voiceflow-from-airtable/74784/4 "2025-02-10T16:39:14Z")

</div>

I am a little confused reading your response - Is the update you posted working for you or you have another issue within Postman?

I do not know the voiceflow API (please add a link and I can see if I can assist) but can help with the Postman side of things.

---

<div class="post-metadata">

**Author:** ![spaceflight-specia10](https://avatars.discourse-cdn.com/v4/letter/s/c0e974/32.png) [@spaceflight-specia10](https://community.postman.com/u/spaceflight-specia10)\
**Post date:** [February 10, 2025, 7:41pm UTC](https://community.postman.com/t/need-help-with-post-request-to-voiceflow-from-airtable/74784/5 "2025-02-10T19:41:54Z")

</div>

Yeah sorry, my follow up is the solution. Thanks again for reaching out
