Sending Email in FME: FME Workbench vs. FME Flow

Liz Sanderson
Liz Sanderson
  • Updated

Introduction

FME has the capability to send email notifications to an external client, and this can either be done using the Emailer transformer in FME Workbench or using the Email Action in Automations on FME Flow (formerly FME Server). This article aims to provide an overview of why you may choose to use one method over the other depending on your use case.
 

Who, What, When, Where, Why?

At first glance, the functionality across the two techniques appears similar, as visually they have almost identical parameters. However, when considering which option is most suitable for your project, there are a number of questions you can start to ask which may help determine the method to use.

  • Who do you want to receive the email?
  • What does the email body contain, is the message static text or dynamic?
    • Attribute information?
    • Job information?
    • Attachments?
  • When in the translation do you want to send the email?
  • Why are you sending the email?
  • Do you even need to run a workspace?

 

EmailerVSEmailAction.png

Emailer vs. Email Action Parameters

 

Advantages of the Emailer

Easily upgraded

The Emailer is a packaged-based transformer within FME Workbench. With the Emailer being package-based, it can be updated outside of a FME release should any changes to services occur, such as a Gmail connection. For information on how to upgrade a package-based transformer see the FME Packages FAQ
 

Include attribute values in the email body

Using the Emailer transformer means you can pass attribute values into the email body. For example, you could use the HTMLReportGenerator and include the html_content attribute to display a prettified report in the email body as opposed to an attachment.

 

Send email during translation

The Emailer will send an email as soon as a feature reaches the transformer, whereas the Email in Automations will only be triggered once the workspace translation has been completed. This provides additional control over which scenarios an email is actually sent out.

 

Create presets for SMTP settings

If you require a large number of workspaces to send emails, transformers allow you to save parameter settings as Presets. This means that you only need to configure your Email SMTP settings once, and going forward can simply reference this preset.

 

Keep all components contained in a single workspace

Depending on your personal preference, you may prefer to use the Emailer so that everything relating to that workspace is kept together in a single workflow.

 

Workspace can be run on FME Form

If this workspace will continue to be run manually as well as through FME Flow, then you may choose to use the Emailer so that you get the same result in each platform.
 

Save email as a draft to send later

The functionality of saving an email as a draft is available in the Emailer versions 3.3.1+ (Gmail) and 3.4.1+ (Microsoft) of the safe.emailer.Emailer package. The Emailer package is available for FME 2020.0 and newer. Saving the email as a draft instead of sending the email automatically enables the user to manually send the email later or use the email service (Gmail or Microsoft) scheduling tools to send the email after a manual review. Please see the Upgrading a Package section in FME Packages FAQ for steps on how to upgrade an existing Emailer in FME Workbench and for steps to updating packages on FME Flow. Note this functionality is only available for the Gmail and Microsoft email services. 
Emailer_Save.png

Emailer Request Action Parameter

Advantages of Email Action

For step-by-step instructions on how to use the Email Action, see the Send Email from Automations

Include Job information

By sending the email after the job has finished, you have access to additional parameters such as the job, id, status message, time submitted/finished, and the job log.

 

Free up engines

Using the Email Action allows the workspace to finish and frees up the engine it was using ready to start processing the next queued job.

 

Send an email from a trigger with no workspace

Using Automations, you can send emails directly in response to a trigger without the need to even run a workspace, this may be particularly useful for FME Flow Administrators who would like to monitor events that take place on the system. 

 

Easier to maintain

Once a workspace has been published to FME Flow, the parameters can no longer be edited, therefore if there were any changes to the email parameters, for example, the sender credentials, you would have to download, modify and republish the workspace. By using the Email action, you can manage the configuration through the Web UI.

 

Creates separation in a workflow

By setting up the Email Action, you are not confining the email to a single workflow. You may find this preferable as you can easily identify how things are linked together through the Web UI. It also means you can configure multiple workspaces to use the same email action.

 

Quick Comparison Chart

What?
Emailer
Email Action
Include attribute values in email
Y
Y - in FME 2020+
Send email during translation
Y
Y - in FME 2020+
Send multiple attachments
Y
Y - in FME 2022.1
Send job information
N
Y
Email configuration presets
Y
Keep all actions contained in a single workflow
N
Y
Send email without running a workspace
N
Y
Email configuration manageable through Web UI
N
Y
Save email as a draftY -
 version 3.4.1+ (Microsoft & Gmail)
version 3.3.1+ (Gmail only)
N

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.