Really looking forward to some code

Created on 10 December 2024, about 1 month ago

I'd love to see how you're implementing this. We have a process of exporting csvs and using those for imports from Airtable. I think this could be a very useful module.

πŸ“Œ Task
Status

Active

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States frob US

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @frob
  • πŸ‡ΊπŸ‡ΈUnited States Allie Micka

    Thank you @frob, you found this project quickly!

    I wrote this on a client project and it's actually a light-touch override of the URL and JSON handlers that migrate already provides. It sounds like it would be a good fit for your use case, since it pulls content directly from a live Airtable base with no export step, and can accommodate changes and new rows, thanks to the tools that Migrate already has.

    I will get a minimal port out there soon.

  • πŸ‡ΊπŸ‡ΈUnited States Allie Micka

    OK, the initial check-in is on the Releases tab! https://www.drupal.org/project/migrate_airtable/releases/1.x-dev β†’

    It's just a quick/initial port of a project-specific module, so I still need to write up a README and provide some usage examples for things more complicated than what's on this project page.

    The first thing I will change is how authentication is handled. If you want to be on the bleeding edge, you can test this out by:

    1. Visit https://airtable.com/create/tokens while logged in, and create a key with access to one of your bases
    2. Add AIRTABLE_API_KEY="thekeyfromstep1" to your environment somehow: on ddev, that's can be added to a file called `.ddev/.env`. If on another system, you're on your own.

    Create a migration somehow. One way to do this is to create a custom module:

    `mysite_migrate`

    `mysite_migrate/mysite_migrate.info.yml`:

    name: My Custom Migration
    description: Import data from Airtable into content structures on this site.
    package: Custom
    
    type: module
    core_version_requirement: ^10.3 || ^11
    
    dependencies:
      - drupal/migrate_airtable
    

    Add migrations to a folder called `mysite_migrate/migrations/` like the one on the project's main page.

    Be sure to set `base` and `table` to match the names of your Airtable base and the table you want to use. The field names in your process section will align with the column names of that table.

  • πŸ‡ΊπŸ‡ΈUnited States Allie Micka

    I have added the code, and I also documented the work I intend to do here, as I have time. I have been using this code successfully, and I hope you do also.

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024