AppGyver & EspoCRM System

UPDATE: Problem is fixed, solution is briefly explain below. Read below for fun, or suggest a better way to do thing.

Hi all, I don’t think this reach the quality of being a guide yet and I’m still slowly trying to get thing to work. I will use this thread to post my learning experience, documents some information for anyone that might help with.

This thread will be mainly for the purpose of making AppGyver work with EspoCRM, other CRM system made be different. Hopefully this thread will garner some interest and possible provide solution that I am stuck on.

In term of how to, I’m following the online tutorial by James NoCode here: AppGyver: Building A REAL APP with Mock.API | AppGyver Tutorial for Beginners 2021 - YouTube

As of this post I’m stuck on the “Data variable”, all mine preview is showing up as blank at the moment, however my JSON test result came up good and you can see it in the preview. In particular around this timeframe AppGyver: Building A REAL APP with Mock.API | AppGyver Tutorial for Beginners 2021 - YouTube
As you can see he can get the Name to appear, as for mine one it just blank, nothing showing. With that said, let get started on the hurdle that I faces.

I will skip the Creating API authentication part on EspoCRM for another time and mainly will focus on AppGyver. This guide below will taken as you are totally new and should (hopefully) provide step by step on how to get it to work.

Create a project on AppGyver
Click on “Data” up top, Click “Add Data Resource” > Rest API Direct Client
Resource ID: espo
Short description: crm test
Resource URL: Contacts
Click on the + under HTTP Header and add these two:
HTTP Header (1):
Label: apikey
Key: X-Api-Key
Value: (enter your API key you create from EspoCRM here)

HTTP Header (2):
Label: content-type
Key: content-type
Value: application/json

Click Save up top. Now left area click, “Get Collection (GET)” > Test > Run Test
Hopefully you will get a result but it will say this with an Error,
“Error: Error: The result was not an array. Maybe the data you’re looking for is inside one of the response object keys?”

I was stuck here for hours, but after reading tutorial and guide I found out why, we need to go back to “Config” and add this:
Response key path: list

Now go back to Test > Run Test and everything should work, your Status: OK
Click “Set Schema From Response”, click Save (top right)
Go back to Test, in the result box, grab an ID, it should be something like this:

[
{
“id”: “6125eb3519518958”,
“name”: “John Smith”,

Copy that id, “6125eb3519518958”, Next click on “Get Record (GET)”,

I was stuck here for hours for some reason, if you can just click “Test > paste the 6125eb3519518958 in ID > Run Test” and if it work then all good. However you may get these error like me!

Error: Non-JSON error body.status: 404

{
“total”: 274,
“list”: [
{

Error: The server responded with a list for a single data record. The response must be an object.status: -1

In this case, go back to Config and add this add the end of the URL
/{id}
For example it will look like this:
https://espocrm.com/api/v1/Contact/{id}

Do the Test again and hopefully you will only get 1 result. Then click “Set Schema From Response”, now click save.

Click up on Data up middle top which will minimize that page. Next I continue the tutorial in the youtube video above. Sadly when I do preview it all blank, I try a combination of Data Variable and option but nothing. I can see it in View tabs but not in the App Preview Portal.

Hopefully someone can help or go further than me. I will continue to write this thread if I manage to find a solution.

Thank you.

Edit & Update: Great news! I have a feeling that it might just be the portal not working properly so decide to try out the AppGyver Preview app and it seem to be working on there. It showing all the data that I was expecting. So I can continue this journey. Hopefully I finish the tutorial and perhaps create a proof of concept for EspoCRM user.

1 Like

Hi all, I follow the AppGyver + Xano guide and use the Formula + String method, this one work for me as oppose to Page Variable method by James NoCode.

With that said, now that the basic function work as expected, it just a matter of designing the App, adding it to AppGyver and debugging the system.

If anyone is interested in helping out as I probably release it to the public EspoCRM community (Forum - EspoCRM Open Source Community Forum), got suggestion, please let me know. I’m following the official Power Up video: Power-up videos - Composer
To learn and add function that I finds is good to have.