Airtable <> Content Collection

As all articles regarding the usage of Airtable and Wix/EditorX are outdated, and the only person who was really trying to help on this topic has left the forum, it’s time to open a new conversation.

Since Andreas Kviby came up with a solution on this topic back in 2018/19, Airtable became a worldwide favorite to-go-with solution for no-code database handling. And there are a lot of people asking/looking for a way to use Airtable with Wix/EditorX.

So please Velo/Wix/EditorX people, stop ignoring customer needs and either come with a 2022 state-of-the-art no-code integration of Airtable or provide a proper step-by-step guide for non-coders to connect and bi-directional sync Airtable with Content Collections.

The way people got shut down in this forum when asking for a solution is hard to accept. This forum is not a hobby or playground. It has the purpose to help people realize their business solutions. It’s not up to the staff to question what they want to achieve, it’s their business to help them do so.
Also please understand that the very best solution on the Wix/EditorX side isn’t always the best overall solution for your customer’s business. So please stop telling people that Airtable isn’t the best solution without knowing the workflows and automation that are necessary to create and maintain the content in the database.

And when we talk about state-ot-the-art. Have a look at the Airtable API Documentation. There you can see how to do this in 2022 to make it easy for people to work with. This would reduce your support efforts as well.

2 Likes

If you are asking for a new feature, the place to request it is the Wishlist . I did not see any feature requests open for Airtable integrations.

You can take a look at documentation and articles for working with third party integrations here . There are many types of 3rd party integrations so no, this will not be specific to airtable.

If you begin to try working through this yourself and learning how to do more advanced integrations and run into problems with your code, you can ask specific questions here so that the community can help you problem solve.

If you have an urgent need that cannot wait or don’t want to write the code yourself, you can hire a Velo developer through the Marketplace .

This is funny. People already lost faith in the Velo wishlist and feature request sections in the Wix/Velo universe.

  • The last 3 released items from the wishlist got wished 9-10 months ago and had 7 votes. 7 votes combined!

  • The 5 most wished items are two years old and have 72 to 97 votes. But the Velo Team don’t care. Obviously.

  • There is only 1 item in Rolling Out status and it’s 1 year old.

  • The last resent 4 items in pending are between 10 months and 2 years old.

This is not only not customer focused, this is also cherry picking with no intent to listen to what people really want at all. So how does posting to the wishlist makes any sense if essential features are sleeping there for months/years?

I put my request for a Zapier integration (which would kinda solve the Airtable integration as well) into the EditorX wishlist. I think this feature should be used by non-JavaScript developers as well. I mean, this is the main purpose of no-code tools like Zapier and Airtable, right?
https://www.editorxcommunity.com/forum/wish-list/zapier-integration

My overall experience with EditorX and Velo is documented in my open letter to the investors and management of Wix and can be found here. (It’s still in progress and an evolving documentation)
https://www.pure-neo.io/post/the-tanking-wix-stock-is-no-surprise

@kuklick
Thanks for sharing your feedback here and in the blog post. We’ve reviewed your comments and would like to chat with you early next week to address your issues and help where we can. Is it OK if I contact you via email to arrange a time for a call with one of our product managers? Thank you.

We need such integration as well!

@kuklick Hello again. I noticed you mentioned needing a Zapier integration. We do have a Velo package for that. Have you tested with this?

Zapier Integration Velo Package

@marlowe-shaeffer Sure we can have another telephone call. My experience with these calls is the following:

I get a phone call and you guys are lovely, willing to understand my problems, promising to address this and to forward my case to a special team. Then not much more happens. Either the special team does not contact me, or they send me a link to an article that does not help me.

I wrote several posts in the EditorX forum during this week.
Answers = 0
Solutions = 0
The amount of conversation there shouldn’t bee too hard to handle.

PS - The blog post got a major update and more updates will follow over the weekend before it gets distributed on Monday.

@amandam Thank for the link. I have seen this but this is nit what I would call an integration. The package does send a simple post request to trigger a webhook in one direction.

There is also already a Zapier integration for Ascend automation. But all of the existing stuff does not cover the most common use cases why people are asking for an integration.

We’re using Airtable as our single source of truth for all database data. We already solved complex business automation with Airtable, Notion, Typeform, Shortcuts, Sprout Social, and some other no-code tools without writing a single line of code. Even using the Airtbale API was possible without writing code because their top-notch API documentation is dynamic and you can simply copy-n-paste everything.

The only missing piece is the frontend. In Webflow - easy to achieve. In WordPress - easy to achieve. In EditorX - pain in the b*tt.

New record in Airtable triggers a Zappier catch hook that

  1. creates a new record in Wix Content Collection

  2. sends the new Wix Content Collection UID back and stores it in the Airtable record

