Issue with Mapping Dust AI's Response in Telegram Bot Module

Hi everyone,

I’m facing an issue with mapping Dust AI’s response in the “Send a Text Message” module for Telegram in Make.com.

Context of my scenario:

  1. Telegram Bot - Watch Updates → Captures user message and Chat ID.
  2. Dust AI - Talk to an Assistant → Processes the user’s message and generates a response.
  3. Telegram Bot - Send a Message → Sends the response back to the user.

The problem:

  • The response from Dust AI appears inside “content” in Array 1 of the output.
  • However, when I try to map this response in the Telegram module, I can’t find the correct field.
  • Previously, I used the AI assistant to set this up automatically, and it worked. But I had to delete and restart my scenario, and now the AI assistant isn’t doing it anymore.

What I need help with:

  • How can I manually find and correctly map Dust AI’s response (content from Array 1) into the Telegram “Send a Message” module?
  • Is there a specific function or transformation I should use in Make.com to extract the correct response?

Any guidance would be really appreciated. Thanks in advance.


1 Like

Hello @Nathan4,

Apparently, Dust AI is returning an array or arrays for Content :sweat_smile:. Seems like, for this specific screenshot, the real Content you want to return to user is in the first item of the second item of Content :brain:.
If ever it’s ALWAYS the same items, you can just map Content.Content, Make will add automatically square brackets . In the first brackets, you can type 2, and in the second brackets type 1 (or leave default, which is 1 as well).

It will ask the mapping to pick “content” from the second item of “Content” array, and then the first collection of the resulting array, and then the ‘content’ field you need.

If it’s not always 2 items, or if sometimes the result has to be picked from another item, you will need more logic. You may be able to use the “map” function. But for this, you need to find a field that differentiates items in this array.

If ever you can’t make it work, can you try and extract a couple of results from Dust AI and send it here so that we have a look?

Benjamin

3 Likes

Hey Benjamin,

Thank you so much for your help :slight_smile: Worked great.

4 Likes

Hey Benjamin,

Could you maybe explain how I can retrive the right array automatically using the mapping method? When I try to do it - the colors is black and it doesn’t seem to really connect with the output I want if that makes sense?

1 Like

The map function allows you to extract a field from a complex array, and return you a new simpler array. It also allows you to extract a specific item making a search on one of the fields. It returns a new array, so you have to extract the first element from map using for example the “first” function.

To make it clearer, I did a little scenario with an example where I have an array of “companies”, each company has an array of “contacts”. Contacts have a grade (A, B, C, D).
This examples shows how to get the contacts for the company called “Hooli”, and then get the name of the contact with Grade=C in this company.
I also add a last example where I combine the search of the company with the search of the contact.

import this blueprint from a new scenario:
map-example.json (16.9 KB)

If it’s still unclear, try and export an example output of Dust AI, and tell me what info needs to be retrieved. It’s “content”, but what other field could identify the item you want to extract.

I hope my explanation is clear, but it’s a little complex to explain like this :sweat_smile::sweat_smile:

2 Likes

Any chance I can send you an email? Maybe with a loom video it’d be easier :slight_smile:

1 Like

Sorry, I didn’t see your message. I DM you now
Ben