NetSuite REST Azerion icon

NetSuite REST Azerion

Call NetSuite SuiteTalk REST operations.

Actions981

Email Template → Insert record

AI-generated

Summary

Create a new email template record in NetSuite via POST /emailTemplate.

Inputs

  • name — Name of the email template. Appears in the template selection list when sending emails.
  • content — HTML or text content of the email template. Overridden if a media file is selected via usesMedia.
  • scriptid — Internal script ID for the email template.
  • isInactive — Check to inactivate the template; inactive templates cannot be used to send email.
  • recordType — Entity type for the template: Entity (people/organizations), Transaction (financial exchanges), Custom Record, or Case.
  • subject — Default subject for email messages generated by this template.
  • typeName — Template format type. Options include GNCTEMPLATE, PDF, MAIL, HCM, KUDOS, SYSTEMEMAIL, EMAIL, ONLINEFORM, FAX, CAMPAIGN.
  • usesMedia — Indicates whether the template uses a media item. Options: T (true) or F (false).
  • mediaItem — Media item associated with the template, with internal identifier (id) and external identifier (externalId).
  • isDebugMode — If true, includes full request and response info in the output for debugging.
  • authMethod — Authentication method for NetSuite API requests. Default: OAuth1. Options: OAuth1, OAuth2.
  • X-NetSuite-Idempotency-Key — Unique idempotency key (UUID RFC 4122) to ensure asynchronous requests execute only once.
  • X-NetSuite-PropertyNameValidation — Sets strictness of property name validation. Options: (empty), Error, Warning, Ignore.
  • X-NetSuite-PropertyValueValidation — Sets strictness of property value validation. Options: (empty), Error, Warning, Ignore.
  • customFields — List of custom field mappings with field name, type, and value to set on the template.

Output shape

The NetSuite API response containing the created email template record, including its internal ID, external ID, and full template details.

Returned data reflects the newly inserted record as per NetSuite REST API behavior.

Examples

Example 1: Create a basic email template for customer communications.

Set name, content (HTML), subject, and recordType to 'Entity'. Execute the operation to insert the template into NetSuite.

Links

Discussion