Birthday Notification with Text, E-mail, Call - Calendar

Share and discuss your flows and ideas with other users.

Moderator: Martin

Post Reply
geekeedee
Posts: 32
Joined: 24 Sep 2016 00:33

Birthday Notification with Text, E-mail, Call - Calendar

Post by geekeedee » 03 Jul 2017 14:14

UPDATE: The flow is updated to version 1.34+ of Automagic.
http://automagic4android.com/flow.php?i ... 7bfee274d3

Get BIRTHDAY notification of contacts on the status bar by using the CALENDAR app.
The notification is displayed:
- 7 days, 10 days, 2 weeks, 3 weeks or 1 month before (interval is set by you)
- then 1 day before
- and on the birthday date.

Features:
- Longest interval of notification is set by you from a menu (7 days, 10 days, 2 weeks, 3 weeks or 1 month)
- Notification has actions to TEXT, E-MAIL and CALL the contact.
- Actions have the phone number(s), e-mail address(es) and a greeting message already PRE-FILLED.
- Notification shows the PHOTO icon of contact.
- Notification shows the AGE and birthday of contact.
- Notifications are sorted by the earliest to latest dates.
- Free, no ads, no invasion of privacy. :)
BirthdayNotification0.png
BirthdayNotification0.png (20.14 KiB) Viewed 43576 times
BirthdayNotification3B.png
BirthdayNotification3B.png (40.34 KiB) Viewed 43699 times
BirthdayNotification6B.png
BirthdayNotification6B.png (37.49 KiB) Viewed 43722 times
Customization and Requirements:
- Required: Google Contacts, Google Calendar with the birthday option turned on.
- In the "Request Sync" action, change the Google account to YOUR account.
- Tap on the shortcut to launch the menu to set the longest interval for notification.
- Set your DEFAULT contact PHOTO in case the contact does not have a photo. In the script, where it says:

Code: Select all

myphoto=mydata["photo_uri"];
if (isEmpty(myphoto))
   {
     myphoto='storage/4B07-14FB/Pictures/Holidays/happybirthdayicon.jpg';
   }
change 'myphoto=' to your icon (Google and download your icon from Internet).

The Flow:

2nd edition: http://automagic4android.com/flow.php?i ... 7bfee274d3
Last edited by geekeedee on 20 Sep 2017 14:55, edited 9 times in total.

artpc
Posts: 12
Joined: 02 Jul 2013 11:59

Re: Birthday Notification with Text, E-mail, Call - Calendar

Post by artpc » 05 Jul 2017 12:55

Thx good work.

geekeedee
Posts: 32
Joined: 24 Sep 2016 00:33

Re: Birthday Notification with Text, E-mail, Call - Calendar

Post by geekeedee » 09 Jul 2017 19:24

There is now a 2nd edition of the flow. It adds a shortcut to launch a menu to select the longest interval for notification: 7 days, 10 days, 2 weeks, 3 weeks, 1 month.

2nd edition: http://automagic4android.com/flow.php?i ... a56453d76e
BirthdayNotification0.png
BirthdayNotification0.png (20.14 KiB) Viewed 43553 times

geekeedee
Posts: 32
Joined: 24 Sep 2016 00:33

Re: Birthday Notification with Text, E-mail, Call - Calendar

Post by geekeedee » 15 Sep 2017 15:00

Automagic v. 1.34+ fixes and improves the search of contact info to allow for exact display name.

The flow is updated accordingly :

http://automagic4android.com/flow.php?i ... 7bfee274d3

User avatar
Bluscre
Posts: 145
Joined: 31 Aug 2017 13:58
Location: Germany
Contact:

Re: Birthday Notification with Text, E-mail, Call - Calendar

Post by Bluscre » 16 Sep 2017 11:51

Ur mom looks like scarlett johansen? X'D
Unofficial AutoMagic Telegram Group: https://t.me/automagicforandroid
Check out my other flows here: https://github.com/Bluscream/AutoMagicFlows or here.

aar318
Posts: 4
Joined: 21 Nov 2016 13:07

Re: Birthday Notification with Text, E-mail, Call - Calendar

Post by aar318 » 13 May 2019 22:15

I keep getting an error when running this and I am at a loss.. I checked permissions and everything is logged in.. I think I got the email in the right place but not sure there on the action mentioned

This is what I get:
ch.gridvision.ppam.androidautomagic.simplelang.a.d: Error while calling function substring (Expression: substring(mybirthdate, 4, 10)[line 12], Cause: length=7; index=10)



