Share text, file or image with Automagic to send it via mail

Share and discuss your flows and ideas with other users.

Moderator: Martin

Post Reply
User avatar
AMChris
Posts: 42
Joined: 22 Oct 2014 08:39

Share text, file or image with Automagic to send it via mail

Post by AMChris » 26 Feb 2018 20:06

First of all BIG THANKS to "Desmanto" who gave me important tips to make this work.
You can read those posts here: http://automagic4android.com/forum/view ... f=5&t=7259
  • How to query a content provider
  • How to decode an url encoded path


Use Case
  • You take a screenshot on your Android device and want to use it on your windows PC? (like the one from the flow I attached)
  • You find an interesting article, app, whatever... and want to read/use it later on your PC? (like the URL to the flow Automagic generated on my mobile)
One very simple solution is to mail the info to yourself.
Your mailbox is a 'cloud service' that you probably already have with clients to access it from all of your devices :D

There are apps in the playstore that can do it - like this one: https://play.google.com/store/apps/deta ... om.pfalabs
but I always prefer to use Automagic when possible (more control and a reason to learn something) .

The Flow
This flow is more like a showcase rather than a full featured app.
Its not perfect, but its working and maybe of use for some of you...

(At the moment) It can't ...
- take more than one file, image
- and may not work in all situations (some content provider queries still cause errors)

But it can ...
- take a text
- take an image
- take a file
you share via Android share -> choose Automagic -> and the flow will send you an email with the shared content.

Configure the flow
To use it, you have to enter your own email address in action 'Mail mit Google Mail …'


Flow Download: http://automagic4android.com/flow.php?i ... ca12af1d35
2018-02-26 20_55_42-Start.jpg
2018-02-26 20_55_42-Start.jpg (48.46 KiB) Viewed 2603 times

tphg
Posts: 57
Joined: 17 Apr 2017 05:31

Re: Share text, file or image with Automagic to send it via

Post by tphg » 27 Feb 2018 01:52

Thanks to AMChris and Desmanto for sharing this useful flow.

User avatar
Desmanto
Posts: 1938
Joined: 21 Jul 2017 17:50

Re: Share text, file or image with Automagic to send it via

Post by Desmanto » 28 Feb 2018 16:06

I just know you wanna sent something to your PC. This flow will be mostly used when you are not in the same network with your PC. Or when you are at the field, you wanna keep a log of your field report at your office mailbox.

At my place, my phone is connected to the wifi router. My PC is connected via LAN to the same router. Both are on the same network, can ping each other. If I need to transfer single files, I just use MiXplorer Copy Action to copy the file to PC's shared folder. For clipboard, I use Eventghost Webserver, I can copy the clipboard back-thru. Switching tab from PC to phone and vice versa was so easy, just a simple shortcut.

================
As usual, as I have seen your flow, can't help not to commenct. You can optimize the flow, by combining the first part of the script and expression into 1 script and 1 expression only. So before mail with gmail, you only have 3 elements, 1 script, 1 expression, 1 query content provider. Since the script is not very long yet, I would prefer to combine them, even thought it will be a little harder to read/debug later. Some of your script block require to set a value based on true/false. You can replace it with ternary if operator, as shown in here : viewtopic.php?f=5&t=7255

I actually wanna share the intent received flow for a long time ago. But that whatsapp media provider problem is still unsolved till dates, I have put it aside for undefined time. Besides, I am working on several other flows too.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), Resurrection Remix Official 7.0.2 20190714, Pie 9.0, Rooted.

Post Reply