Skip to main content

Elastic Email Data Source

The Elastic Email connector enables you to ingest data from your Elastic Email account—including campaigns, contacts, contact lists, email templates, delivery statistics, and per-email status details—into Nexla data flows. Follow the instructions below to create a new data flow that ingests data from an Elastic Email source in Nexla.
elasticemail_api.png

Elastic Email

Create a New Data Flow

  1. To create a new data flow, navigate to the Integrate section, and click the New Data Flow button. Then, select the desired flow type from the list, and click the Create button.

  2. Select the Elastic Email connector tile from the list of available connectors. Then, select the credential that will be used to connect to the Elastic Email account, and click Next; or, create a new Elastic Email credential for use in this flow.

  3. In Nexla, Elastic Email data sources can be created using pre-built endpoint templates, which expedite source setup for common Elastic Email endpoints. Each template is designed specifically for the corresponding Elastic Email endpoint, making source configuration easy and efficient.
    • To configure this source using a template, follow the instructions in Configure Using a Template.

    Elastic Email sources can also be configured manually, allowing you to ingest data from Elastic Email endpoints not included in the pre-built templates or apply further customizations to exactly suit your needs.
    • To configure this source manually, follow the instructions in Configure Manually.

Configure Using a Template

Nexla provides pre-built templates that can be used to rapidly configure data sources to ingest data from common Elastic Email endpoints. Each template is designed specifically for the corresponding Elastic Email endpoint, making data source setup easy and efficient.

Endpoint Settings

  • Select the endpoint from which this source will fetch data from the Endpoint pulldown menu. Available endpoint templates are listed in the expandable boxes below. Click on an endpoint to see more information about it and how to configure your data source for this endpoint.

List Campaigns

Returns a paginated list of email campaigns in your Elastic Email account. Use this endpoint to ingest campaign metadata—such as campaign names, statuses, and schedules—for reporting, auditing, or synchronization with external systems.

  • This endpoint retrieves all campaigns accessible to the authenticated account. No additional configuration is required beyond selecting this endpoint template.
  • Optionally, enter a name or partial string in the Search field to filter the returned campaigns by name. Leave this field blank to retrieve all campaigns.

  • The endpoint uses incremental offset-based pagination and retrieves up to 100 campaigns per page automatically. Nexla will continue fetching additional pages until no further results are returned.

This endpoint returns campaign-level metadata. To retrieve performance statistics (opens, clicks, bounces) for a specific campaign, use the Get Campaign Statistics by Name endpoint instead.

List Contacts

Returns a paginated list of all contacts stored in your Elastic Email account. Use this endpoint to sync your subscriber or recipient database with external CRM systems, data warehouses, or analytics platforms.

  • This endpoint retrieves all contacts in your account without additional filtering. No parameters beyond the endpoint selection are required.
  • Elastic Email returns contact records including email address, status, custom fields, and consent information. The response is paginated in batches of up to 100 records, and Nexla will automatically retrieve all pages.

Contact status values in Elastic Email include Active, Unsubscribed, Bounced, and Complaint. These values are useful for list hygiene workflows and suppression list management downstream.

List Contact Lists

Returns all contact lists defined in your Elastic Email account. Use this endpoint to inventory your subscriber segments, audit list membership, or feed list metadata into downstream reporting systems.

  • This endpoint returns all contact lists with no required configuration. Select the endpoint and proceed to testing.
  • Each returned record includes the list name, count of contacts, and creation date. Nexla paginates through all available lists automatically.

Get Statistics

Returns aggregated delivery and engagement statistics across all campaigns in your account, including total sends, opens, clicks, bounces, unsubscribes, and complaint counts. Use this endpoint to build high-level performance dashboards or trend reports.

  • This endpoint retrieves account-wide statistics with no required parameters. No additional configuration is needed beyond selecting this endpoint.
  • Statistics are returned in paginated batches. Nexla automatically retrieves all pages until the full dataset has been ingested.

For per-campaign statistics rather than account-wide aggregates, use the Get Campaign Statistics by Name endpoint, which returns metrics scoped to a single named campaign.

List Templates

Returns all email templates stored in your Elastic Email account. Use this endpoint to audit your template library, synchronize templates with an external content management system, or include template metadata in campaign reporting.

  • This endpoint requires no additional parameters. All templates in the account are returned and paginated automatically by Nexla.
  • Each template record includes the template name, subject, body content, and creation metadata.

Get Email Status