Updated record in Airtable triggers a Zappier catch hook that

  1. check if the record already exists in Wix Content Collection

  2. if yes, updates the existing record

  3. if not, creates a new record

Of course, for a JavaScript developer, this is easy peasy work and they might answer, Hey everything necessary to build this is already in Velo. Just use this function and this function and this function and read the API documentation.

Right. This is why I posted the feature request in the EditorX forum. I’m asking for integration for non-JavaScript-Ninjas. 2022 no-code style.

@kuklick Understandable and you are correct. Velo Packages are meant for developer users and are not a no-code integration. They are similar in nature to NPM packages but specific to the Velo ecosystem.

I apologize I didn’t see your feature request previously when I checked. This forum is Velo-specific so our wishlist is not connected to EditorX as our main purpose here is to support Velo developers. This is not an excuse, just letting you know where the disconnect stems from.

Hopefully speaking with Marlowe and the product team will give you some more clarity. And in the meantime if you do need any assistance with code, we are happy to help.

@amandam

The guys from Airtable helped me to build a Zapier webhook and to write the code to expose my Wix content collection. Thanks to their help, I’m now close to achieve what I need.

Unfortunately, I have some problems with the date format of the content collection.

The content collection date field does not understand its own date format.

The JSON I receive with GET has the following date format:

"album_curated_wix":"2019-06-04T10:35:00.000Z", 

But when I send the exact same format back via PUT it looks like this in my content collection.

"album_curated_wix":"2019-06-04T10:35:00.000Z",

Also happens with Boolean fields don’t understand: true, True, “true” or ''True".

How can I format my JSON correctly?

@kuklick Hello again! Glad the integration is setup and working.

For the date question, can you try something like this. I may not have your field names correct, so you this as a template. I have included a return statement as I made the assumption this is happening inside a function.

For more information if my example is not clear enough, if you google something like converting JSON date to Javascript you should find a number of blog posts.

let dataForCollection = JSON.parse(body)
dataForCollection.album_curated_wix = new Date(dataForCollection.album_curated_wix);
return wixData.insert("Your-Collection-Name", dataForCollection);

@kuklick For the question about your boolean value, are you parsing the JSON object before trying to insert it?

@amandam I understand that I have to parse the json body first to change the strings to a date or a boolean. Is that correct?

I’ve played around with your code but did not get it running. I always get a 500 error with an empty JSON body as response.

My backend function looks like this:

export function put_updateAlbum(request) {
  let options = {
    "headers": {
      "Content-Type": "application/json"
    }
  };
  // get the request body
  return request.body.json()
  .then( (body) => {
    
      // update the item in a collection
      return wixData.update("musicAlbum", body);

    } )
    .then( (results) => {
      options.body = {
        "inserted": results
      };
      return ok(options);
    } )
    // something went wrong
    .catch( (error) => {
      options.body = {
        "error": error
      };
      return serverError(options);
    } );
}

These are the three date fields I need to get working:

album_added_wix
album_curated_wix
album_date_released_wix

And these are the three boolean fields:

gotUpdate
sound
offline

@kuklick Apologies if I was not as clear before. Thanks for sharing the code and let me try again

Yes. You will need to parse the JSON object before attempting to insert the data. In your code, I believe you can do that right after this line:

.then((body)=>{

You should not have to do anything else for the boolean value other than parse the JSON. If it is still returning incorrectly, do an internet search for JSON object to boolean Javascript and see if I am missing something.

For the date after you parse the JSON, you will need to modify it. In your code above, it will likely be something like this

(after parsing)…

body.dateFieldNameInTheObj = new Date(body.dateFieldNameInTheObj )

You are taking the date format from the JSON object here and setting it to a new JS Date. Basically when you parse the JSON, it’s turning it into a date string and now you need to turn it into a JavaScript date.

If the way I explain it still doesn’t make sense, do an internet search for JSON date to JavaScript. Or you can also search through the forum here. I believe there are some others who have posted about JSON to JS approaches

@amandam I got it running. But ya know what’s weird?

body.dateFieldNameInTheObj =newDate(body.dateFieldNameInTheObj )

The above works fine to manipulate the date to make it work in the conten collection. So this problem is solved.

But always when I try to parse the body into JS the response is 500. And I tried kinda every possible way I found on the internet. Without parsing it works now after I have changed it on the airtable side from boolean to text. Not as tidy as I wished to, but at least I get it running somehow.

@kuklick Interesting! It’s always difficult to offer code without debugging myself, but generally you need to parse a JSON object so I am surprised by that. I have made a note to do some playing with AIrtable/Zapier and JSON to content manager. It could be something specific about how their data is returned.

Thanks for letting me know how it went.