AquaMail Forum

English - Android => How do I... => Topic started by: hnn on July 17, 2013, 09:27:12 am

Title: Integration with Tasker
Post by: hnn on July 17, 2013, 09:27:12 am
What a great product! But I can not figure out the integration with Tasker.

The only function i find is the Action Plugin Aquamail settings. But I want to check email or receive an event just like I can do with K-9 mail.
Title: Re: Integration with Tasker
Post by: Thomas on July 18, 2013, 12:18:21 am
The settings you have when you access the plugin in Tasker itself. There you plenty of options and settings.
Title: Re: Integration with Tasker
Post by: Rachel Ambler on July 18, 2013, 07:31:21 am
You sure?

I'm not finding much in the of State or Event triggers available in Tasker.

I have a task that tells my tablet to refresh email when it comes in on my phone (so I only have one set of push subscriptions) and I ended up having to use the standard Notification event to trigger it.

Am I missing something?

R

Sent from my SCH-I535 using Tapatalk 2

Title: Re: Integration with Tasker
Post by: Thomas on July 19, 2013, 02:29:56 am
Ah you mean a direct integration of AquMail into Tasker. like K9 and some view others. That is not the case and would be a cooperation between Tasker and AM. You should also ask in the Tasker forum for that as it may be more work from that side. But i like that idea.

For now the tasker plugin triggers an action in AquaMail after a certain event, state, time,etc. took place.

Title: Re: Integration with Tasker
Post by: hnn on July 19, 2013, 08:20:50 pm
But why does it say on the Aquamail description on Google Play:

"Integration with Tasker (change settings, trigger mail check)."

It sounds like somebody has made some sort of integration... But how does one then trigger mail check?
Title: Re: Integration with Tasker
Post by: Thomas on July 19, 2013, 08:28:58 pm
But why does it say on the Aquamail description on Google Play:

"Integration with Tasker (change settings, trigger mail check)."
That is correct.
You can set an event (for example at a certain time, date, event) in Tasker  and in the new task you use the AM plugin. There you can trigger change settings, trigger email check etc.) The plugin works for tasks not for the event, time, etc.
Title: Re: Integration with Tasker
Post by: Rachel Ambler on July 20, 2013, 12:17:25 am
But why does it say on the Aquamail description on Google Play:

"Integration with Tasker (change settings, trigger mail check)."

It sounds like somebody has made some sort of integration... But how does one then trigger mail check?

Create your Event in Tasker, then Select PlugIn, AquaMail Settings then press Edit on Configuration.

Scroll all the way down to the bottom of the settings dialog and you'll have Actions listed : Press Check mail then select which accounts you want to check for.

Not the most obvious I know, but it does work!

R
Title: Re: Integration with Tasker
Post by: jdbecker on September 23, 2013, 12:44:47 am
All that happens is a forced update in AquaMail. I really need to get the information about the latest email. Data like sender, subject, attached files, and ics file data for meetings, like starting and ending times,location, and meeting title.
Title: Re: Integration with Tasker
Post by: Kostya Vasilyev on September 26, 2013, 02:39:03 am
Providing access to message data via Tasker is something that I've been having trouble getting to, for a long time, sorry.
Title: Re: Integration with Tasker
Post by: Rachel Ambler on September 26, 2013, 08:42:59 am
Damn you and your insistence to have but a single head and only one pair of hands.

You sure we can't graft something extra on to you?

I'd comment about you taking time off to sleep but I'm not sure if you do sleep these days.

So, is better Tasker interaction on the "long term" radar or the "someday never" radar?

Sent from my SCH-I535 using Tapatalk 4
Title: Re: Integration with Tasker
Post by: mabahj on June 04, 2014, 10:53:26 am
Picking up this old thread, since I just got my Pebble smart watch.

To me, it would be very useful if you could add a Tasker e-mail event plugin or whatever is needed. With email title, sender, content, etc. The Pebble ecosystem has no knowledge of your very fine AquaMail, so the only way to get AquaMail email notification to the Pebble is to get Tasker to monitor for notifications from AqualMail. Unfortunatelyg, the Android system only allows Tasker to read the title of a notification, not the content, according to what I've read. So when I get a new email, my Pebble (through Tasker and a Pebble notification plugin) only tells me that I have "28 unread messages in Smart Folder". Nothing about the new email I just got. It would be very nice if I could get information about the latest email(s) on my Pebbble, without having to switch to another email app.