Returns the delivery and engagement status of a specific email transaction identified by its Transaction ID. Use this endpoint to track the outcome of a single sent email—for example, to confirm delivery, identify failures, or audit engagement for a specific message in a transactional workflow.

  • Enter the unique identifier of the email transaction in the Transaction ID field. This ID is returned by the Elastic Email API when an email is sent via the /v4/emails or /v4/emails/transactional endpoints. This field is required.

  • The following optional fields control which status categories are included in the response. Set each to true to include that status type, or leave blank to use the Elastic Email API default behavior:

    • Show Failed — Include records for emails that failed to deliver.
    • Show Sent — Include records for emails that were successfully submitted for delivery.
    • Show Delivered — Include records for emails confirmed as delivered to the recipient mail server.
    • Show Pending — Include records for emails that are queued and awaiting delivery.
    • Show Opened — Include records for emails that the recipient has opened.
    • Show Clicked — Include records for emails where the recipient clicked a tracked link.
    • Show Abuse — Include records for emails that generated an abuse or spam complaint.
    • Show Unsubscribed — Include records for emails that triggered an unsubscribe event.
    • Show Errors — Include error detail records for failed delivery attempts.
    • Show Message IDs — Include the internal Elastic Email message IDs in the response records.

Transaction IDs are generated by Elastic Email at send time and should be captured and stored by your sending application for later status lookup. For bulk status information across all transactions, use the Get Statistics endpoint instead.

Get Campaign Statistics by Name

Returns performance statistics for a single named campaign, including sends, opens, clicks, bounces, and unsubscribes. Use this endpoint when you need granular metrics for a specific campaign rather than account-wide aggregates.

  • Enter the exact name of the campaign in the Campaign Name field. Campaign names are case-sensitive and must match the name as it appears in your Elastic Email account under Campaigns. This field is required.

  • The endpoint returns a single statistics record for the specified campaign. No pagination is applied.

Use the List Campaigns endpoint to retrieve a list of campaign names available in your account before configuring this endpoint.

Endpoint Testing

Once the selected endpoint template has been configured, Nexla can retrieve a sample of the data that will be fetched according to the current settings. This allows users to verify that the source is configured correctly before saving.

  • To test the current endpoint configuration, click the Test button to the right of the endpoint selection menu. Sample data will be fetched & displayed in the Endpoint Test Result panel on the right.

  • If the sample data is not as expected, review the selected endpoint and associated settings, and make any necessary adjustments. Then, click the Test button again, and check the sample data to ensure that the correct information is displayed.

Configure Manually

Elastic Email data sources can be manually configured to ingest data from any valid Elastic Email API endpoint. Manual configuration provides maximum flexibility for accessing endpoints not covered by pre-built templates or when you need custom API configurations.

With manual configuration, you can also create more complex Elastic Email sources, such as sources that use chained API calls to fetch data from multiple endpoints or sources that require custom request parameters.

API Method

  1. To manually configure this source, select the Advanced tab at the top of the configuration screen.

  2. Select the API method that will be used for calls to the Elastic Email API from the Method pulldown menu. The most common methods are:

    • GET: For retrieving data from the API (used by all read endpoints in Elastic Email v4)
    • POST: For sending data to the API or triggering actions
    • PUT: For updating existing resources
    • DELETE: For removing resources

API Endpoint URL

  1. Enter the URL of the Elastic Email API endpoint from which this source will fetch data in the Set API URL field. All Elastic Email v4 API endpoints use the base URL https://api.elasticemail.com/v4. For example:

    • https://api.elasticemail.com/v4/contacts — retrieves all contacts
    • https://api.elasticemail.com/v4/campaigns — retrieves all campaigns
    • https://api.elasticemail.com/v4/statistics — retrieves account statistics

    Full API reference documentation is available at the Elastic Email REST API docs.

Ensure the API endpoint URL is correct and accessible with your current credential. You can test the endpoint using the Test button after configuring the URL.

Date/Time Macros (API URL)

Optional

Optionally, the API URL can be customized using macros—all macros added to the API URL will be converted into values when Nexla executes the API call. Macros are dynamic placeholders that allow you to create flexible API endpoints that can adapt to different time periods or data requirements.