Any help is appreciated... Thanks!

geekeedee
Posts: 32
Joined: 24 Sep 2016 00:33

Re: Birthday Notification with Text, E-mail, Call - Calendar

Post by geekeedee » 25 May 2019 14:36

aar318 wrote:
13 May 2019 22:15
I keep getting an error when running this and I am at a loss.. I checked permissions and everything is logged in.. I think I got the email in the right place but not sure there on the action mentioned

This is what I get:
ch.gridvision.ppam.androidautomagic.simplelang.a.d: Error while calling function substring (Expression: substring(mybirthdate, 4, 10)[line 12], Cause: length=7; index=10)

Any help is appreciated... Thanks!
Are you sure you're using the calendar version of the flow ? Because the calendar version does not use the function "substring(mybirthdate, 4, 10)". But, the CONTACTS version of the flow uses this substring.

The substring extracts the birthdate's month and day, -mm-dd, from the contacts, and the date is supposed to be in the "yyyy-mm-dd" format.

This error could possibly be caused by the fact that some contacts apps allow for the birthday to be entered WITHOUT a year. For example, in the Google Contacts app, the user can enter only the month and day and the user has the option to NOT include the year. This will throw off the substring function which assumes the "yyyy-mm-dd" format.

Suggestion 1: Make sure there is a year to birthdate of contacts.

Suggestion 2: This suggestion is for the calendar version only of the flow. In the first "Query Content Provider" action, change the calendar_id= to 3 or 4. This calendar_id is the "birthday" calendar and it may vary from phone to phone depending on the configuration. Try with calendar_id=3, calendar_id=4, calendar_id=5 to see which one is the birthday calendar.
Last edited by geekeedee on 25 May 2019 15:36, edited 1 time in total.

geekeedee
Posts: 32
Joined: 24 Sep 2016 00:33

Re: Birthday Notification with Text, E-mail, Call - Calendar

Post by geekeedee » 25 May 2019 15:35

When I changed phone, the calendar version of the birthday flow did not work anymore. The first thing I did to fix it is to change the calendar_id:

In the first "Query Content Provider" action, change the calendar_id= to 3 or 4. This calendar_id is the "birthday" calendar and it may vary from phone to phone depending on the configuration. Try with calendar_id=3, calendar_id=4, calendar_id=5 to see which one is the birthday calendar.

See also the latest tips in the latest post of the contacts version of the birthday flow to make sure that the contacts and the calendar are in sync.

Shocko
Posts: 1
Joined: 24 Jun 2019 02:13

Re: Birthday Notification with Text, E-mail, Call - Calendar

Post by Shocko » 24 Jun 2019 03:54

I keep getting an error when I try to execute this flow. I think I have done everything correct so not sure what is going wrong.

The error I keep getting is this:
ch.gridvision.ppam.androidautomagic.simplelang.a.d: Can not apply operations – to values ‘null’ and ‘1’ (Expression: global_mydaysahead-1 [line 10])

geekeedee
Posts: 32
Joined: 24 Sep 2016 00:33

Re: Birthday Notification with Text, E-mail, Call - Calendar

Post by geekeedee » 26 Jun 2019 18:08

Shocko wrote:
24 Jun 2019 03:54
I keep getting an error when I try to execute this flow. I think I have done everything correct so not sure what is going wrong.
The error I keep getting is this:
ch.gridvision.ppam.androidautomagic.simplelang.a.d: Can not apply operations – to values ‘null’ and ‘1’ (Expression: global_mydaysahead-1 [line 10])
1) You have to go to the menu to select the number of days ahead. The menu to select the number of days appears when you tap on the SHORTCUT of the flow.
To create the shortcut of the flow, tap on the TRIGGER to edit it. Tap the "Shortcut: Birthday Notification" to open it. At the bottom of the trigger, you see the "Install shortcut" button. Tap on the button to create the shortcut. Go to your phone screen, and you should see a blue "birthday notification" Automagic icon of the shortcut. Tap on that icon, and you should see the menu to change the number of days.


2) Go to the first action script where you see this line :

===================================================
if (global_mydaysahead=='')
{
mydaysahead=6;
}
else
{
mydaysahead=global_mydaysahead-1;
}
===================================================

change the "if" statement to :

===================================================
if (global_mydaysahead=='' || global_mydaysahead==null)
===================================================

Post Reply