How to get the account username in Mail with Gmail action

Post your questions and help other users.

Moderator: Martin

Post Reply
bdevay
Posts: 2
Joined: 09 May 2019 20:21

How to get the account username in Mail with Gmail action

Post by bdevay » 16 Jul 2020 07:22

Hi,

I want to create a workflow which sends an email to someone when I'm entering/leaving an area. The workflow itself is pretty simple.
I want to share it with others therefore the email signature should correspond to the sender's name (Gmail account user name).
How to get the username to use it in the message body?

Bonus questions :)
- is there a way to send email through Office 365?
- is there a way to use the account specific email signature?

Thanks in advance.

Best regards,
bdevay

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

Re: How to get the account username in Mail with Gmail action

Post by Desmanto » 18 Jul 2020 16:10

For entering/leaving area, it is about geofencing, there are several ways to do it.
viewtopic.php?f=6&t=7137
or you can look at my wifi geofencing : viewtopic.php?f=3&t=7326

Email signature should be user specific, so the one who use your flow should change it manually to their own.

I'm confused about getting the username to use in message body. You are going to send email, so you should already have the sender account setup already, so you can modify the body in the action Mail with Gmail already.


I don't use Office 365, but It usually can be done using intent.SEND. Add Action Start Activity, choose EXAMPLES : Compose Mail. Then at the extra, fill in every fields you need, and tick explicit component and choose office 365 package name. After executed, usually this will open the office 365 with the field prefilled with the text you provide. You still need to press the send (and maybe confirm), which can be done using Control UI.


For account specific email signature, you can setup your action Mail With Gmail, and use object map to map each username to its own signature. You can look on how to use the map in my index, section Map and List
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

Micky Micky
Posts: 179
Joined: 16 Oct 2019 17:38

Re: How to get the account username in Mail with Gmail action

Post by Micky Micky » 18 Jul 2020 18:26

Hello,

Are you trying to get a contact's email address?

http://automagic4android.com/flow.php?i ... acf80ebd48

NOTE: In this second step I chose number 5 because my fifth contact had an email stored.

If this is want you want, then you need a separate list for who you want to send to and then loop over it and match it to the contacts list before extracting the email address.

Hope this helps

Micky

@Desmanto I'm guessing you have a much nicer way of achieving the same result
Crude but it works.

Post Reply