Custom API calls

The iframe embed is something I really love about Answerly and which I use often. However, I would also love a direct API function for realtime information.

For instance, just to explain my request and potential use case;
Right now when someone asked the weather, it sends an iframe with the weather widget (which is awesome by the way).

But it would also be great if the asked information about the weather, is received through an API connection with the ‘weather-provider’ and when someone asks ‘will the weather allow me to bbq tomorrow evening?’, it can just respond with ‘the weather looks great for a bbq, because it will be 28 degrees celsius without any wind!’

Is this something which is/will be possible with Answerly? It opens a lot off possibilities, especially with the new whatsapp connection!

Hi,

Thank you for sharing your idea! Integrating real-time information via an API connection is indeed a great suggestion and could open up many possibilities, especially with our new WhatsApp connection.

We’ll definitely consider this for future development. We appreciate your feedback and are always looking for ways to enhance our platform.

Thank you again for your valuable input!

1 Like

@Campique

Just launched API request as a function. Check it out: Answerly and let me know what you think!

Hi Fatos, amazing work! Thanks for the quick actions :slight_smile:

I just tried it, but I get an error message with two ‘free test-api’s’ I am trying with (The Cat API www.thecatapi.com for images and open-meteo.com for textual weather information). I get this error using a ‘blank’ testbot with GPT4o-mini:
"It seems that there is currently a problem with retrieving the current data for the weather report.

We received an error message indicating that an error occurred while processing the information (SyntaxError: Unexpected end of JSON input). This often means that the data we tried to retrieve is not complete or correct."

Is this something I am doing wrong from my end?

For example, this is the api-key from the weather info:
https://api.open-meteo.com/v1/forecast?latitude=52.52&longitude=13.41&hourly=temperature_2m&models=knmi_seamless

This one doesn’t need an API key. I insert this in the ‘endpoint’ section, typed that it should activatie when someone mentions ‘weather forecast’, used the GET method, used the JSON (but also url-encoded, same problem) and kept the body and header empty because this one doesn’t need a key. The Cat-api has the same problem, I have a key from this one and inserted this in the header with some different-tags but this also gives the same error.

Can you take a look? Thanks in advance!

Thank you for the kind words!

  1. I don’t quite understand how you are planning to use the cat pictures for the API. Could you clarify your goal?

  2. There was indeed a small oversight with GET requests, which has just been fixed. I managed to use your Open-Meteo API, and I got the following results:

So if you re-try again, it should work now.

Hi Fatos,

Thanks, the weather information works now!

The ‘cat-api’ is just a fun way to test the opportunities of the API-function, in this case if it is possible to receive images through the API. The cat-api can send a random cat-image when asked for a specific sentence/word, which kept me thinking about the possibilities to receive more than just text through the API. However, this doesn’t seem to work. Is this something which is 'easy to manage from Answerly’s side?

It is no problem if it isn’t by the way, I am glad we can receive realtime textual information with this new API-functionality (which is just what I needed) and I am grateful for the quick integration of my suggestion! :muscle:

This request and the new function are such a powerfull tool!!

I have a use case, in which there is an API that to call I need to pass two parameters (i.e. country and category).

Im wondering if its possible to combine “Forms” functions with this API function.

For example, user asks for “list of products”, then this triggers a form which asks the user for “country” and “category”, and then triggers the API call, which response is the list of up to date products plus another info.

1 Like

Thank you, @Jotasang!

I appreciate your comments! It’s an amazing feature, and I believe very advanced versions of agents that can take action represent one potential future for AI, and we’re ready for it!

Our solution also involves conversational forms for customized API requests; we’re simply still considering how this feature could be improved.

In the meantime, I have created a brand new use cases category.

If you have any use cases with the new API system, we would be more than happy to hear about them, even if it includes the future conv forms + api requests.

You can share them here: https://community.answerly.io/c/use-cases/16.

2 Likes