Better Email Q&A

Posted on
Wed Nov 29, 2017 9:27 pm
emergent offline
Posts: 18
Joined: Aug 30, 2013

Re: Better Email Q&A

Is there a way I can send an email to the email account I have set up for Indigo and have it set the time fora scheduled event?

My fiance's schedule is varying for the next few months and I want her to be able to send an email with the subject "Coffee" and the body to be the time she wants the coffee maker to start "6:00am". Is this possible to do with this plugin?

Posted on
Thu Nov 30, 2017 10:58 am
FlyingDiver offline
Posts: 2399
Joined: Jun 07, 2014
Location: Cape Coral, FL

Re: Better Email Q&A

BetterEmail can receive the email and parse out the subject line and message body. So it's no problem triggering an event when the subject line matches.

The problem is that I don't know of any way for trigger actions to change the scheduled time for an event. There are no actions in the client UI for changing a scheduled event, and according to http://wiki.indigodomo.com/doku.php?id= ... _reference, IOM access to indigo.schedule.* is not yet implemented.

Anyone have any ideas on actually creating or modifying the time for a scheduled event?

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Thu Nov 30, 2017 11:40 am
jay (support) offline
Site Admin
User avatar
Posts: 14532
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Better Email Q&A

If you truly need a completely arbitrary time, then you'd need to revert to AppleScript for the time being.

I would suggest, however, that you might be able to create a few "options" for fixed times: you would the create schedules for each time period but disable them. Then when the email arrives that says, say, "6am" in the body. Then you'd enable the 6am schedule and disable the others.

This could in fact be done just by naming an Action Group "6am", so the only action BetterEmail would have to take would be to execute the action group named in the body of the email. The Action Group itself would then manage the enable/disable for the appropriate schedules.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Wed Jan 03, 2018 5:37 am
dlmills27 offline
Posts: 3
Joined: Dec 31, 2017

Re: Better Email Q&A

Hi all, and happy new year!

I am a new user to indigo 7 (have had previous versions in the past, then went to smartthings, and now I am back) but managing to navigate my way through a lot of integrations through the resources out there.

I have become stuck on one issue however and need some advice please.

I want to integrate google home into my indigo setup and have decided to take the the following route:

GOOGLE HOME COMMAND ->IFFTT -> GMAIL > INDIGO -> TRIGGER ACTION

I have this working using the better email pluggin (thanks flyingdiver!) but I cannot seem to avoid the 1 minute time lag set by default in indigo preferences for email scanning. I have Gmail set to IMAP.

I fully appreciate that due to the IFTTT integration there will always be some delay but I am fine with this as I only really need it for triggers and can live with a 10 sec ish delay on those, but 1 minute seems too long.

Any suggestions of how I can do instantaneous email scanning to avoid this?

Thanks in advance!!

Posted on
Wed Jan 03, 2018 7:26 am
FlyingDiver offline
Posts: 2399
Joined: Jun 07, 2014
Location: Cape Coral, FL

Re: Better Email Q&A

Turn on the IDLE option in the IMAP setup and you don't need to scan at all.

However, a better method for IFTTT integration is viewtopic.php?f=216&t=17281

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Wed Jan 03, 2018 7:53 am
dlmills27 offline
Posts: 3
Joined: Dec 31, 2017

Re: Better Email Q&A

Thanks - is this in the Gmail settings, or in the pluggin? Also in the email scanning setup native to indigo under preferences do I set the box to scan every 1 minute or leave it unchecked?

All may irrelevant now though thanks to your other suggestion which I already have successfully working with my microbot pushes through IFTTT but stupidly didn't think to take the same approach here! :roll:

Posted on
Wed Jan 03, 2018 7:57 am
FlyingDiver offline
Posts: 2399
Joined: Jun 07, 2014
Location: Cape Coral, FL

Re: Better Email Q&A

