Path: blob/master/Clockify/Clockify_Send_activity_brief_to_Slack.ipynb
2973 views
Clockify - Send activity brief to Slack
Tags: #clockify #slack #activity #brief #daily #weekly #automation
Author: Florent Ravenel
Last update: 2023-11-16 (Created: 2023-11-16)
Description: This notebook automates the process of sending a daily activity brief from Clockify to Slack. If today is Monday, the script will send the activity report from last week to Slack. For Tuesday to Friday, it will send a brief of the previous day's activity.
References:
Input
Import libraries
Setup variables
Pre-requisite
In "Auth & Permissions" section, add user token Scopes:
chat:write
,groups:write
,files:write
Get your Clockify API key Mandatory
api_key
: Clockify API keyworkspace_id
: ID of the workspaceuser_id
: ID of the user to get time entries fromslack_token
: User Slack tokenslack_channel
: the channel where you wish to send the message
Optional
cron
: This variable represents the CRON syntax used to run the scheduler. More information here: https://crontab.guru/#0_12,18_*_*_1-5
Model
Get start date and end date
Function: Flatten the nested dict
Function: Get referentials from workspace
Get time entries
Get all projects
Get all clients
Create database
Enrich data with referentials from workspace