Sending an AI module (agent) result to an Appsheet application

Hello!

I have an appsheet application which is saving date in some tables and also some pictures in a google shared drive. An AI module (agent) analyze these pictures and return a result. I need to integrate this result (json ) in my application and write in a table.

I found some solutions using Webhook step in an Automation or using Google Appscript. But It is not very clear for.

For example I tried to fill the the URL webhook using the APi of the agent and I receive an error : “Validation failed with exception: Sequence contains more than one element”. I used “Get” as Method in “http verb”.

Could anyone help me and advice me how should I do?

Thank you!

Regards!

Ruxandra

2 Likes

Hello @Ruxandra,

I did some research and I found this article that might help: Use return values from webhooks

Let me know please.

1 Like

Hi Ruxandra,

If your AI module (agent) returns a JSON, I would recommend using Apps Script. It is much easier to work with JSON there and return only the values you actually need in your app.

In Apps Script, you call the agent API, process the JSON response, and return the specific values you want back to AppSheet.

On the AppSheet side, set your Bot step to Call a Script instead of Call a Webhook. Select your script and function, pass any needed parameters, enable Return Value, and define the return type.

After that, add one more step to Set row values, using the values returned from the script to populate the columns you need.

5 Likes

Hello, Jose!

Thank you for your answer! I know about it, I have already read it and I think, it’s rather about to use Appsheet to post in an AI Agent.

Regards!

Ruxandra

2 Likes

Hello!

Thank you! I will try like this!

Regards!

Ruxandra

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.