OpenWhisk / today’s todoist to slack
I check todo every day using todoist. and my team use slack. I use OpenWhisk’s Action to tell my team about today’s work.
Create Action
Use the following python code ( save totodoist2slack_openwhisk.py )
Use the wsk command-line to create a new Python Action using this python script.
wsk action action todaytodo todoist2slack_openwhisk.py
Set the default parameter to Python Action.
wsk action update todaytodo -p todoist_token XXXXX -p todoist_projectId XXXX -p slack_url https://hooks.slack.com/services/XXXXXXX
The “todoist_token” is `API token` in todoist application settings.
todoist_projectId : Select the `ID` of the project you want to target.
slack_url is slack webhook url. :-p
If you want to post to Slack at the same time every morning, it is good to sequence new actions using alert feed(like crontab event ) .
Invoke Action
wsk action invoke -r -b todaytodo
New message in slack posted by wsk action ivoke.
OpenWhisk is very easy . If not openwhisk , we create some server ( For Python example, you need a flask application server) . It is troublesome. and OpenWhisk is reasonable that cost and architecture. Even if we use the action every day, it is a few yen :p