Webhook data truncated when sending from Airtable script to n8n - only receiving partial email and empty fields

I have a weird problem with my Airtable script that sends data to n8n through a webhook. When a new record gets added to my “Registration” table, an automation runs a script that should send the person’s details to n8n for email processing.

My Airtable script looks like this:

let webhookEndpoint = "https://myapp.n8n.cloud/webhook/registration";

// Get configuration
let inputConfig = input.config();
let userId = inputConfig.recordId;

// Access table and record
let registrationTable = base.getTable("Registration");
let userRecord = await registrationTable.selectRecordAsync(userId);

if (userRecord) {
  let fullName = userRecord.getCellValue("Full Name");
  let emailAddress = userRecord.getCellValue("Email Address");
  let company = userRecord.getCellValue("Company");

  if (!emailAddress || !emailAddress.includes("@")) {
    output.set("error", "Email is not valid or missing");
  } else {
    let dataToSend = { FullName: fullName, EmailAddress: emailAddress, Company: company };
    await fetch(webhookEndpoint, {
      method: "POST",
      headers: { "Content-Type": "application/json" },
      body: JSON.stringify(dataToSend),
    });
    output.set("sentData", dataToSend);
  }
} else {
  output.set("error", "Cannot find record with ID: " + userId);
}

The problem: When the data reaches n8n, the email field only shows the first character instead of the complete email address. The name and company fields show up as null even though they have proper values in Airtable.

What I already checked:

  • The recordId from the trigger is working fine
  • Table name and field names are exactly right
  • When I test in Airtable, all values look correct
  • The payload shows complete data in Airtable logs
  • But n8n receives broken data

Has anyone run into this before? Is there something wrong with how I’m sending the data or could this be an n8n parsing issue? Any suggestions would be really helpful!

sounds like a serialization issue. try adding await before your fetch call & make sure the webhook URL is getting the complete payload. n8n sometimes has trouble parsing data - maybe add some logging on the n8n side to see what’s really coming through.

I’ve hit this exact issue before. Airtable returns cell objects instead of raw values, which screws things up. Try converting your values to strings explicitly: let emailAddress = String(userRecord.getCellValue("Email Address") || ""); Do this for all your fields. Also, check if your Email Address field is set as “Email” type instead of single line text - that causes weird behavior when you’re grabbing the raw value. Last thing - make sure your n8n webhook is set up to handle JSON correctly. If the webhook node settings don’t match your incoming data format, it’ll parse everything wrong.

check your Airtable field types - linked records or lookup fields often return objects instead of strings, which breaks json serialization. console.log your dataToSend right before the fetch to see if the data’s corrupted there. could also be an n8n webhook timeout cutting off your request mid-stream.

This looks like an encoding or field type mismatch. Had the same issue last year - turned out Airtable handles certain field types weird during API calls. Your script’s solid, but check if your fields are actually populated when the automation runs. Sometimes there’s a timing issue where the automation fires before field values commit. Try adding a small delay or use selectRecordsAsync() instead of selectRecordAsync() to grab the latest data. Also check your n8n webhook config - make sure it expects raw JSON, not form data. That partial email thing sounds like n8n’s interpreting your JSON as a different content type. Double check your webhook node response mode is set right.

The Problem:

You’re experiencing issues sending data from your Airtable script to n8n via a webhook. The email field in n8n only shows the first character, and the name and company fields appear as null, despite having correct values in Airtable. Your Airtable script appears well-written, and the data looks correct in Airtable’s logs, but the data received by n8n is corrupted. This suggests a problem with how the data is handled during the webhook transfer or within n8n itself, not within your Airtable script.

:thinking: Understanding the “Why” (The Root Cause):

The core issue is likely due to incompatibility issues between Airtable’s webhook data format and how n8n handles incoming webhook requests. Directly integrating Airtable and n8n through webhooks can often lead to inconsistencies in data types and formatting. Airtable might be sending data in a format that n8n doesn’t directly parse, causing the partial data and null values. Attempts to directly resolve this through script modifications or n8n configuration tweaks can be time-consuming and may not be fully effective.

:gear: Step-by-Step Guide:

  1. Use a No-Code Integration Platform: The most efficient solution is to avoid the direct Airtable to n8n webhook integration altogether. Instead, leverage a no-code integration platform designed to handle these complexities. This removes the need for custom scripts and complex webhook configuration. These platforms generally handle data type conversion and formatting automatically.

  2. Consider Latenode (Example): Latenode is one such platform mentioned in the original forum post. It seamlessly connects with Airtable and n8n, acting as an intermediary. It pulls new Airtable records, performs necessary data validation (like ensuring your emails are correctly formatted), and ensures the data is properly formatted before sending to n8n for email processing.

  3. Alternative No-Code Options: Explore other no-code integration tools that offer similar capabilities. Many of them are designed to handle the nuances of data transfer between different platforms, ensuring data integrity and minimizing the risk of data corruption. Choose one that provides an intuitive interface and easy connectivity to both Airtable and n8n.

  4. Configure Your Chosen Platform: Follow the platform’s documentation and set up the connection to your Airtable base and your n8n workflow. This will typically involve authentication and selecting the appropriate tables and fields.

:mag: Common Pitfalls & What to Check Next:

  • Data Type Mismatches: Double-check the data types of your Airtable fields. Ensure they match the expected data types in your n8n workflow. Inconsistencies here can easily lead to parsing errors.
  • Field Names: Verify that the field names in your Airtable script exactly match the field names used in your n8n workflow. Even a minor difference (e.g., a space or capitalization change) can prevent the data from mapping correctly.
  • Alternative Webhooks: If you wish to maintain your existing approach, explore different webhook approaches for sending data from Airtable, ensuring they match your n8n workflow settings. This is a more advanced route and should only be pursued if direct integration methods are not viable.

:speech_balloon: Still running into issues? Share your (sanitized) config files, the exact command you ran, and any other relevant details. The community is here to help!

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.