Skip to main content
Solved

FME Cloud Locating Email Attachment and adding as Parameter

  • March 24, 2018
  • 2 replies
  • 21 views

I am trying to add file reference to a job submitter from an email that come is through the notification service. The email comes in here:

Resources /System /temp/emailattachments/20180323010138-tgsdata@production-tgs.fmecloud.com-test/autocad.dwg

I had use the email attachments before when they came into ${FME_SHAREDRESOURCE_TEMP}/${FME_JOD_ID}

Best answer by takashi

Hi @garydlester, I think an easy way is to configure the workspace as a Notification Service so that it can read the message (including paths of attachments) published by an Email Publisher. See these links to learn about the content of a JSON message from an Email Publisher.

Assuming that you have already created a Topic and an Email Publisher that would publish the Topic, you can create a workspace containing a reader (Text File or JSON) which populates the message from the Email Publisher into the workflow. Add a Text File reader to the workspace, for example, and register it to "Notification Service" with these properties.

  • Subscribe to Topics : <the Topic that will be published by the Email Publisher>
  • Parameter to Get Topic Message : <source dataset parameter of the Text File reader, which should read the JSON message from the Email Publisher>

Once you published the workspace to the FME Server with settings above, the FME Server automatically generates a Subscriber (workspace type), which subscribes the Topic and triggers the workspace.

With the configuration above, the workspace will be run whenever the Email Publisher meets an email, so you can implement a workflow in the workspace in order to extract the paths of attachments from the JSON message and do something with them.

Hope this helps.

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

2 replies

takashi
Celebrity
  • 7843 replies
  • Best Answer
  • March 25, 2018

Hi @garydlester, I think an easy way is to configure the workspace as a Notification Service so that it can read the message (including paths of attachments) published by an Email Publisher. See these links to learn about the content of a JSON message from an Email Publisher.

Assuming that you have already created a Topic and an Email Publisher that would publish the Topic, you can create a workspace containing a reader (Text File or JSON) which populates the message from the Email Publisher into the workflow. Add a Text File reader to the workspace, for example, and register it to "Notification Service" with these properties.

  • Subscribe to Topics : <the Topic that will be published by the Email Publisher>
  • Parameter to Get Topic Message : <source dataset parameter of the Text File reader, which should read the JSON message from the Email Publisher>

Once you published the workspace to the FME Server with settings above, the FME Server automatically generates a Subscriber (workspace type), which subscribes the Topic and triggers the workspace.

With the configuration above, the workspace will be run whenever the Email Publisher meets an email, so you can implement a workflow in the workspace in order to extract the paths of attachments from the JSON message and do something with them.

Hope this helps.


  • Author
  • 57 replies
  • March 25, 2018

Thank you that works, @takashi