Back to Mailtrap in Excel
SheetXAI logo
Mailtrap logo
Mailtrap · Excel Guide

Create Mailtrap Custom Contact Fields from a Excel Definition List

The Scenario

You are a marketing engineer setting up a new Mailtrap account for a product launch. Before you can import any contacts, you need 10 custom contact fields created. All 10 are defined in an Excel workbook: field names in column A of the Fields tab, types in column B.

The fields need to exist in Mailtrap before the contact import runs at 9 AM tomorrow.

The slow version:

  • You open the Mailtrap UI, navigate to contact fields, click "Create field"
  • You copy the name from the workbook, paste it in, pick the type, save
  • Row seven, you fat-finger the field name and do not notice until row ten
  • You delete it and recreate it, and now the IDs are out of sequence from what your import script expected
  • You push the import to 11 AM to fix the script.

The fast version is one prompt.

The Easy Way: One Prompt in SheetXAI

SheetXAI is an AI agent inside your Excel workbook that reads the field definition rows and creates each one in Mailtrap without opening the Mailtrap UI.

Open the SheetXAI sidebar and type:

For each row in the Fields tab, create a Mailtrap contact field using the field name from column A and type from column B. Write the created field ID into column C. If any row fails, write "ERROR" into column C with the reason.

SheetXAI reads all 10 rows, creates each field, and writes the new IDs back to column C. Your import script has the IDs it needs.

What You Get

All 10 custom fields created with IDs confirmed in the workbook:

  • Column C — Mailtrap field ID for each created field
  • "ERROR" rows — flagged with the reason
  • No manual UI work — you never opened the field creation screen

Column C is the source of truth for your import script. Pull the IDs programmatically and the hardcoded ID problem does not exist.

What If the Data Is Not Quite Ready

Field definition sheets often need cleanup before creation. SheetXAI handles it in the same prompt.

When field names have inconsistent formatting

Normalize all field names in column A of the Fields tab to snake_case. Then create one Mailtrap contact field per row using the normalized name from column A and type from column B. Write the created field ID into column C.

When the workbook has duplicate field names

Deduplicate rows by field name in column A, keeping the first occurrence. Then create one Mailtrap contact field per remaining row. Write the created field ID into column C.

When types need to be mapped from your internal naming to Mailtrap's accepted types

For rows where column B contains "string," treat it as type "text." For rows where column B contains "integer," treat it as type "number." Create one Mailtrap contact field per row using the mapped type. Write the created field ID into column C.

When you need the fields created and a JSON mapping output for your import script

Deduplicate column A by field name. Normalize all names to snake_case. Create one Mailtrap contact field per row using columns A and B. Write the created field ID into column C. Then write a JSON object into cell E1 where each key is the field name and each value is the created field ID, formatted for direct copy-paste into a script.

The pattern: the field definition workbook becomes the setup artifact. One prompt creates the fields and produces the mapping your scripts need.

Try It

Get the 7-day free trial of SheetXAI and open any workbook with a field or configuration definition, then ask it to push the setup to Mailtrap. The Mailtrap integration is included in every SheetXAI plan. See also how to bulk-import contacts once your fields are ready or the Mailtrap in Excel overview.

Stop memorizing formulas.
Tell your spreadsheet what to do.

Join 4,000+ professionals saving hours every week with SheetXAI.

Learn more