Question

Sending processed subscriber_content from topic into email (Server)

  • 19 August 2019
  • 1 reply
  • 2 views

Badge +1

I am using a Survey123 survey to trigger a topic on server when a new survey submission is received. The topic, in turn, triggers a workspace which takes in the subscriber_content (containing the survey submission content) and parses it out via some JSON extractors to grab specific survey fields and process them a particular way. What I want is for the same topic to trigger an email in server, sending along the processed subscriber_content. Currently, I am not able to use an emailer inside the workspace to do this -- needs to be a part of the automation itself. How can I make this happen?

Example/detail: The workspace processes the subscriber_content to extract attributes of buildingID, floorName, and roomName. I want the automation to also send an email containing the buildingID, floorName, and roomName in a readable format -- ie, not the raw JSON subscriber_content


1 reply

Badge +2

Hi @jdmiller95,

Currently the Topic Message will only list the raw JSON as unlike the other Automation Triggers it does not know how the JSON is formatted therefore a workspace is required to break down and extract these attributes. Therefore in order to perform your task I think the best option is to use the Emailer transformer, I'm curious as to why this is not a possibility for you?

You have stumbled into a limitation of the new automations feature, whereby it is not yes possible to pass information out of a workspace for further processing downstream the automation workflow. We are currently investigating what our options are to best meet this demand and I recommend adding your vote to this idea to express your need for this.

The only other alternative that comes to mind would be if you were to consider using the old Notifications method. In this case you could use Notification Directives - in simplest terms these are attributes/parameters with a specific naming convention that allows them to be used in an email subscriber like other email template keywords.

  1. In your workspace after you have extracted the attributes, use an AttributeCreator to compose the Email body. Name the new attribute nm_<attributename>
  2. Add an FMEServerNotifier with the Content parameter set to the nm_<attributename>. The topic to be notified must be different from the topic Survey123 is reporting to so you will need to go into FME Server to create this.
  3. In FME Server create a new Subscriber using the Email protocol. Configure the Email parameters and for the Email body set the value to {nm_<attributename>}

As you can see the Emailer would certainly be the simpler method, but let me know if you have any questions with regard to using Notification Directives and I'll be happy to help further.

Reply