[Insert standard disclaimer about my appreciation of AquaMail, and that I would not replace it with any other email app, even if this feature is not added.]
Title: Re: Integration with Tasker
Post by: Kostya Vasilyev on June 06, 2014, 01:56:04 am
Ok. This is still somewhere on my to-do -- and it's downright embarrassing that I've not gotten around to it yet.

Re: direct Pebble support -- if I'm going to take the time to dive into an entirely unfamiliar development ecosystem, it's going to be Samsung's Gear 2 and its Tizen.

Re: Tasker -- I'd appreciate an email (kmansoft / gmail) explaining how Tasker event triggers work, and how you can access variables from them (you'd mentioned being able to read the title of a notification).

I should also mention that Aqua has an API for third party notification enhancement apps.

If there is someone out there who's trying to create some sort of "Easy and powerful notification center for your Pebble watch" (why not?), I'd be happy to talk to them.
Title: Re: Integration with Tasker
Post by: mabahj on June 10, 2014, 11:57:07 pm
Thanks for the good news!

With regards to Tasker integration. I am sorry, but I have nothing that would help you there. You already have some configuration integration, so you are far ahead of me. I assume you have managed to Google your way to this: http://tasker.dinglisch.net/plugins.html

I contacted "Glance for Pebble" developer regarding your API. I believe that Glance is one of the more popular easy and powerful notification centers for Pebble watches. I has K9-Mail support, but you know - who want that?
Title: Re: Integration with Tasker
Post by: Kostya Vasilyev on June 11, 2014, 01:45:02 am
@mabahj --

Thanks for emailing the developer of Glance for Pebble. I'll be happy to provide API details if he contacts me.

About Tasker -- yes, I've seen that page, but was unable to figure out condition-based events before... Looks like he has some new documentation up there now, we'll see...
Title: Re: Integration with Tasker
Post by: Kostya Vasilyev on June 11, 2014, 03:55:12 pm
I was contacted by developer of Glance for Pebble today. Hooray!
Title: Re: Integration with Tasker
Post by: mabahj on June 12, 2014, 07:53:39 pm
Great! :-)

Sent fra min One via Tapatalk

Title: Re: Integration with Tasker
Post by: Kostya Vasilyev on June 23, 2014, 08:46:59 pm
About Tasker:

I've often gotten comments about how great Tasker support is in K9 Mail.

Is this it, from Tasker user docs?

http://tasker.dinglisch.net/userguide/en/variables.html

Quote
Email From / Cc / Subject / Date / Time (dynamic)
%EFROM / %ECC / %ESUBJ / %EDATE / %ETIME
The From, Cc, Subject, Received Date and Received Time of the last email received by the K9 email agent.

I've searched K9 source code for Tasker support, and found nothing. Looks like K9 support is built into Tasker, not the other way around.

Can anyone who've used K9 with Tasker comment on this?
Title: Re: Integration with Tasker
Post by: Kostya Vasilyev on June 23, 2014, 09:52:20 pm
Answering my own quesiton:

Ok, so K9 support is built into Tasker itself.

It has a problem: only data from the most recently received message is available.

If I were to write a plugin for Tasker as part of Aqua, I'd be able to make data from multiple messages available.

But overall, events from Aqua would not be seen in Tasker in exactly the same way as K9 events.

What are people looking for? Add events in Tasker based on message sender / cc / subject?

Title: Re: Integration with Tasker
Post by: Kostya Vasilyev on June 24, 2014, 10:39:57 pm
I am in the process of getting something to work, but...

...is there any interest in this? Should I continue?
Title: Re: Integration with Tasker
Post by: pyler on June 25, 2014, 02:50:37 pm
Yes!
And you should relax and watch Google I/O :P
Title: Re: Integration with Tasker
Post by: mabahj on June 25, 2014, 03:25:49 pm
My main need is to get the unread message count from AquaMail on my Pebble. And it looks like the Glance developer may work on that.

