Need help: Make Code module not receiving mapped inputs (Close CRM + CSVs)
Hi everyone,
I’m building a scenario that should generate email content based on CSV data and Close CRM leads, but my Make Code module keeps returning empty output.
The CSV fetch and iterator both return data, yet the Make Code output shows undefined values even though the chips are mapped correctly.
PLEASE HELP BEFORE I BANG MY FACE INTO A BRICK WALL😭
Scenario overview
- Trigger: Close CRM → Search Leads
Filter:custom."Generate Outreach Email":"Yes" - Iterator: Loops through each lead bundle
- HTTP modules (2):
- HTTP 9 → Development CSV (Google Sheets CSV export link)
- HTTP 10 → Renovation CSV (Google Sheets CSV export link)
- Tools → Set multiple variables:
lead→ mapped from Iterator bundleDEVELOPMENT_CSV_RAW→ mapped from HTTP 9 → DataRENOVATION_CSV_RAW→ mapped from HTTP 10 → Data
- Make Code module: where the main parsing and project selection happens
- Goal: Confirm that input variables (lead, CSVs) are actually reaching the code
Current code inside Make Code
try {
const lead = input.lead;
const dev = input.DEVELOPMENT_CSV_RAW;
const ren = input.RENOVATION_CSV_RAW;
output = {
ok: true,
leadOk: !!lead,
devLen: dev?.length,
renLen: ren?.length
};
return output;
} catch (err) {
return { error: err.message };
}
This runs without errors but returns empty or undefined for leadOk, devLen, and renLen.
Sample lead object (from Iterator → Tools)
{
"name": "Oxford Collection Hotels",
"custom": {
"cf_Markets_regions": "Washington, Idaho, Oregon, California",
"cf_Primary_Service_Offered": "Hotel Management, Hospitality Services",
"cf_Services_Offered": "Accommodation, Event Hosting, Dining Services, Complimentary Breakfast, Flexible Cancellation, Promotional Offers, Pet-Friendly Options, Sustainable Practices",
"cf_Primary_Specialty": "Hotel Management",
"cf_Strengths": "Personalized service, Complimentary amenities, Diverse property locations, Strong customer loyalty, High guest satisfaction, Best rates guarantee"
}
}
Example CSV snippet (from HTTP 9 → Development CSV)
"ID","Status","Name","City","State","Scale"
"32756","Final Planning","Autograph Collection Nashville","Nashville","TN","Upper Upscale"
"12192","Planning","Mackinaw Hotel","Placerville","CA","Upscale"
What I’ve already tried
- Verified both CSVs download fine from Google Sheets
- Confirmed Iterator outputs valid bundles
- Tested mapping directly into Make Code and via Tools → Set multiple variables
- Tried bypassing Tools by mapping Iterator and HTTP data straight into Make Code
Output still looks like:
ok: true
leadOk: false
devLen: undefined
renLen: undefined
What I need help with
- What could cause the input variables (
lead,DEVELOPMENT_CSV_RAW,RENOVATION_CSV_RAW) to not reach the Make Code module even though chips are mapped? - Is there a better way to inspect what Make actually passes into
input?
Optional diagnostic snippet
If it helps, here’s a quick probe code I can run to show what the module is actually receiving:
try {
const snapshot = {
keys: Object.keys(input || {}),
types: {
lead: typeof input.lead,
DEVELOPMENT_CSV_RAW: typeof input.DEVELOPMENT_CSV_RAW,
RENOVATION_CSV_RAW: typeof input.RENOVATION_CSV_RAW
},
sample: {
lead: input.lead ? Object.keys(input.lead).slice(0,10) : null,
devPreview: input.DEVELOPMENT_CSV_RAW ? String(input.DEVELOPMENT_CSV_RAW).slice(0,120) : null,
renPreview: input.RENOVATION_CSV_RAW ? String(input.RENOVATION_CSV_RAW).slice(0,120) : null
}
};
output = snapshot;
} catch (err) {
output = { error: err.message };
}
Any help is deeply appreciated — I’ve been stuck here for days and really want to understand what Make is doing with my inputs.
Thanks in advance ![]()

