Background: Recently bought a month in a lot of spelling card, can bring active everyday, 5 yuan per 100 can change without threshold are gifted, but I often forget the receive activity, see Serverless, found that the cloud can use function function automatic timing to remind me, I send the reminder to create your own nailing group, and @ me, so I won’t forget
Log in to Tencent Cloud
Log in using wechat scan
The new function
Enter function details
Write the code
# -*- coding: Utf8 - * - import requests # need to replace their nailing robot address url = "https://oapi.dingtalk.com/robot/send?access_token=xxxxxxxxxxxxxxxxxx" def call(event, contex): Body ={" msgType ":"text", "text":{"content":" Please confirm whether pinduoduo monthly card is active or not. }, "at":{"atMobiles":[" 158XXXXXXXX "], "isAtAll":False}} resp=requests. Post (url=url, json=body) print(resp.status_code)Copy the code
Running tests manually
Set the timer trigger to be triggered at 9:00 every day
Add pin robot, get call address
Smart Swarm Assistant in pin swarm Settings
Pay attention to the set keyword, you need to send content to include this keyword, otherwise it will be blocked
Finally remind
🏆 issue 7 | all things can be Serverless technology projects