This, however, limits me (and others) to use Glance. If this information could be available in Tasker, then it would give us more flexibility.

And the actual email content Pebble can get from AquaMail is limited to the notification content. I would love to be able to read the entire message, delete it, move it to spam or archive it. This would require a bigger email client for the Pebble, which is too much to ask. However, there are several Tasker clients available , and if this information and these features (or a subset thereof) could be available in Tasker, then I can script most of the rest. I would assume that this would be useful for others trying to get AquaMail info into other gadgets and services.

So, to summarise, my prioritised wish list is:
1. Full AquaMail client on my Pebble, with predefined answers I can choose from. (I know, but it is still the top wish. :-))
2. Unread message count (probably Smart Folder) in Tasker
3. Arrived message notification/event in Tasker with message content available.
4. Ability to do something with that message. (mark read, delete, move to spam, move to archive, maybe a simple reply)

Regarding getting all the messages: I understand why you think that is better, but in my mind it would not be the best use of your resources, at least when it comes to smart watches and similar devices. They are very much focused on passive content consumption, as it happens. You get a notification, and you decide on what you want to do - dismiss or maybe send a simple reply. Or pick up the phone. I can read my older text messages on my Pebble but I never do. I have already consumed that information and the small screen is not really ideal for mailbox cleanup and things like that. My two cents.

Best regards,
Markus
Title: Re: Integration with Tasker
Post by: pyler on June 26, 2014, 08:23:16 am
Yes!
And you should relax and watch Google I/O :P

Something for you
http://www.androidpolice.com/2014/06/25/io-2014-google-announces-the-gmail-api-promises-much-faster-performance-than-imap/
Title: Re: Integration with Tasker
Post by: Kostya Vasilyev on June 26, 2014, 07:00:59 pm
Well, I really don't think that using Tasker as a bridge for notifications is a good way to go about it.

If a Pebble app developer wants to support notifications from Aqua, they should either have their own API or use Aqua's.

This has worked remarkably well with Apex Launcher, Nova Launcher, LightFlow, other notification enhancement apps. There is no reason it can't work for the Pebble, but the one important thing is --

-- whether these developers have any interest in integrating with Aqua.

The developers of the apps I mentioned above did have interest, or responded to my queries about how I could integrate.

"It takes two to tango", you know.

About other kinds of things that could be useful (and I don't quite know the scenarios, since I don't personally use Tasker for anything):

I kept hearing that K9 integration in Tasker is really really great.

Well, I checked it out. It provides access to data from one and only one most recent message. The data is things like sender, subject... etc but not message text.

I already have things like sender / subject / to / CC  / folder name / account name working, as an Event plugin. You can set triggers on text matches in header fields.

So it's up to K9 level but without the "one and only one message" limitation (there are some others, but they won't be addressed in Tasker 4.4...)

Event plugins are new in Tasker 4.4, which is currently in beta. So the only questions, for me, are about when / how to release this, also considering that 1.4 is still not fully rolled out.

I could wait for Tasker 4.4 to be fully released, then do a 1.4.1 update, while keeping working on new features for 1.5. That's one possible scenario to think about.
Title: Re: Integration with Tasker
Post by: Kostya Vasilyev on June 26, 2014, 07:21:39 pm
About the new Gmail API.

I've only gotten half a dozen queries about it today :)

It says right here:

https://developers.google.com/gmail/api/

Quote
Note: The Gmail API should not be used to replace IMAP for full-fledged email client access. Instead, see IMAP and SMTP.

About performance:

There is no reason IMAP can't be fast. Gmail's is a bit on the slow side, although not that bad (Outlook.com is noticeably worse).

Maybe Google needs to send someone to apprentice at Fastmail.fm

And one other thing: maybe they (Google) can finally fix their IMAP IDLE (push) implementation, which is incomplete since 2007, not sending message state changes.

Oh wait, that's not something new and shiny, going back and fixing stuff is mundane and difficult. Besides, the Android Gmail app doesn't use IMAP, and so it gets state changes just fine.

From the article you linked:

Quote
[ the new API] because it no longer uses TCP / SMTP

No longer uses TCP... And what, pray tell, does REST HTTP traffic run on top of, if not TCP/IP?

