Update External Collection with API PATCH endpoint?

Hello!

I am trying to update user information from my Adalo app into my CRM in Airtable. When a new user signs up in Adalo, I’m able to successfully create a new user in Airtable by creating an external collection API call (though oddly it always creates two records in Airtable, one with the information from Adalo and another blank one :thinking:).

In the next screen, the user responds to a Yes/No question, and I have an Update action for the external collection to update the Yes/No response in Airtable. However, this action is not going through.

When I set up the external collection, I set it up with PATCH for the Update endpoint, which is what is required for Airtable.

Any help on this would be much appreciated! Thanks in advance!
Marianna

@mkerp can you share some screen shots / video of your setup? Thanks.

Hi Ben,

Here’s some screenshots + video of my current set up. First, here’s the External Collection setup:

Screen Shot 2020-04-23 at 2.21.29 PM

Next, here’s the set up for creating an Airtable record in the Adalo screen:

Screen Shot 2020-04-23 at 2.23.40 PM

Finally, here’s a video of the Preview screen, where it shows that a record is created in Airtable, but none of the data (i.e., first name, last name, email and isPregnant) appears in Airtable.

Let me know if you need any additional info.

Thanks!
Marianna

@Ben I have a similar problem with updating a record in Airtable.

I am trying to update an Airtable record that I successfully created via Create Form in Adalo.


It looks like something is processing but there is not update in Airtable.

Using the console in Chrome I find the following:
Error code 422 Unprocessable entity

The endpoint is maintained with PATCH
image

Got stuck for now. Any idea?

@Ben I figured out where the problem comes from:
The 422 error (Unprocessable Entity) shows up with a type mismatch.
In my case, it is related to a linked table:
image
Airtable is expecting a record id for the linked table like:
image

I am using a dropdown to select the location I want to update:

In the Form, I am filling the Location with the id from the selected location:

This is causing the 422 error.
I am going to try to put the id in brackets [id] as shown in the response - but Airtable just got unresponsive :frowning:

Airtable back but also [“id”] does not work. What I now also found here: Airtable linked records can be sent throught the api?
Will have a look into custom actions. @Ben But honestly, I think it should be possible to send an array to a linked Airtable field

There is limited functionality within external to local collections, but the Custom Actions should do what you’re looking for.

Hi @karimoo
How were you able to identify that the culprit field of the 422 error (Unprocessable entity) was Location in your case?

I have the same 422 error showing in my console, I understand that there is a type mismatch between adalo and the airtable table, but I cannot find not know where it comes.
The trace in the console provides me a tableId and a datasourceId as you can see below, but I do not know what to compare these values to.

I had a linked table too, which I deleted in Airtable (then refreshed Adalo integration, and form), but I still have the same issue when submitting my form, which is supposed to create an entry in my airtable table.

Would you know?