This question already has an answer here:

In the new qgis3 version it is still possible to add your own processing scripts to the processing toolbox. As I understand the discussion between the qgis3 developers (qgis3 is a very good work!!) the way of passing input and output parameters has changed because the former way is not that pythonic, which is true. In qgis2.x input and output parameters were defined at the top of the script with a double # (comment) like:

##result=output raster
python code...

I've searched several hours in different forums, lists and so on, with no success how to start here and define input and output parameters...does anybody know where to get a documentation or example?

enter image description here

marked as duplicate by underdark qgis Mar 25 '18 at 10:27

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

Browse other questions tagged or ask your own question.