Skip to main content
Solved

Using Email trigger message in a Workspace

  • November 15, 2022
  • 3 replies
  • 131 views

dms2
Contributor
Forum|alt.badge.img+11
  • Contributor
  • 48 replies

It's been a while since I last used FME and now it's time to start working with automations  seriously. I need some help to get a quite simple one working though.

 

I'm attempting to do the following: whenever an email from a certain email address and with a certain concept in the subject is received, the email subject and body must be checked and parsed to write a temporary json file that will be uploaded to a server via sftp overwriting the existing file.

 

I already have:

  •  An email trigger with a Subject filter.
  •  A 'Sent from Address' filter action.
  •  A workspace action: AttributeManager and JSONTemplater transformers and a JSON writer get the important information from the subject and content of the email into a json file that is written to FME Server temp directory. 
  • An SFTP Directory external action: reads the json file from FME Server temp directory and writes it to a server.

 

The problem is that we are waiting for imap access to be enabled on the email account so I cannot test the email trigger to see  how will it output a message and decide the approach to read it inside the workspace.

 

I enabled email.subject, email.body and email.from event keys for the  success port. Will the message be a json string or will it be written as a json file inside fme server resource directory? Will it be something like this maybe?

{
"email.subject": "...",
"email.body": "...",
"email.from": "..."
}

 

Thanks.

Best answer by redgeographics

If you set up user parameters on the workspace that processes this you can simply pass the values on.

Screenshot 2022-11-15 at 16.20.03If you want to try this for yourself, the FME Academy module Build Versatile Automations covers this.

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.

3 replies

redgeographics
Celebrity
Forum|alt.badge.img+60
  • Celebrity
  • 3704 replies
  • Best Answer
  • November 15, 2022

If you set up user parameters on the workspace that processes this you can simply pass the values on.

Screenshot 2022-11-15 at 16.20.03If you want to try this for yourself, the FME Academy module Build Versatile Automations covers this.


dms2
Contributor
Forum|alt.badge.img+11
  • Author
  • Contributor
  • 48 replies
  • November 15, 2022

Easier than I thought.

Thanks @Hans van der Maarel​ .


redgeographics
Celebrity
Forum|alt.badge.img+60
  • Celebrity
  • 3704 replies
  • November 16, 2022

Easier than I thought.

Thanks @Hans van der Maarel​ .

You're welcome!