Skip to main content
Solved

FME Cloud Locating Email Attachment and adding as Parameter


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.

View original
Did this help you find an answer to your question?

2 replies

takashi
Contributor
Forum|alt.badge.img+19
  • Contributor
  • 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.


Thank you that works, @takashi


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings