# How to map chatGPT output into my airtable fields (With Json)

**URL:** <https://community.make.com/t/how-to-map-chatgpt-output-into-my-airtable-fields-with-json/64521>\
**Category:** Questions\
**Tags:** scenario, error, chatgpt\
**Created:** [December 20, 2024, 5:08pm UTC](https://community.make.com/t/how-to-map-chatgpt-output-into-my-airtable-fields-with-json/64521 "2024-12-20T17:08:37Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gaetan593](https://avatars.discourse-cdn.com/v4/letter/g/ecccb3/32.png) [@Gaetan593](https://community.make.com/u/Gaetan593)\
**Post date:** [December 20, 2024, 5:08pm UTC](https://community.make.com/t/how-to-map-chatgpt-output-into-my-airtable-fields-with-json/64521/1 "2024-12-20T17:08:37Z")

</div>

Hi everyone,

I am trying to map the output from GPT to an airtable database. Basically, I wanted GPT to get the key components I need for my app, coming from a scanned documents. I first had to create my own API to handle document-to-text with vision API (All the documents being scanned). I then passed the text into my GPT assistant and prompt it to return a Json document.

Here is an example of the output I get:

```json
{
  "Nom": "GÜZEL",
  "Prénom": "Yan-Loïc",
  "Niveau scolaire": "gymnase",
  "Français": 4.5,
  "Anglais": 4.5,
  "Allemand": null,
  "Mathématiques": 4.5,
  "Niveau français": "NaN",
  "Niveau Allemand": "NaN",
  "Niveau Anglais": "NaN"
}

```

However, using JSON module to parse the data, it doesn’t work. Then, I assumed it’s because my GPT output includes ‘’‘json and ‘’’ at the end. So I tried to remove them with Regex module, but it doesn’t work out. How can I process this output to then fill my airtable ? I tried to parse directly the output from GPT but didn’t work out neither (And the more I try, the more I run my credit on API)

 ![Screenshot 2024-12-20 at 9.11.02 AM](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/1/1/1116bf18273a4813097eb7b30789c17eb5473832.png)

Your support would be beneficial. I am a steep learning curve on automation, all doing by learning online

Thanks

Gaetan

---

<div class="post-metadata">

**Author:** ![Juliusforster](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/juliusforster/32/58099_2.png) [@Juliusforster](https://community.make.com/u/Juliusforster)\
**Post date:** [December 20, 2024, 5:27pm UTC](https://community.make.com/t/how-to-map-chatgpt-output-into-my-airtable-fields-with-json/64521/2 "2024-12-20T17:27:46Z")

</div>

Hi @Gaetan593,

used to do the same thing, but there’s actually a much easier method now.

In the ChatGPT module, you can click on “Show advanced settings” and change the output type from text to json object and then set Parse JSON Response to yes.

Like this:

 ![CleanShot 2024-12-20 at 6 .27.22](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/b/3/b31e374fb702c16218089b422e72963262e336e9.png)

Once you have that activated, you don’t even need a seperate module to parse the json as it will already be parsed inside the chatgpt response.

---

<div class="post-metadata">

**Author:** ![Gaetan593](https://avatars.discourse-cdn.com/v4/letter/g/ecccb3/32.png) [@Gaetan593](https://community.make.com/u/Gaetan593)\
**Post date:** [December 20, 2024, 6:17pm UTC](https://community.make.com/t/how-to-map-chatgpt-output-into-my-airtable-fields-with-json/64521/3 "2024-12-20T18:17:59Z")

</div>

Thanks for your help. I’ve changed it and I get this error message:

##### RuntimeError

[400] Invalid tools: all tools must be of type `function` when `response_format` is of type `json_object`

I suppose I have to write a function in my assistant on my openAI api dashboard ? I am not very familiar with those functions yet. THat’s what I see in my assistant:

 ![Screenshot 2024-12-20 at 10.15.04 AM](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/e/b/eb94c1096f84c8244d69c57d6a61d0643e479908.png)

Really appreciate your support Julius !

---

<div class="post-metadata">

**Author:** ![Juliusforster](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/juliusforster/32/58099_2.png) [@Juliusforster](https://community.make.com/u/Juliusforster)\
**Post date:** [December 20, 2024, 8:07pm UTC](https://community.make.com/t/how-to-map-chatgpt-output-into-my-airtable-fields-with-json/64521/4 "2024-12-20T20:07:40Z")

</div>

Thats weird! You just have to activate that and then give it the instruction in the promt.

I recommend you add a system message and then a user message. In the system message, after the initial instructions, add the following (change the language if needed):

Always answer in the following json format:  
“”“{  
“Nom”: “Nom here”,  
“Prénom”: “Prenom here”,  
“Niveau scolaire”: “niveau scolaire here”,  
“Français”: number value,  
“Anglais”: number value,  
“Allemand”: number value,  
“Mathématiques”: number value,  
“Niveau français”: “niveau francais here”,  
“Niveau Allemand”: “niveau allemand here”,  
“Niveau Anglais”: “niveau anglais here”  
}”“”

Once you’ve done that and you still get the error, could you send me the input bundles?  
Thanks you 😃

---

<div class="post-metadata">

**Author:** ![Gaetan593](https://avatars.discourse-cdn.com/v4/letter/g/ecccb3/32.png) [@Gaetan593](https://community.make.com/u/Gaetan593)\
**Post date:** [December 20, 2024, 8:38pm UTC](https://community.make.com/t/how-to-map-chatgpt-output-into-my-airtable-fields-with-json/64521/5 "2024-12-20T20:38:53Z")

</div>

Hi,

Instead of using message an assistant, I used the same module as you and added my assistant prompt in the “system message”, and it worked properly.

Thank you for your solution, I spent hours today trying to figure out a solution

---

<div class="post-metadata">

**Author:** ![Juliusforster](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/juliusforster/32/58099_2.png) [@Juliusforster](https://community.make.com/u/Juliusforster)\
**Post date:** [December 20, 2024, 8:40pm UTC](https://community.make.com/t/how-to-map-chatgpt-output-into-my-airtable-fields-with-json/64521/6 "2024-12-20T20:40:01Z")

</div>

Happy to hear that we figured it out! :party_blob:

---

<div class="post-metadata">

**Author:** ![Make\_Bot](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/make_bot/32/14661_2.png) [@Make\_Bot](https://community.make.com/u/Make_Bot)\
**Post date:** [March 20, 2025, 5:31pm UTC](https://community.make.com/t/how-to-map-chatgpt-output-into-my-airtable-fields-with-json/64521/7 "2025-03-20T17:31:44Z")

</div>


