Automatically close a Task based on workflow rule

Automatically close a Task based on workflow rule

I have a task that is created for every new Deal, and I'm trying to write function that will close that particular Task based on a workflow rule. I'm getting the following error in the function below. I'm new to Deluge so I'm not sure what I'm missing.

Error at line :3 Improper Statement Error might be due to missing ';' at end of the line or incomplete expression Line Number: 3


tRelated = zoho.crm.getRelatedRecords("Activities", "Tasks", dealId);

for each rec in tRelated
{
    tId = rec.get("id");
    tDetails = zoho.crm.getRecordById("Activites", tId);
    tSubj = tDetails.get("Subject"):
    closeTask = tSubj.startsWith("Provide");
    if(closeTask)
    {
        info "Need to close task ID " + tId;
        tMap = map();
        tMap.put("Status","Completed");
        tResp = zoho.crm.updateRecord("Tasks",tId,tMap);
        info tResp;
    }
}