Create New Task on custom Button Click

I am using the BPMN in the java script and i have a custom left bar menu
so i want to create user task or email task on that button click
Please help.


Have you checked out this example?

Yes i checked this example but its in node js but i am using the native JS
Not sure how to work with this.

You can use our pre-built distributions for that: