Where to start with cloud function with the skycli?


#1

hello guys, thanks for all effort you are doing.
i want to make some function’s with my application with the new cli. i need some help please


#2

Hi there, skycli is mainly used as a quick command to upload cloud functions to skygear.io. May I know what exactly you need to do or what you meant by “make some functions”?


#3

I want to send a welcome sms to a new user after registration.


#4

HI, we plan to make the sms welcome feature build in. For now, you can use user after save hook for this purpose.

You may reference forgot password implementation: https://github.com/SkygearIO/forgot_password/blob/master/forgot_password/handlers/welcome_email.py#L67


#5

this option is already active in the dashboard, but users do not receive the email


#6

Hi, may you provide more details / step-by-step to reproduce the problem? And which features you are referring to?


#7

my worries is to send a welcome mail after registration but with skygear function. in javascript


#8

Understood. Actually you don’t need to write Cloud Functions for it. You can simply set it up in developer portal, under User Auth > Welcome Emails.

Afterwards, any new user sign up via skygear.auth.signupByEmail will have an welcome email sent to them immediately


#9

For email, you should able to update the content at portal. (https://portal-staging.skygear.io/app//users/welcome-email), without coding.

If you need something heavily customized and code in javascript, you may want to checkout the JS Database Hooks: https://docs.skygear.io/guides/cloud-function/database-hooks/js/