Title: Re: Integration with Tasker
Post by: Scott_Miller on June 27, 2014, 07:56:06 pm

What are people looking for? Add events in Tasker based on message sender / cc / subject?

I think you've got this right. Tasker users would want to trigger an action or series of actions based on receiving an email with a specific (wildcard matching exists in Tasker) subject, sender, recipient,  body content, etc. Anything that could be unique enough to reliably be seen as an event.

For example, as an IT professional, I rely on a monitoring system to tell me when something is not working. It can notify me by email. I would configure Tasker to provide some really obnoxious alarm when that email is received, so I don't ignore it. But other email would pass by without any Tasker intervention.

It could also be used to help create an autoresponder, for example when driving, to let specific people know you will respond later when it is safe.

I currently use Maildroid. I don't like K9. But K9 is the only email that has any integration with Tasker, and that was done by the developer of Tasker, probably as an example to show what is possible. Having this capability with Aqua Mail would probably make me switch, and I suspect, others, as well.

Thanks for pursuing this.

Scott

Title: Re: Integration with Tasker
Post by: Kostya Vasilyev on June 29, 2014, 01:58:47 am
K9 Mail integration is indeed built into Tasker.

Starting with Tasker 4.4 (currently in beta), there is a way to implement this type of thing as a plugin, and it can actually be better in some ways.

I already have it working in Aqua, on a separate code branch.

It's possible to match messages on: from / to / cc / subject / priority / account.

No matching for message body, might be added later or maybe not (since the user may have Aqua only load message headers and no text when checking mail).

The plugin sets variables from a matched message: from / to / cc, account name, folder name, etc.

Now as to when it's going to be released, and how -- after I'm done with rolling out 1.4.0, and probably after Tasker 4.4 is actually released.

I also posted a detailed message on Tasker users mailing list here:

https://groups.google.com/forum/#!msg/tasker/ptRmSJcZ6Es/VDs6RBhF4aQJ

Some screenshots, sorry about their large sizes.
Title: Re: Integration with Tasker
Post by: Scott_Miller on June 29, 2014, 05:20:48 am
Thanks. I did see your comments in the Tasker thread. That's what lead me here. I have been a Tasker user for several years, including the betas. I am using the 4.4 beta.

I am very much encouraged by your willingness to implement the event plugin. It's been needed for a long time. I had a thought earlier, and wanted to mention it as another idea. I believe it's possible to set an importance flag on a message. This may also be useful as a query in Tasker. It's just a suggestion, for what it's worth.

Thanks again, and I'll keep watching for the next release. By the way, I'm getting accustomed to AquaMail, and I do like what I see.

Scott

Title: Re: Integration with Tasker
Post by: pyler on June 29, 2014, 01:47:00 pm
Will be possible force mail check by Tasker?
Title: Re: Integration with Tasker
Post by: mabahj on June 29, 2014, 03:16:58 pm
Will be possible force mail check by Tasker?
I believe that this is already supported. Create a task and select the AquaMail plugin. Scroll down the configuration list and look at Check mail almost at the bottom. I have not tried this myself so I could be wrong.
Title: Re: Integration with Tasker
Post by: Kostya Vasilyev on June 29, 2014, 04:33:34 pm
Yes, triggering a mail check, as well as changing the app's settings (e.g. mail check frequency, enabling or disabling push) has been possible since... forever.

As @mabahj said -- be sure to look under Plugins, not built-in Tasker actions.

On the other hand, Pent said something about moving Aqua's plugins into a better place in his menu hierarchies.
Title: Re: Integration with Tasker
Post by: Scott_Miller on June 29, 2014, 09:31:53 pm
On the other hand, Pent said something about moving Aqua's plugins into a better place in his menu hierarchies.

He was referring to including it in a built-in help pop-up that suggests available and popular plug-ins to the user. I think it includes links to the Play store. The plugin category is still the correct place to find it when using it within Tasker.

Scott

Title: Re: Integration with Tasker
Post by: Kostya Vasilyev on June 30, 2014, 02:30:12 am
Ok, thanks for clarifying.

I'm not a power user by any means, my personal computing needs would be adequately served by Android 2.1 :)
Title: Re: Integration with Tasker
Post by: Rachel Ambler on July 02, 2014, 04:26:24 am
With apologies for not having seen this reawakening of the thread sooner, Here's my 2c...