Macros are particularly useful for Elastic Email endpoints that accept date range parameters, allowing you to automatically scope data retrieval to a rolling time window on each ingestion run.

  1. To add a macro, type { at the appropriate position in the API URL (within the Set API URL field), and select the desired macro from the dropdown list.

    • {now} – The current datetime
    • {now-1} – The datetime one time unit before the current datetime
    • {now+1} – The datetime one time unit after the current datetime
    • custom – Datetime macros can reference any number of time units before or after the current datetime—for example, enter (now-4) to indicate the datetime four time units before the current datetime
  2. Select the format that will be applied to datetime macros from the Date Format for Date/Time Macro pulldown menu. This format will be applied to the base datetime value of the macro—i.e., the value of {now} in {now-1}.

  3. Select the datetime unit that will be used to perform mathematical operations in the included macro(s) from the Time Unit for Operations pulldown menu—for example, for the macro {now-1}, when Day is selected, {now-1} will be converted to the datetime one day before the current datetime.

Lookup-Based Macros (API URL)

Optional

Column values from existing lookups can also be included as macros in the API URL. Lookup-based macros allow you to reference data from previously configured data sources or lookups, enabling dynamic API endpoints that can adapt based on existing data.

Lookup-based macros are useful when you need to pass dynamic values—such as a campaign name or transaction ID retrieved from another source—directly into the Elastic Email API URL for each ingestion run.

  1. To include a lookup column value macro, select the relevant lookup from the Add Lookups to Supported Macros pulldown menu.

  2. Type { at the appropriate position in the API URL, and select the lookup column-based macro from the dropdown list. Lookup-based macros are automatically populated into the macro list when a lookup is selected in the Add Lookups to Supported Macros pulldown menu.

Path to Data

Optional

If only a subset of the data returned by the API endpoint is needed, you can designate the part(s) of the response that should be included in the Nexset(s) produced from this source by specifying the path to the relevant data within the response. This is particularly useful when API responses contain metadata, pagination information, or wrapper objects that you don't need for your analysis.

For example, the Elastic Email v4 API typically returns top-level arrays for list-style endpoints (e.g., contacts, campaigns). Specifying $[*] as the path instructs Nexla to treat each array element as a separate record.

Path to Data is essential when API responses have nested structures. Without specifying the correct path, Nexla might not be able to properly parse and organize your data into usable records.

  • To specify which data should be treated as relevant in responses from this source, enter the path to the relevant data in the Set Path to Data in Response field.

    • For responses in JSON format enter the JSON path that points to the object or array that should be treated as relevant data. JSON paths use dot notation (e.g., $.data.items[*] to access an array of items within a data object, or $[*] for a top-level array).

    • For responses in XML format, enter the XPath that points to the object/array containing relevant data. XPath uses slash notation (e.g., /response/data/item to access item elements within a data element).

    Path to Data Example:

    If the API response is a top-level JSON array of contact records, enter $[*] as the path so that Nexla treats each element in the array as an individual record.

Autogenerate Path Suggestions

Nexla can also autogenerate data path suggestions based on the response from the API endpoint. These suggested paths can be used as-is or modified to exactly suit your needs.

  • To use this feature, click the Test button next to the Set API URL field to fetch a sample response from the API endpoint. Suggested data paths generated based on the content & format of the response will be displayed in the Suggestions box below the Set Path to Data in Response field.

  • Click on a suggestion to automatically populate the Set Path to Data in Response field with the corresponding path. The populated path can be modified directly within the field if further customization is needed.

    PathSuggestions.png

Metadata

If metadata is included in the response but is located outside of the defined path to relevant data, you can configure Nexla to include this data as common metadata in each record. This is useful when you want to preserve important contextual information that applies to all records but isn't part of the main data array.

Metadata paths are particularly useful for preserving API response context like request timestamps or summary statistics that apply to all records in the response.

  • To specify the location of metadata that should be included with each record, enter the path to the relevant metadata in the Path to Metadata in Response field.

    • For responses in JSON format, enter the JSON path to the object or array that contains the metadata, and for responses in XML format, enter the XPath.

Request Headers

Optional
  • If Nexla should include any additional request headers in API calls to this source, enter the headers & corresponding values as comma-separated pairs in the Request Headers field (e.g., header1:value1,header2:value2). Additional headers may be required for API versioning, content type specifications, or custom request requirements.

    You do not need to include the X-ElasticEmail-ApiKey authentication header or any other headers already present in the credential. Authentication headers are automatically applied by Nexla based on your credential configuration.

Endpoint Testing

After configuring all settings for the selected endpoint, Nexla can retrieve a sample of the data that will be fetched according to the current configuration. This allows users to verify that the source is configured correctly before saving.

  • To test the current endpoint configuration, click the Test button to the right of the endpoint selection menu. Sample data will be fetched & displayed in the Endpoint Test Result panel on the right.

  • If the sample data is not as expected, review the selected endpoint and associated settings, and make any necessary adjustments. Then, click the Test button again, and check the sample data to ensure that the correct information is displayed.

Save & Activate the Source

  1. Once all of the relevant steps in the above sections have been completed, click the Create button in the upper right corner of the screen to save and create the new Elastic Email data source. Nexla will now begin ingesting data from the configured endpoint and will organize any data that it finds into one or more Nexsets.