Zoho Books and Zoho Projects Task Status Update

Zoho Books and Zoho Projects Task Status Update

How can we create an automation using custom functions for the following scenario.

When our zoho books invoice status changes to paid. I want a task in Zoho projects to change to completed.