dlmills27 wrote:
Thanks - is this in the Gmail settings, or in the pluggin? Also in the email scanning setup native to indigo under preferences do I set the box to scan every 1 minute or leave it unchecked?


It's in the config for the IMAP device you create. There's no IDLE option in Gmail's settings.

If you're using BetterEmail, you don't need to configure anything in Indigo's email preferences.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Wed Jan 03, 2018 10:16 am
dlmills27 offline
Posts: 3
Joined: Dec 31, 2017

Re: Better Email Q&A

Great thanks

Posted on
Mon Jan 15, 2018 4:21 am
ghenne offline
Posts: 14
Joined: Nov 08, 2007

Re: Better Email Q&A

I'd like to use an incoming email to trigger an AppleScript. In the script, I would like to use messageText from messageReceived.

Is that something I can do using Better Email?

Posted on
Mon Jan 15, 2018 7:18 am
FlyingDiver offline
Posts: 2399
Joined: Jun 07, 2014
Location: Cape Coral, FL

Re: Better Email Q&A

ghenne wrote:
I'd like to use an incoming email to trigger an AppleScript. In the script, I would like to use messageText from messageReceived.

Is that something I can do using Better Email?


Probably, but since I don't do AppleScript I have no idea what the AS syntax would be. messageText is a state of the incoming mail device (either a POP device or an IMAP device).

But AppleScript is deprecated and you should probably use Python instead if at all possible.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Mon Jan 15, 2018 9:00 am
ghenne offline
Posts: 14
Joined: Nov 08, 2007

Re: Better Email Q&A

I need to instrument another app, so AppleScript is probably still the best tool for that. (I'd rather use Python, too!)

Is there more documentation on how Better Email works? I see the option to select it in Trigger Actions, but I'm not sure what happens when I do. How would an AppleScript (or Python script) be kicked off?

Posted on
Mon Jan 15, 2018 9:05 am
FlyingDiver offline
Posts: 2399
Joined: Jun 07, 2014
Location: Cape Coral, FL

Re: Better Email Q&A

ghenne wrote:
I need to instrument another app, so AppleScript is probably still the best tool for that. (I'd rather use Python, too!)

Is there more documentation on how Better Email works? I see the option to select it in Trigger Actions, but I'm not sure what happens when I do. How would an AppleScript (or Python script) be kicked off?


You create a trigger event, selecting either String Match or Regex match depending on the complexity of the string matching you're doing. Then in the "Edit Event" dialog you select the field you want to match against and the string your looking for. All that does is cause the trigger to fire when the correct email is detected. Then you use the "run script" server action in the actions list.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Mon Jan 15, 2018 3:28 pm
ghenne offline
Posts: 14
Joined: Nov 08, 2007

Re: Better Email Q&A

Thanks - I was able to set things up just as you specified.

- Do anyone have a sample AppleScript? I'm trying to access messageReceived or messageText somehow, but they are not in the dictionary.

- My condition (Message From = xxx@yyy.com) isn't getting triggered. The log shows the plugin was started, but nothing when the email comes in, even with debugging enabled.

I'm running BetterMail 1.2.14 with Indigo 6.1.11

Posted on
Mon Jan 15, 2018 3:30 pm
FlyingDiver offline
Posts: 2399
Joined: Jun 07, 2014
Location: Cape Coral, FL

Re: Better Email Q&A

If you're not seeing anything in the debug log, how do you know the email was received (by the plugin)?

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Mon Jan 15, 2018 4:03 pm
ghenne offline
Posts: 14
Joined: Nov 08, 2007

Re: Better Email Q&A

FlyingDiver wrote:
If you're not seeing anything in the debug log, how do you know the email was received (by the plugin)?


I see Email Scanned messages.

Code: Select all
Jan 15, 2018 at 5:20:05 AM
  Email Scanned                   from "service@intl.paypal.com"; subject "Payment Skipped"

Who is online

Users browsing this forum: No registered users and 0 guests