Solved

Trigger a bot from Email

  • 12 July 2019
  • 4 replies
  • 42 views

Badge +17

Is it possible to trigger a bot to start when a new email comes into my inbox if I'm using outlook or Gmail and the browser is constantly open?

 

icon

Best answer by mbalslow 24 July 2019, 20:47

View original

4 replies

Userlevel 6
Badge +15

I wonder if you could schedule it to run every hour or so and check for new / unread items and trigger from that? Or even every 15minutes. I'm curious, too!

@eharris04,


 


This is possible - check this article out for inspiration: https://support.foxtrotalliance.com/hc/en-us/articles/360018207251


If that is not exactly what you are looking for, let me know, and we can assist you to achieve specifically what you need.

Hey @eharris04 and @rhia 


 


I'll just add my 2 cents here.


 


Strictly within Foxtrot itself, you've got 2 options here: running continously or checking periodically.


 


Running continously


With this, you'd essentially have a machine with a botflow running in a big loop.


 


Checking Periodically


Within FoxHub, you can schedule the botflow to run every 5/10/15/30 minutes to check for new emails to process.


 


Either way, you would use Foxtrot's built in IMAP connection with a 'Get Email' action and then 'Loop Email' to go through the emails it pulls in. Within the 'Loop Email', you can utilize Loop tokens to access elements from the email itself, such as Subject, Body and Sender.


 


Using Foxtrot's built in Email Connections eliminates the need to interact with Outlook's or Gmail's interface, and doesn't require any advanced coding.


 


If you're comfortable with it, you can definitely setup the code in Outlook based on what @mbalslow  recommended as well to utilize FoxHub's File Triggers. However, I am not sure how this would work if you're looking for attachments or need to extract specific text from the email.


 


Let me know if you've got any more questions or need clarification! :smileyhappy:

@john_armstrong,


 


Just to clarify, the mentioned solution won't do anything else than wait for an email to arrive and produce a file in a folder that would trigger a FoxHub job using the File Trigger. All the work of getting the email, reading it, downloading attachments, etc. is something you would do normally. The solution simply make sure to place a file and trigger a job when an email arrives.

Reply