Help with Deluge Function / Workflow

Help with Deluge Function / Workflow

I have 2 custom modules. 
1. Exhibitor Registration
2. Marketing Tracker

I am trying to create a new record in Marketing Tracker, when a new Exhibitor Registration Record is created. I need it to update the look up field Exhib_Reg_Record that looks up "Name" in Exhibitor Registration.

I am able to manually make this work when it asks me to "Please input the values to the argument" 
int ExhibitorRegId = 

I enter an ID and it successfully creates a record in Marketing Tracker. However, when a new Exhibitor Registration record is created it is not running. I have the Workflow under Exhibitor Registration and it is set to "This rule will be executed when an exhibitor registrations is created." and then "executed for All Exhibitor Registrations"

Here is my code:
// Define the input parameter correctly
ExhibitorRegid = input.ExhibitorRegid.toString();
// Get the record from the Exhibitor Registration module by ID
resp = zoho.crm.getRecordById("Exhibitors",ExhibitorRegid);
// Check if the record retrieval is successful
if(resp != null)
{
// Create a map to hold the data for the Marketing Tracker record
mp = Map();
// Add the fields to the map
mp.put("Name",ifnull(resp.get("Name"),""));
// Assuming "Name" is a required field
mp.put("Exhib_Reg_Record",ExhibitorRegid);
// Assuming "Exhib_Reg_Record" is the lookup field
// Create the record in the Marketing Tracker module
create_Marketing_Trackers = zoho.crm.createRecord("Marketing_Trackers",mp);
// Log the response to verify the record creation
info create_Marketing_Trackers;
}
else
{
// Log an error message if the Exhibitor Registration record could not be retrieved
info "Exhibitor Registration record not found.";
}

NOTE: The Exhibitor Registration record is created through a function (not through the create button). Any help would be appreciated