Notebooks are great for interactive use, not so much for being reused in an automatic fashion. How to make a notebook reusable (for example in an analysis pipeline)?
Write your notebook 'mynotebook.ipynb'
as usual. Then add a special comment in some cells:
### input
x = 0
y = 0