Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

realhelmi's avatar

Custom import of relational data from Airtable

Hey laracasts,

I'm quite new here and to Laravel – bear with me.

I'm trying to code a little custom CRM. I decided my hardest step in the beginning would be to get data structure right and import existing data. Data is coming from 3 tables at airtable. Relational data that I somehow need to transfer to Laravel. Airtable has it's own record ids to build the relation. I think i would prefer to use their API to migrate the data as their CSV download only offers formatted data. I would need to rewrite that data again to for example convert "€123,47" into "123.47". Same goes for dates and all the other stuff.

I already got an airtable php module working within laravel and created an artisan command which I think would be most suitable for such a one time task thing. The thing I question myself is how to go with importing the related data?

Here's what I have:

  • 3 Tables: Customers, Orders. Catlogue orders
  • Every order has a related customer
  • Some catalogue orders have a related customer (others don't)

I'd most likely import Customers first but would I import the airtable record_id then additionally as a reference field and how would I reference it when importing orders and catalogue orders later? Can this field be deleted later? I hate carrying around unnecessary old data ;)

I'd like to hear any feedback on my thoughts. Just trying to get my feet wet in Laravel with only a little coding knowledge and nearly no knowledge in Laravel and PHP.

Thank you for helping, Frank

0 likes
1 reply

Please or to participate in this conversation.