EDIT: I made a complete importable Advanced flow for update & permissions checks:
FYI The homeyscript is updated & extended with app permissions & writes results to timeline