I have a notification system for my website. I need a email notification system for website users.
I have email notification setting page from where user can schedule their email on daily bases or monthly basic or immediate basis or on particular date.
What is the best approach i need to use for this kind of functionality?
PS: i don't want to use socket.io
Thanks
I'd say the following:
In case the email should be sent everytime the event occurs, then you
don't need any crontab. Just send the email when the event occur.
Run a crontab once an hour. This crontab will fetch all events from
the last hour, and send an email with all these events to the users
requesting a hourly email
Do the same once a day and once a week for users with daily and
weekly emails preferences
.
Related
From FCM console I can not set up much more than 10 recurring notifications.
You can have up to 10 unique recurring notifications active per
project
I want to aim targeting audiences, user properties, last user engagement also. For example, you can set up a recurring notification that sends a push notification to a user who has been inactive for 2 days. From FCM console it is possible but I want to set it up manually since FCM console does not allow me to create recurring notifications much more than 10.
There is no API to create recurring notifications in Firebase Cloud Messaging. Since you already tagged your question with google-cloud-functions, you seem to know that you can create scheduled tasks with that.
To create a scheduled, recurring notification you can:
either run a function on a PubSub schedule or enqueue functions with Cloud Tasks, and
combine that with notifying the user when something interesting happens
From this documentation and the examples in it, you should be able to get the use-case working. If not, post another question with the minimal, complete code that any of us can run to reproduce where you got stuck.
On a user's page on the G Suite admin console, an admin can see the last login of a user. For example, one user I can see has a "last login" date of two years ago.
I'm trying to pull this date programatically. However, the Reports API that provides information on login events only goes back 180 days. How is Google getting this login date, and can it be fetched via API?
Google has this information because they are logging the event when it happens and storing that to present in the admin console. If you start to build an application now and start storing those events as time passes you too will have a date that goes back years. G Suite Enterprise customers can seamlessly do this if they Set up BigQuery logs in the Admin console.
You should be able to get this information now though. Look at the following APIs used in GAMADV-XTD you can get this info with this command for example.
gam report users parameters accounts:last_login_time filters "accounts:last_login_time<#filtertime#" filtertime -5y
https://developers.google.com/admin-sdk/reports/v1/reference/activities
https://developers.google.com/admin-sdk/reports/v1/reference/customerUsageReports
https://developers.google.com/admin-sdk/reports/v1/reference/userUsageReport
I somehow missed this before, but you can get the last login date/time with the User Usage Report (rather than the Login Activity report).
API docs are here and the App Script example I'm using is here. I realized that if GAM was pulling the information there had to be an API for it.
We have a team calendar which contains multi-day events. We would like to send a daily SMS reminder at UTC +2 /9 a.m. (using Twilio or Google for Apps).
Unfortunately, the multi-day events start at 00:00:00.
Any idea how to approach this?
Is there an easy solution?
If you're planning on implementing this on the AppScript side, unfortunately, the solution would be anything but easy. Since Google discontinued SMS Services for reminders, it looks like Twilio is your only viable option of the two in order to send those messages. You would need to read Calendar for the events and using Time-driven triggers, send out a SMS to each member for those events. However, the logic of how to propagate these texts to the right people(according to attendees of the meeting) needs to be figured out as the contacts for Sending out these texts will be stored in Twilio.
However, using the combination of Calendar API in order to receive the required information and using Twilio Appointment Reminder in order to send out the needed reminders might be a better option to look into.
I am making a website where people will buy things. What I am wondering is if there is a way to check if payment was received in paypal, and then execute some code. Or should I add a paypal widget where when payment is done then it executes some code? This is all being done in HTML and CSS being it is a website.
Take a look at Instant Payment Notification (IPN). Any time a transaction hits your PayPal account their server will POST the transaction data to a URL you specify. Your script receives the data, verifies it with PayPal to ensure it actually came from them, and then you can process that data however you need to.
This gives you the ability to update your own database, send out your own email notifications, hit 3rd party web services, or anything else you want to automate when transactions hit your account. This works for payments, refunds, disputes, etc. so you can automate lots of tasks. It happens in real-time, too.
can we rely solely on subscr_eot to activate/deactivate an account?
Assume we have the following scenario:
On 9/16, a customer pays using Paypal for a monthly recurring
service.
With 24 hours, Paypal sends "subscr_signup" and
followed by "subscr_payment". At this time, the application will
grant the user access.
??
The question, will Paypal send an EOT before attempting to collect the payment on 10/16 or would it send it before?
Thanks,
subscr_eot means that the subscription has expired, either because the subscriber cancelled it or it has a fixed term (implying a fixed number of payments) and it has now expired with no further payments being due. It is sent at the end of the term, instead of any payment that would otherwise have been due on that date.