Send email output - get recipients from feature layer

497
1
02-24-2021 09:12 AM
GeoSolver
New Contributor III

I wasn't able to find a processor included in GeoEvent Server that meets the following requirement.  Hopefully there is a processor available for download that does.

I have an input that polls a feature service.  I need this geoevent to trigger an output that sends an email to about 900 recipients.  All of the recipient email addresses are stored in a hosted feature layer.  I was not able to use a geofence in this case because there is no spatial relationship between the new feature that triggers the geoevent and the feature layer that holds all of the recipients.  So the scenario is simply this:

Every time a new polygon is added to the input feature service, an email needs to be sent for every record in the feature layer that holds all the recipient data.

Are there any processors or combinations of processors that can meet this need?

0 Kudos
1 Reply
EricIronside
Esri Regular Contributor

Hey @GeoSolver 

You could export a list of email addresses to a file and use a Feild Enricher (File) to add the emails to a recipient field. So the file would contain one record "1,<longlistofemails>". Your event would need to have 2 fields added to it 'joinId' and 'emailAddresses'. Use a field calculator to set the 'joinId' field to 1.  The Field Enricher (File) to join the email list then joins based on the 'joinId' field (which is set to 1 which matches the first row in the file).  

If the file with all the emails is too hard to maintain (for example if they change often) then you might be able to do the same thing on your feature layer but it might require a relational database. 

SELECT 1 as OBJECTID, STRING_AGG(email, ';') AS emailAddresses
FROM Customers;

Not sure what 9,000 emails concatenated together is going to do to GeoEvent.

Best,

Eric 

0 Kudos