From f19888362054c00c6e378b9e33d2bedea868890b Mon Sep 17 00:00:00 2001 From: Isaac Roberts <119639439+madebyisaacr@users.noreply.github.com> Date: Fri, 20 Feb 2026 09:03:30 -0500 Subject: [PATCH 1/2] Fix image and file types with lookup fields --- plugins/airtable/src/data.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/airtable/src/data.ts b/plugins/airtable/src/data.ts index fdef16612..7297e2b23 100644 --- a/plugins/airtable/src/data.ts +++ b/plugins/airtable/src/data.ts @@ -31,6 +31,7 @@ export const PLUGIN_KEYS = { } as const const IMAGE_FILE_MIME_TYPES = ["image/jpeg", "image/png", "image/gif", "image/apng", "image/webp", "image/svg+xml"] +const PRESERVE_LOOKUP_ARRAY_TYPES = ["image", "file", "array"] export interface AirtableBase { id: string @@ -88,7 +89,10 @@ export function getFieldDataEntryForFieldSchema( value: unknown ): FieldDataEntryInput | null { // If the field is a lookup field, only use the first value from the array. - if (fieldSchema.originalAirtableType === "multipleLookupValues") { + if ( + fieldSchema.originalAirtableType === "multipleLookupValues" && + !PRESERVE_LOOKUP_ARRAY_TYPES.includes(fieldSchema.type) + ) { if (!Array.isArray(value)) return null if (value.length === 0) return null value = value[0] From 49e947e1b08c6c2bf941f7b092f610f8759d3d2d Mon Sep 17 00:00:00 2001 From: Isaac Roberts <119639439+madebyisaacr@users.noreply.github.com> Date: Fri, 20 Feb 2026 10:20:20 -0500 Subject: [PATCH 2/2] Fix string value handling --- plugins/airtable/src/data.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/airtable/src/data.ts b/plugins/airtable/src/data.ts index 7297e2b23..76cc3dc3a 100644 --- a/plugins/airtable/src/data.ts +++ b/plugins/airtable/src/data.ts @@ -108,6 +108,10 @@ export function getFieldDataEntryForFieldSchema( case "link": case "image": case "file": { + if (Array.isArray(value) && typeof value[0] === "string") { + value = value[0] + } + if (typeof value === "string") { if (fieldSchema.airtableType === "email" || EMAIL_REGEX.test(value)) { return {