Workflow - How to find the task id at run time in current notebook

rameshybr
Databricks Partner

There are four tasks in the workflow. How can I get the task ID at the beginning of the notebook, store it after finishing all the code cells in the notebook, and then save it into a table?