Hello @Vasilii_Burca,
Yes, you can start a flow on button click. Please find a step by step instruction in the Send selected items to Flow on button click article.
If you want to start the flow for the current item, you can use this code in the button's onclick property:
//this URL needs to be updated
var url = 'FLOW_URL';
//current item ID
var itemIds = fd.itemId;
//send a request to start flow
fetch(url, {
method: 'POST',
body: JSON.stringify({ids: itemIds}),
headers:{
'Content-Type': 'application/json'
}
})
.then(function(response) {
if (response.status !== 202) {
alert('Looks like there was a problem. Status Code: ' + response.status);
} else {
alert('Success');
}
})