# Ai agents returning JSON

**URL:** <https://community.make.com/t/ai-agents-returning-json/88950>\
**Category:** Questions\
**Tags:** ai-agent, json\
**Created:** [August 6, 2025, 8:15pm UTC](https://community.make.com/t/ai-agents-returning-json/88950 "2025-08-06T20:15:20Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alexandre\_Drouin](https://avatars.discourse-cdn.com/v4/letter/a/e9bcb4/32.png) [@Alexandre\_Drouin](https://community.make.com/u/Alexandre_Drouin)\
**Post date:** [August 6, 2025, 8:15pm UTC](https://community.make.com/t/ai-agents-returning-json/88950/1 "2025-08-06T20:15:20Z")

</div>

Hi

I am try to run a flow that go in a Custom AI Agents (Gemini) and ask specific instruction to return a valid JSON without any other text. I even try to remove the characters that my module output are returning me.

I try everything that i could, but can’t find a solution. I also have try to add instruction everywhere in my Agent and the formula to manually remove it but nothing work.

Any help would be appreciated.

thanks

Basic Flow :

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/9/b/9b7ca1372a434abd4a13f3a7fdb6298fd2b096b5.png)

**Make AI Agent output :**  
Always returning me the characters : **```json** at the beginning and **```** and the end.  
which make my Parse JSON invalid

````json
```json
[
..........
]
```

````

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/c/c/cc8bba081c97d8502e627c2708a4c45ca39d2057.png)

**Formula** : it’s not fixing my issue

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/6/f/6f1cc55912542ced24fd440b920d7b351cbceb2d.png)

---

<div class="post-metadata">

**Author:** ![duativ](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/duativ/32/67299_2.png) [@duativ](https://community.make.com/u/duativ)\
**Post date:** [August 7, 2025, 6:57am UTC](https://community.make.com/t/ai-agents-returning-json/88950/3 "2025-08-07T06:57:20Z")

</div>

These are markdown wrappers that agent is adding, you can specifically ask it not to do this in message/thread, something like: “your entire response/output is going to consist of a single JSON object {}, DO NOT wrap it in JSON markdown markers”

You could also consider calling Gemini agent through API, it will not have the convenience of [Make.com](http://Make.com) agents but might give you additional tool options to force output format (I know openAI assistants have this, I’m not sure for Gemini)

You can also remove markdown wrappers manually, also see previous post:

> [@Need to remove the "bad characters" from the start of a JSON output from GPT](https://community.make.com/t/need-to-remove-the-bad-characters-from-the-start-of-a-json-output-from-gpt/63574):
>
> When I ask any of the popular GPT modules (ChatGPT, Claude, or Perplexity) to return data in JSON format it starts the response with ‘’‘json and ends with ‘’’. I have tried text parsing to remove it, but it does not work. You can see from the attachments how I have the text pattern setup using a variable and what the output is - it doesn’t seem to do anything.

---

<div class="post-metadata">

**Author:** ![Alexandre\_Drouin](https://avatars.discourse-cdn.com/v4/letter/a/e9bcb4/32.png) [@Alexandre\_Drouin](https://community.make.com/u/Alexandre_Drouin)\
**Post date:** [August 11, 2025, 8:16pm UTC](https://community.make.com/t/ai-agents-returning-json/88950/4 "2025-08-11T20:16:12Z")

</div>

Thanks you @duativ , it’s seems to have solve my issue for now to remove the wrappers manually.  
Have a great day

---

<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:** [August 26, 2025, 8:02am UTC](https://community.make.com/t/ai-agents-returning-json/88950/5 "2025-08-26T08:02:28Z")

</div>