Over the last umpteen months I've seen numerous posts from folk asking for rules and other sort of stuff to be built into AquaMail and once always thought that this would be ideally suited to be handled by Tasker. Events are part of that, being able to communicate back to AquaMail would be another (to do things like move emails to folders, reply, Yada Yada Yada).

That said, even what's currently available is most excellent!

Sent by Tapatalk Pro running my rooted Big Red HTC One M8
Title: Re: Integration with Tasker
Post by: Kostya Vasilyev on July 02, 2014, 03:58:03 pm
Externalizing the internal logic of the app's message processing pipeline just does not seem like a good idea.

( Do I sound like a speaker at an Enterprise Cloud Storage Scalability Clustering conference? )

The Tasker Event API is amazing (I was able to get the plugin to work in two days, while managing the rollout at the same time) -- but it does have some awkward parts, and they do come up in some edge cases (I hope they really are that, edge cases). For message rules though, those could be a real problem.

And one more thing:

People ask about message rules *in the app*, not realizing that it's just so much better in many ways to configure them up on the server, *in the mail service*. They just may not be aware of this option.

So not having message filtering in Aqua might prompt some to discover the better way...

...and might prompt others to post angry 1-star comments in Play :)
Title: Re: Integration with Tasker
Post by: pezboy on July 30, 2014, 09:01:53 am
Hello Kostya-
I also posted about this on Google groups, but thought I would go into a little more detail about it here. This is how I was using K9 integration with Tasker:

When an email is received in K9, it populates the following built in Tasker Variables:
1. Email From (#EFROM) with the Sender's Name (if applicable), and email address
2. Email Subject (#ESUBJ)
3. Email CC (#ECC)
4. Email Date (#EDATE)
5. Email Time (#ETIME)

The Data in these variables can then be used in Profiles or Actions as events, triggers, etc.

Here is an example of a Tasker Profile/Task that I used with K9, and am hoping will be possible with Aqua:

When an email is received, an Event Profile (K9 Email Received Event) triggers a task that announces the Sender and Subject. Here is the Context of that Task:
1. Say "New Email from %EFROM"
2. Say "Subject %ESUBJ"

I would love to see this integration added to AquaMail. I'm sure Pent from Tasker would be helpful with the process. Thanks!
Title: Re: Integration with Tasker
Post by: mabahj on July 30, 2014, 02:32:21 pm
Kostya,
I've now tried the new Tasker integration, now that the required Tasker version is out of beta. It works very well! Great job! And I cannot understand why someone would like the filter anywhere else.

Only thing I miss is the message content, or the x first characters of it. I would really appreciate it if you at some point could add that variable. I guess it would "simply" be a duplicate of what is shown in the Android notification?

@pezboy the latest AquaMail beta (dl from this forum) works exactly the way you describe, with the latest Tasker.
Title: Re: Integration with Tasker
Post by: pezboy on July 30, 2014, 06:27:39 pm
@mabahj- I'm using Tasker 4.4u1 and Aquamail 1.4.1-53-beta6. I can't seem to get any data populated from the #aqmfrom or other Aquamail variables. With K9, a received email triggers the population of the variables; is this different with Aquamail? Could you explain how you do you it? Thanks.
Title: Re: Integration with Tasker
Post by: Scott_Miller on July 30, 2014, 06:41:56 pm
@mabahj- I'm using Tasker 4.4u1 and Aquamail 1.4.1-53-beta6. I can't seem to get any data populated from the #aqmfrom or other Aquamail variables. With K9, a received email triggers the population of the variables; is this different with Aquamail? Could you explain how you do you it? Thanks.

Are you using #aqmfrom or %aqmfrom? It needs to be %.

The following is a simple test task I created when I first tried the plugin. It works fine. The test profile triggered from a match to %aqmfrom.

Test Enter (15)
   A1: Variable Set [ Name:%emailtest To:%aqmfrom Do Maths:Off Append:Off ]
   A2: Popup [ Title: Text:%emailtest
%aqmsubject
%aqmtime
%aqmdate Background Image: Layout:Popup Timeout (Seconds):5 Show Over Keyguard:On ]
   A3: Music Play [ File:media/notifications/Minimal Tone.mp3 Start:0 Loop:Off Stream:3 ]


Scott
Title: Re: Integration with Tasker
Post by: pezboy on July 30, 2014, 07:38:41 pm
@mabahj- I'm using Tasker 4.4u1 and Aquamail 1.4.1-53-beta6. I can't seem to get any data populated from the #aqmfrom or other Aquamail variables. With K9, a received email triggers the population of the variables; is this different with Aquamail? Could you explain how you do you it? Thanks.

Are you using #aqmfrom or %aqmfrom? It needs to be %.

The following is a simple test task I created when I first tried the plugin. It works fine. The test profile triggered from a match to %aqmfrom.

Test Enter (15)
   A1: Variable Set [ Name:%emailtest To:%aqmfrom Do Maths:Off Append:Off ]
   A2: Popup [ Title: Text:%emailtest
%aqmsubject
%aqmtime
%aqmdate Background Image: Layout:Popup Timeout (Seconds):5 Show Over Keyguard:On ]
   A3: Music Play [ File:media/notifications/Minimal Tone.mp3 Start:0 Loop:Off Stream:3 ]


Scott


Thanks for the reply Scott. I was using %aqmfrom, sorry, typo on my part. I was also able to get it to populate. I first attempted to do this at 3am and couldn't get it to work because I was directly referencing the %aqm variables in Tasker instead of using them to set other variables. I forgot that the %EFROM variable is built in to Tasker so it's data is constant, whereas the %aqm variables clear immediately after they are triggered. Thanks for your help.
Title: Re: Integration with Tasker
Post by: Kostya Vasilyev on July 31, 2014, 02:10:02 am
I'm really glad to see there is interest in this feature.

The variables filled by AquaMail all start with "%aqm..." (surprise!)

Tasker's "task editor" (where you actually use those variables) has a button on the right side showing all those variables as a list.

The button looks like a stack of color samples you'd find in a home renovation store.

Yes, K9 support and all of its variables are built into Tasker (as opposed to provided by K9 as a plugin).
Title: Re: Integration with Tasker
Post by: SteveM51 on September 23, 2014, 11:01:23 am
I would dearly like to be able to get the message body into a Tasker variable.

With long email trails all using the same subject, I need to see the first part of the message in order to decide whether or not I need to urgently read the message.

With the body in a variable I can get Tasker to extract the first paragraph and send it to my Gear watch.
Title: Re: Integration with Tasker
Post by: mabahj on September 23, 2014, 12:08:35 pm
+1 on getting the message body into a variable.
Title: Re: Integration with Tasker
Post by: Scott_Miller on September 23, 2014, 02:46:07 pm
There seems to be some interest in having the message body, or at least a portion of it, made available to Tasker. Perhaps the first 100-150 characters. You mentioned built in rules earlier in this thread, but not everyone follows the same workflow. And it's impossible for one developer to think of every possible thing the user needs. Adding this ability provides a lot of flexibility for those that use both Tasker and Aqua Mail, not to mention, I think it would be unique to Aqua Mail. If you were to search through the Tasker forum, you would find several conversations where this has been requested, not specifically with Aqua Mail. Thanks for considering it.

Scott

Title: Re: Integration with Tasker
Post by: Kostya Vasilyev on September 26, 2014, 02:18:09 am
Umm... This can be made available if you've not set the app to "download just headers when checking mail".

The default settings is to preload some of message text. Are you guys ok with that caveat?
Title: Re: Integration with Tasker
Post by: Scott_Miller on September 26, 2014, 02:53:43 am
Umm... This can only possible be made available if you've not set the app to "download just headers when checking mail".

The default settings is to preload some of message text. Are you guys ok with that caveat?

I can't speak for everyone, certainly, but I am totally ok with that. Mine is set to download 5K, so it's not a problem for me. It seems like a good compromise, in any case.

Scott

Title: Re: Integration with Tasker
Post by: mabahj on September 26, 2014, 09:25:32 am
Absolutely.
Title: Re: Integration with Tasker
Post by: Kostya Vasilyev on September 26, 2014, 01:37:33 pm
OK, will write down.