Why can’t update Airtable Record using a custom action?

why?

Hi @AndreasAyoCruz,

You would need something like this!

image

image

I guess you are adding the id of the record to the name column of your table and the JSON is incorrect! Screenshots may help us of your table and the request JSON body in Airtable!

Thank you

1 Like

OMG!!! WOW! Thank you very much. why aren’t they listed on Airtable - Adalo Resources?

I have one more question.

1 Like

I think it’s because we don’t need! After connecting the Airtable Table we can creay, update and delete!

how do I update a specific order?


Objednávky = Orders
List is menu

You need to update that row?

You can fill the id input in the custom action for current item > id and fill other fields with the values that should update!

I did everything you suggested, and I’m having this error.

What am I missing?

@Productology did you fill the inputs with example data? You can find them in the Airtable API docs page!

I did not.
Another error came up, tho:

{
  "error": {
    "type": "AUTHENTICATION_REQUIRED",
    "message": "Authentication required"
  }
}

EDIT: Never mind, I copy-pasted again the Bearer string and now it works.

2 Likes

As a tip, PATCH, only updates fields you select, so if you only want to update Email, you can use it, PUT is used to update all fields, so if you would leave any field out of it (In the PUT), it will get empty data.

1 Like

I’m not sure I understood how to do that.
I’m using this Custom Action to record new users into Airtable after a signup.
I set this action in the “Submit button” of the signup form:

I’m leaving “ID” empty, since I don’t know what to put in there.
I assume that Airtable will fill that automatically, just like it will do with “createdTime” (that I did not set up at all in the Custom Action).

Now, in another screen, I ask the user to verify the email address, and if this happen, I check as “True” in a boolean “Email Verified?” field of my Users collection. I’d like to mirror that also in the Airtable table.
So, alongside the action “Update > Logged In Users > Email Verified is true”, I should set the custom action I already used in the sign up form. But what ID should I set?

When a user signup, I generate a UUID as an automatic action:

This value is not in the form of Airtable ID (i.e. rec0D6bQHkBVKweEh)
Can I use is as ID, both in the Custom Action in the signup form and in the Custom Action when the user verified the email?

Yep. When updating and deleting you need to add the id.

In where? In the custom action id field?

As far as I’m aware you can’t add a value to the id field ( if it is you get a error message called Action Cannot be completed ) and Airtable generate a id. If you need this you can create another column and store this. And also there’s a limitation that Custom Action don’t work on forms and also there’s a limitation on the Signup form that for create,update records using Logged in user > properties you need to add them on another screen.

Ok, so to overcome this instead of setting up the custom action on the signup form, I set it up on the first page of the onboarding funnel. So, after sign up user are redirected to page 1, and on page 1 I set the automatic custom action.

Exactly. In the custom action id field when my goal is to update the existing record, not creating a new one.

Are you creating the record on Airtable before verifying the email or after verifying email? Are you using a custom action or just the create action?

This is the process:

Signup Page:

  • It contains Signup Form
  • It creates the User record on the Adalo collection
  • it redirects to Page 1 after signup

Page 1

Page 2

  • When opened, I’d like to update the Airtable record (created on the previous page) by changing the boolean value of “Email Verified?” from “empty” to “true”.

You can create a property to store the Airtable id on the Users collection. After the Custom action you can add a update logged in user action that adds the id to that created property in the Users collection. To get the id you should see a section with the custom action name and the results. But if you add this on the screen actions section then you won’t see this section due to current limitation. For this you can add a countdown on the screen and add these actions on the countdown finished actions section. You can add the verify user custom action there too. Or you can use the id from the custom action directly without storing it in the users collection.

Then in the page 2 you can use the update action and add that property that you created to store the id of the Airtable record for the id field and update the boolean.

I did everything you suggested, but it doesn’t work: no record is created on Airtable.

I did not insert a countdown, but the “After Signup” screen, with a button that in theory should create the Airtable record and update Adalo’s property with records.id.

In the Custom action setup does the user created on Airtable? Does the ID is a column that you created? If that is the id that Airtable create I’m guessing you don’t need the id here or you need put the email there ( not sure. unable to test it now because I’m with my phone now :upside_down_face: )

Never mind, I’m using the solution you proposed in another topic (Cannot create a record on External Collection (Airtable) - #2 by dilon_perera) and it’s working.
I guess I’ll just drop the idea of using Custom Actions to create/update Airtable records, and I’ll use the “External collection” option offered by Adalo.

1 Like

I tested on my side, and both Airtable submissions and Custom action works. I would need to check your backend to see the issue. If you are happy as it is then no need :slight_smile: .

1 Like