The Scenario
You are a developer migrating 15 transactional email templates from a legacy system to Mailtrap before the production cutover next Tuesday. Each template has a name, subject line, category, and HTML body. All 15 are in a Google Sheet, one per row.
Creating them one by one in the Mailtrap UI is an option. It is also two hours of your Tuesday morning you do not have.
The bad version:
- You open the Mailtrap template editor
- You copy the name from the sheet, paste it in
- You copy the subject, paste it in
- You paste the HTML body and realize the editor mangled the indentation
- You fix the formatting, save, go back to the sheet, move to row 2
- Fourteen rows left
- You run out of time before the cutover window and push the launch to Thursday.
The fast version is one prompt.
The Easy Way: One Prompt in SheetXAI
SheetXAI is an AI agent inside your Google Sheet that reads the template rows and creates each one in Mailtrap, so you do not have to touch the Mailtrap UI once.
Open the SheetXAI sidebar and type:
For each row in this sheet, create a Mailtrap email template using the name from column A, subject from column B, category from column C, and HTML body from column D. Write the created template ID into column E for each row. If any row fails, write "ERROR" into column E with the reason.
SheetXAI reads all 15 rows, creates each template via the Mailtrap API, and writes the new template ID or an error flag back to column E. By the time you look up from your coffee, the migration is done.
What You Get
All 15 templates created in Mailtrap with a confirmation ID written back to the sheet:
- Column E — the Mailtrap template ID for each created template
- "ERROR" rows — flagged with the reason so you know exactly which ones need attention
- Zero manual Mailtrap UI work — you never opened the template editor
The IDs in column E become your migration receipt. If someone asks which template ID corresponds to a given name, the sheet has the answer.
What If the Data Is Not Quite Ready
Template migrations always surface formatting problems. SheetXAI handles cleanup and creation in the same prompt.
When HTML bodies have inconsistent encoding
Some templates were exported with special characters encoded as HTML entities and others were not, so the output looks inconsistent.
Normalize all HTML bodies in column D to use standard UTF-8 characters instead of HTML entity encoding where possible. Then create one Mailtrap email template per row using name from column A, subject from column B, category from column C, and the normalized HTML from column D. Write the template ID into column E.
When some rows are missing a category
Half the rows have a category, the rest are blank. Mailtrap requires a category value.
For rows where column C is blank, use "Transactional" as the default category. Then create one Mailtrap email template per row using name from column A, subject from column B, category from column C (or the default), and HTML body from column D. Write the created template ID or "ERROR" into column E.
When you only want to migrate templates marked as ready
The sheet has a "Status" column and only rows marked "Ready" should be migrated now.
Filter to rows where column F contains "Ready." Create one Mailtrap email template per filtered row using name from column A, subject from column B, category from column C, and HTML body from column D. Write the created template ID into column E and skip all other rows.
When templates need deduplication and validation before creation
The sheet is a merged export from two legacy systems and has duplicates by template name plus a handful of rows with empty subjects.
Remove duplicate rows by template name in column A, keeping the first occurrence. Remove any rows where column B (subject) is blank. Then create one Mailtrap email template per remaining row using columns A through D. Write the created template ID or "ERROR" into column E and write the total number of templates created into cell G1.
The pattern: cleanup, filtering, and creation happen in one prompt. You describe the end state, not the sequence of steps.
Try It
Get the 7-day free trial of SheetXAI and open any sheet with template data, then ask it to push the rows into Mailtrap. The Mailtrap integration is included in every SheetXAI plan. See also how to set up custom contact fields from a definition sheet or the Mailtrap in Google Sheets overview.
