Airtable: allow "create record" action to add new select options?

Hi all,

Hopefully title is descriptive enough but basically, I’m trying to set up a waitlist form on my WeWeb landing page that, on submission, should create a new record in a certain Airtable table.

I believe I have everything set up as intended for that to work, but when I try to test it I get a 422 error that states I don’t have sufficient permissions to create new select field options.

I could get around this the hard way by mapping all the possible front-end values that get passed to AT to exactly match select field options in AT but that is a huge PITA in this particular case because of the sheer amount of mapping this would involve, plus I would really rather be able to add value options on the front-end without having to worry about doing the same thing on the backend.

I have worked with the Airtable API extensively using Make.com, where there is an option to allow creating new select field values in order to address this very issue. Is there an equivalent to that somewhere in WeWeb, or plans to implement it?

Thank you!

GD

Bump? Apologies if my post is not clear but the issue is really straightforward: how to authorize WeWeb to pass new input options to an Airtable “select” field?

e.g.

Airtable select field has options “a”, “b”, and “c”. I want to send a new entry from WeWeb in which the value of that field is set to “d”, without having to manually add an option “d” to the select field on the backend.

Thank you!

Hi @gduteaud :wave:

Can you maybe show us what you managed to do so far and where you’re stuck? A screen recording or a few screenshots would help a lot.

For example, have you been able to create a record in Airtable through a submit form (which would confirm that you have writing rights in the Airtable base)?

Do you have trouble when trying to create a record with the select element only?

In your first post it sounded like you were having an issue with a form submission but in the second post it sounds like it might be something else.

Here’s the article on how to add and configure the Airtable plugin.

You’ll need to make sure you have writing rights if you haven’t already:

There’s a section dedicating to updating a record here. The same logic will apply if you are creating a record.

Hi Joyce, thanks for the reply.

I checked my token again, everything looks correct:

This is my form:

And this is the workflow:

The issue really seems to be with writing to an Airtable select field. I tested writing a new record to another table that doesn’t have a select field and it worked correctly:

Screenshot 2024-02-06 094948

Here’s the error response I get when trying to write a new record to the actual target table, even with no value specified for the select fields:

response
status: 422
statusText: ""
data
error: "INVALID_MULTIPLE_CHOICE_OPTIONS"
message: "Insufficient permissions to create new select option """""
statusCode: 422

Hi @gduteaud :wave:

I believe multiple choice options fields in Airtable expect an array with one or more ids.

In the screenshots above, Role is a select and expects an array but it looks like you’re sending an empty value which Airtable doesn’t recognize as an expected format.

Can you try:

  • selecting one of the select options for the Role select in the form,
  • binding the Role field in the workflow to the id of that option, but in between brackets, like this for example: [recajgtrUyarlkhardXy]

Thanks for the response!

I’m looking at the Airtable API documentation and it looks like this is fundamentally what my question is about:

Does the extension have a setting for this somewhere? I just want to be able to pass arbitrary option values from the front-end form to the back-end without having to manually map every possible value, because that’s not a viable solution. Thanks!

EDIT: Yep, I just tested passing select field values as strings that exactly match options that already exist in the back-end and it worked correctly, so the above is definitely the issue and not data formatting.

EDIT 2: Okay this is frustrating, I temporarily sidestepped the above issue and now I’m getting another

error: data
error: "INVALID_VALUE_FOR_COLUMN"
message: "Field "Name" cannot accept a value because the field is computed"
statusCode: 422

Yet I’m not deliberately trying to write to the “Name” field (since it is computed):

The craziest thing is that in the collection I created to set up the plugin I excluded that field in an attempt to avoid this very issue. I don’t get it. Starting to think this plugin needs some work…

Hi @gduteaud :wave:

Not sure about the typecast option.

Perhaps this approach could work well for your use case: https://tella.video/video-for-guillaume-8j6n

Thank you for your help Joyce, I really appreciate it! I understand the approach you demonstrate in the video and it’s pretty nifty, although it doesn’t really apply my case. Sidenote: I noticed you use the multiselect component that allows adding options. I know a single-select equivalent has been in the works for a while, any update on the status of that? :slight_smile:

I believe the issue you were having with the autoincrement field you were using as ID at the beginning of the video is related to the issue I described in the second edit of my latest post. It’s like the plugin is attempting to write to fields that can’t be written to.

Not sure who on the WeWeb team is in charge of developing/maintaining the Airtable plugin but I’d be happy to provide input if it’s useful.

We are not using Airtable as the actual back-end for our app thankfully, I’m only setting it up for this one use case because it’ll be easier for our marketing team to use than going into the actual (Supabase) back-end. But still, it would be nice if it worked a little better haha

Cool, thanks for the feedback. Just created a couple of product tickets so the team can explore further

1 Like