Exercise 4.4 | Building Updates Automation |
Data | Building footprints (Esri Shapefile) |
Overall Goal | Provide email-driven notifications for updates |
Demonstrates | Email Actions |
Start Workspace | N/A |
End Workspace | N/A |
After configuring an Automation in FME Server to process building footprint updates with both the Directory Watch and Email Triggers, your supervisor is wondering if they can receive an email whenever the corporate database is updated.
Using an external email server, you think that it is possible to configure the existing Automation in FME Server to satisfy this requirement.
FME Lizard says... |
This exercise continues where Exercise 3 left off. You must have completed Exercise 3 to carry out this exercise.
Access to an SMTP Email Server is required for sending email in this exercise. Gmail, Outlook, and Yahoo! are examples of acceptable web-based solutions if you do not have access to an internal email server. |
1) Add External Action
Open the FME Server web interface and navigate to the Automations:Manage page. Click the Incoming Building Footprints and stop the Automation to allow for editing. The final step in the Automation is to add an email service External Action through which a response will be sent.
Select the plus icon in the bottom left and this time drag an External Action (blue) to the canvas. Connect this to the Success (check mark) output port of the Run Workspace node, which will now also act as a Trigger.
Double click on the node to configure it, set the action to send an email and set up your SMTP email server parameters.
In case it is of use, the server information for Gmail is as follows:
SMTP Server Host | smtp.gmail.com |
Server Port | 465 |
Connection Security | SSL/TLS |
There is also the option to load a template for some other Email Servers, if you are unsure what port/host they use. Regardless of the email provider, you should set these parameters as follows:
Email To | (An email you have access to check) |
Email From | Your account name (for example fmeshapeprocessing@gmail.com) |
Email Subject | Building Footprints Database Updated |
Email Body | The Building Footprints database has been updated! |
FME Lizard says... |
For the Email Body parameter click the drop-down arrow and then select Text Editor. This will open a pop-up window that allows you to write email content that also contains information from elements in the Automation. This might be useful for sending out Notifications to an Administrator on Job failure, where you can include the additional details about the Job, such as ID and Status Message in the email body, and the job log as an attachment. |
Before you Apply these parameters validate the Email Server configuration using the Validate button, if FME Server is unable to connect to the email server you can troubleshoot this before finding out after your automation is running.
Enable the Automation by selecting the Start Automation button.
NOTE |
Depending on your Gmail security settings, you may need to create an app-specific password to allow FME Server to log into the account. See this article if you are noticing errors connecting to your account: IMAP Publication or Email Subscription is not Reading Emails from Gmail |
2) Test Automation
Test the Automation by either sending an email with a zip file attachment of the Shapefile datasets (.dbf, .prj, .shp, .shx) from C:\FMEData2019\Data\Engineering\BuildingFootprints, or by adding this collection of files to the Directory Watch as in Exercise 1.
If the workflow was successful, you should receive an email back with a response!
CONGRATULATIONS |
By completing this exercise you have learned how to:
|