Can not map content to Google Sheet

For weeks, I’ve been trying to get one workflow active, and now I cannot get the last node to work.
I can’t get the created content to map to the Google sheet.
The n8n AI agent has been useless and unhelpful. Even Claude Code with access to the NAN MCP has no idea.
Please can you look at the attached image and tell me what the expression is that I need to map the content that is in the red box so that it shows up in the output.

Describe the problem/error/question

What is the error message (if any)?

Please share your workflow

(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)

Share the output returned by the last node

Information on your n8n setup

Please can you share the entire workflow in a code block. The field you’re highlighting is showing red and undefined which suggests you’re using the wrong reference to the data you want. Ideally clear that field and then drag and drop the field from the left panel into the mapping field in the center to use the correct value

@Wouter_Nigrini thank you for your response. Sorry, workflow code is below.

Your suggested fix is actually what I have been trying and when I do that, all fields return the same content from just 1 node, even though Ive dragged in several different nodes.
i.e.. email 1 subject line, email 1 body, email 2, email 3 subject line, email 3.

you can see in the attached image this where the content says ‘Dan Process Bottlenecks’. This content is showing up despite what content field is dragged across.

thanks for your help


	
name	"Cold Email Automation - AI Personalized Sequences"
nodes	
0	
parameters	{}
id	"0b5e3d4a-8f9a-4b7c-9d2e-1f3a5b7c9d4e"
name	"Manual Trigger"
type	"n8n-nodes-base.manualTrigger"
typeVersion	1
position	
0	208
1	592
1	
parameters	
documentId	
__rl	true
value	"1cc8iR_a1eTeCxvYsQAiC7_okPMWiKvAmC-a_8LxZLVY"
mode	"id"
sheetName	
__rl	true
value	631684632
mode	"list"
cachedResultName	"Search URLs"
cachedResultUrl	"https://docs.google.com/spreadsheets/d/1cc8iR_a1eTeCxvYsQAiC7_okPMWiKvAmC-a_8LxZLVY/edit#gid=631684632"
options	{}
id	"1c6e4d5a-9f0b-5c8d-0e3f-2g4a6c8e0f5g"
name	"Read Google Sheets"
type	"n8n-nodes-base.googleSheets"
typeVersion	4
position	
0	432
1	592
credentials	
googleSheetsOAuth2Api	
id	"YyhIwFvYTBu0kU19"
name	"Google Sheets account"
2	
parameters	
url	'={{ "https://emailverifier.reoon.com/api/v1/verify?email=" + encodeURIComponent($json.email) + "&key=rG4yeA6kGKbERiNKx6ZZV0EDNdGv7NyU&mode=quick" }}'
options	
response	
response	
neverError	true
timeout	15000
id	"2d7f5e6b-0g1c-6d9e-1f4g-3h5b7d9f1g6h"
name	"REOON Email Verification"
type	"n8n-nodes-base.httpRequest"
typeVersion	4
position	
0	656
1	592
3	
parameters	
conditions	
options	
caseSensitive	true
leftValue	""
typeValidation	"strict"
conditions	
0	
id	"3e8g6f7c-1h2d-7e0f-2g5h-4i6c8e0g2h7i"
leftValue	"={{ $json.status }}"
rightValue	"valid"
operator	
type	"string"
operation	"equals"
combinator	"and"
options	{}
id	"3e8g6f7c-1h2d-7e0f-2g5h-4i6c8e0g2h7i"
name	"Filter Valid Emails"
type	"n8n-nodes-base.filter"
typeVersion	2
position	
0	880
1	592
4	
parameters	
method	"POST"
url	"https://api.apify.com/v2/acts/VhxlqQXRwhW8H5hNV/run-sync-get-dataset-items"
sendHeaders	true
headerParameters	
parameters	
0	
name	"Authorization"
value	"Bearer apify_api_XWeJTBkSYxZbbTAk20hXt1Cr7BNDI50UVdnT"
1	
name	"Content-Type"
value	"application/json"
sendBody	true
specifyBody	"json"
jsonBody	'={"startUrls": [{"url": "{{ $("Read Google Sheets").item.json.linkedinUrl }}"}]}'
options	
response	
response	
neverError	true
timeout	30000
id	"4f9h7g8d-2i3e-8f1g-3h6i-5j7d9f1h3i8j"
name	"Apify LinkedIn Scraper"
type	"n8n-nodes-base.httpRequest"
typeVersion	4
position	
0	1104
1	688
5	
parameters	
url	'={{ $("Read Google Sheets").item.json.companyWebsiteUrl && $("Read Google Sheets").item.json.companyWebsiteUrl.startsWith("http") ? $("Read Google Sheets").item.json.companyWebsiteUrl : "https://" + ($("Read Google Sheets").item.json.companyWebsiteUrl || "example.com") }}'
options	
redirect	
redirect	
maxRedirects	5
response	
response	
neverError	true
timeout	10000
id	"5g0i8h9e-3j4f-9g2h-4i7j-6k8e0g2i4j9k"
name	"Company Website Scraper"
type	"n8n-nodes-base.httpRequest"
typeVersion	4
position	
0	1104
1	496
6	
parameters	
mode	"raw"
jsonOutput	`= {\n    "firstName": "{{ $('Read Google Sheets').item.json.first_name }}",\n    "lastName": "{{ $('Read Google Sheets').item.json.last_name }}",\n    "email": "{{ $('Read Google Sheets').item.json.email }}",\n    "companyName": "{{ $('Read Google Sheets').item.json.company_name }}",\n    "industry": "{{ $('Read Google Sheets').item.json.Industry }}",\n    "linkedinAbout": "",\n    "companyWebsiteContent": ""\n  }`
options	{}
id	"6h1j9i0f-4k5g-0h3i-5j8k-7l9f1h3j5k0l"
name	"Consolidate Data Variables"
type	"n8n-nodes-base.set"
typeVersion	3
position	
0	1328
1	592
7	
parameters	
method	"POST"
url	"https://openrouter.ai/api/v1/chat/completions"
sendHeaders	true
headerParameters	
parameters	
0	
name	"Authorization"
value	"Bearer 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"
1	
name	"Content-Type"
value	"application/json"
sendBody	true
specifyBody	"json"
jsonBody	'={{ { "model": "anthropic/claude-3.5-sonnet", "messages": [{ "role": "user", "content": "TASK: Generate a cold email subject line. CRITICAL FORMATTING REQUIREMENTS: 2-3 words maximum, No quotation marks in output, Use firstName token: " + $json.firstName + ", Sentence case or lower case only. SUBJECT LINE RULES: Must include firstName: " + $json.firstName + ", Extremely matter-of-fact (like colleague wrote it), NO sales/promotional language, NO cheesy phrases, Direct reference to operational problem only. GOOD EXAMPLES: " + $json.firstName + " handoffs, " + $json.firstName + " budget gaps, " + $json.firstName + " scaling. BAD EXAMPLES: " + $json.firstName + " opportunities, " + $json.firstName + " solutions, " + $json.firstName + " partnership. OUTPUT: Return subject line only, no quotes, ready for email tool" }], "temperature": 0.7 } }}'
options	
response	
response	
neverError	true
timeout	30000
id	"email1-subject-001"
name	"Email 1 Subject Generator"
type	"n8n-nodes-base.httpRequest"
typeVersion	4
position	
0	1552
1	208
8	
parameters	
method	"POST"
url	"https://openrouter.ai/api/v1/chat/completions"
sendHeaders	true
headerParameters	
parameters	
0	
name	"Authorization"
value	"Bearer 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"
1	
name	"Content-Type"
value	"application/json"
sendBody	true
specifyBody	"json"
jsonBody	`={{ { "model": "anthropic/claude-3.5-sonnet", "messages": [{ "role": "user", "content": "TASK: Generate personalized cold email body. CRITICAL FORMATTING REQUIREMENTS: 30-40 words for Lines 1-3 only (P.S. excluded from count), Double line break after every period question mark exclamation mark, No quotation marks in output anywhere, Use variable format: firstName=" + $json.firstName + ", companyName=" + ($json.companyName || "their company") + ", industry=" + $json.industry + ", NO signature variables or sign-offs, NO niceties. FORBIDDEN OPENINGS: I hope this email finds you well, I hope you're doing well, How are you, Any pleasantries or niceties. STRUCTURE: Line 1: " + $json.firstName + " + personalization/assumption + operational question OR fact (only one ? allowed total). Line 2: Brief consequence for role in " + $json.industry + " that sender solves. Line 3: Quick offer or 3-bullet how-to short walkthrough light assessment expert Q&A. P.S.: 15 words max, starts P.S., context/proof, no sender company name. OUTPUT: Return email body only with required spacing, no quotes" }], "temperature": 0.8 } }}`
options	
response	
response	
neverError	true
timeout	30000
id	"email1-body-001"
name	"Email 1 Body Generator"
type	"n8n-nodes-base.httpRequest"
typeVersion	4
position	
0	1552
1	400
9	
parameters	
method	"POST"
url	"https://openrouter.ai/api/v1/chat/completions"
sendHeaders	true
headerParameters	
parameters	
0	
name	"Authorization"
value	"Bearer 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"
1	
name	"Content-Type"
value	"application/json"
sendBody	true
specifyBody	"json"
jsonBody	'={{ { "model": "anthropic/claude-3.5-sonnet", "messages": [{ "role": "user", "content": "TASK: Generate follow-up email body only (NO SUBJECT LINE). CRITICAL FORMATTING REQUIREMENTS: 15 words maximum, Double line break after every period question mark exclamation mark, No quotation marks in output, Use firstName: " + $json.firstName + ", NO signature variables or sign-offs, Must end with question mark. FORBIDDEN: Do not write a subject line for Email 2. STRUCTURE: [Polite interruption], " + $json.firstName + ". [Problem restatement]; [offer ask]? EXAMPLE OUTPUT: Sorry to interrupt, " + $json.firstName + ". Rollout gaps slow expansion; want the short checklist? OUTPUT: Return body only with required spacing, no quotes" }], "temperature": 0.7 } }}'
options	
response	
response	
neverError	true
timeout	30000
id	"email2-body-001"
name	"Email 2 Body Generator"
type	"n8n-nodes-base.httpRequest"
typeVersion	4
position	
0	1552
1	592
10	
parameters	
method	"POST"
url	"https://openrouter.ai/api/v1/chat/completions"
sendHeaders	true
headerParameters	
parameters	
0	
name	"Authorization"
value	"Bearer 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"
1	
name	"Content-Type"
value	"application/json"
sendBody	true
specifyBody	"json"
jsonBody	'={{ { "model": "anthropic/claude-3.5-sonnet", "messages": [{ "role": "user", "content": "TASK: Generate final email subject line. CRITICAL FORMATTING REQUIREMENTS: 2-3 words maximum, No quotation marks in output, Use firstName or companyName: " + $json.firstName + " OR " + ($json.companyName || "company") + ", Sentence case or lower case only. SUBJECT LINE RULES: Include firstName: " + $json.firstName + " OR companyName: " + ($json.companyName || "company") + ", Extremely matter-of-fact colleague-style, NO sales/promotional language, NO product words or asks, May reference industry: " + $json.industry + " if natural. GOOD EXAMPLES: " + $json.firstName + " onboarding, " + ($json.companyName || "company") + " scaling, " + $json.firstName + " processes. OUTPUT: Return subject line only, no quotes, ready for email tool" }], "temperature": 0.7 } }}'
options	
response	
response	
neverError	true
timeout	30000
id	"email3-subject-001"
name	"Email 3 Subject Generator"
type	"n8n-nodes-base.httpRequest"
typeVersion	4
position	
0	1552
1	784
11	
parameters	
method	"POST"
url	"https://openrouter.ai/api/v1/chat/completions"
sendHeaders	true
headerParameters	
parameters	
0	
name	"Authorization"
value	"Bearer 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"
1	
name	"Content-Type"
value	"application/json"
sendBody	true
specifyBody	"json"
jsonBody	'={{ { "model": "anthropic/claude-3.5-sonnet", "messages": [{ "role": "user", "content": "TASK: Generate final email body. CRITICAL FORMATTING REQUIREMENTS: 10-15 words maximum, Double line break after every period question mark exclamation mark, No quotation marks in output, Use firstName: " + $json.firstName + ", NO signature variables or sign-offs. OPENER VARIATIONS: Quick note " + $json.firstName + ", Before I close " + $json.firstName + ", Lastly " + $json.firstName + ", One last point " + $json.firstName + ", Final thought " + $json.firstName + ". STRUCTURE: [Varied opener], " + $json.firstName + ". [New personalization]; [problem connection]. EXAMPLE OUTPUT: Quick note, " + $json.firstName + ". Noticed hiring surge; it amplifies onboarding gaps we can close. OUTPUT: Return body only with required spacing, no quotes" }], "temperature": 0.8 } }}'
options	
response	
response	
neverError	true
timeout	30000
id	"email3-body-001"
name	"Email 3 Body Generator"
type	"n8n-nodes-base.httpRequest"
typeVersion	4
position	
0	1552
1	976
12	
parameters	
operation	"update"
documentId	
__rl	true
value	"1cc8iR_a1eTeCxvYsQAiC7_okPMWiKvAmC-a_8LxZLVY"
mode	"id"
sheetName	
__rl	true
value	631684632
mode	"list"
cachedResultName	"Search URLs"
cachedResultUrl	"https://docs.google.com/spreadsheets/d/1cc8iR_a1eTeCxvYsQAiC7_okPMWiKvAmC-a_8LxZLVY/edit#gid=631684632"
columns	
mappingMode	"defineBelow"
value	
Sending Company Name	"="
Sending Company Industry	"="
Sending Company Offer	"="
Verification Status	'={{ $("REOON Email Verification").item.json.status ?? "unknown" }}'
job_title	'={{ $("Apify LinkedIn Scraper").item.json.experience?.[0]?.title ?? "No title found" }}'
email 1_subject_line	"={{ $json.choices[0].message.content }}"
email 1_personalized_icebreaker	'={{ $("Email 1 Body Generator").item.json.choices[0].message.content }}'
email 2_personalized_follow_up	"={{ $json.choices[0].message.content }}"
email 3_subject_line	"={{ $json.choices[0].message.content }}"
email 3_personalized_icebreaker	"={{ $json.choices[0].message.content }}"
email	'={{ $("Consolidate Data Variables").item.json.email ?? $("Read Google Sheets").item.json.email ?? "No email" }}'
row_number	0
matchingColumns	
0	"email"
schema	
0	
id	"Sending Company Name"
displayName	"Sending Company Name"
required	false
defaultMatch	false
display	true
type	"string"
canBeUsedToMatch	true
1	
id	"Sending Company Industry"
displayName	"Sending Company Industry"
required	false
defaultMatch	false
display	true
type	"string"
canBeUsedToMatch	true
2	
id	"Sending Company Offer"
displayName	"Sending Company Offer"
required	false
defaultMatch	false
display	true
type	"string"
canBeUsedToMatch	true
3	
id	"email"
displayName	"email"
required	false
defaultMatch	false
display	true
type	"string"
canBeUsedToMatch	true
4	
id	"linkedin_url"
displayName	"linkedin_url"
required	false
defaultMatch	false
display	true
type	"string"
canBeUsedToMatch	true
removed	false
5	
id	"first_name"
displayName	"first_name"
required	false
defaultMatch	false
display	true
type	"string"
canBeUsedToMatch	true
removed	false
6	
id	"last_name"
displayName	"last_name"
required	false
defaultMatch	false
display	true
type	"string"
canBeUsedToMatch	true
removed	false
7	
id	"company_name "
displayName	"company_name "
required	false
defaultMatch	false
display	true
type	"string"
canBeUsedToMatch	true
removed	false
8	
id	"Headcount"
displayName	"Headcount"
required	false
defaultMatch	false
display	true
type	"string"
canBeUsedToMatch	true
removed	false
9	
id	"Industry"
displayName	"Industry"
required	false
defaultMatch	false
display	true
type	"string"
canBeUsedToMatch	true
removed	false
10	
id	"company_website_url"
displayName	"company_website_url"
required	false
defaultMatch	false
display	true
type	"string"
canBeUsedToMatch	true
removed	false
11	
id	"mobile_phone_number"
displayName	"mobile_phone_number"
required	false
defaultMatch	false
display	true
type	"string"
canBeUsedToMatch	true
removed	false
12	
id	"Verification Status"
displayName	"Verification Status"
required	false
defaultMatch	false
display	true
type	"string"
canBeUsedToMatch	true
13	
id	"job_title"
displayName	"job_title"
required	false
defaultMatch	false
display	true
type	"string"
canBeUsedToMatch	true
14	
id	"email 1_subject_line"
displayName	"email 1_subject_line"
required	false
defaultMatch	false
display	true
type	"string"
canBeUsedToMatch	true
15	
id	"email 1_personalized_icebreaker"
displayName	"email 1_personalized_icebreaker"
required	false
defaultMatch	false
display	true
type	"string"
canBeUsedToMatch	true
16	
id	"email 2_personalized_follow_up"
displayName	"email 2_personalized_follow_up"
required	false
defaultMatch	false
display	true
type	"string"
canBeUsedToMatch	true
17	
id	"email 3_subject_line"
displayName	"email 3_subject_line"
required	false
defaultMatch	false
display	true
type	"string"
canBeUsedToMatch	true
18	
id	"email 3_personalized_icebreaker"
displayName	"email 3_personalized_icebreaker"
required	false
defaultMatch	false
display	true
type	"string"
canBeUsedToMatch	true
19	
id	"row_number"
displayName	"row_number"
required	false
defaultMatch	false
display	true
type	"number"
canBeUsedToMatch	true
readOnly	true
removed	true
attemptToConvertTypes	false
convertFieldsToString	false
options	{}
id	"sheets-update-001"
name	"Update Google Sheets"
type	"n8n-nodes-base.googleSheets"
typeVersion	4
position	
0	2080
1	640
credentials	
googleSheetsOAuth2Api	
id	"YyhIwFvYTBu0kU19"
name	"Google Sheets account"
pinData	{}
connections	
Manual Trigger	
main	
0	
0	
node	"Read Google Sheets"
type	"main"
index	0
Read Google Sheets	
main	
0	
0	
node	"REOON Email Verification"
type	"main"
index	0
REOON Email Verification	
main	
0	
0	
node	"Filter Valid Emails"
type	"main"
index	0
Filter Valid Emails	
main	
0	
0	
node	"Apify LinkedIn Scraper"
type	"main"
index	0
1	
node	"Company Website Scraper"
type	"main"
index	0
Apify LinkedIn Scraper	
main	
0	
0	
node	"Consolidate Data Variables"
type	"main"
index	0
Company Website Scraper	
main	
0	
0	
node	"Consolidate Data Variables"
type	"main"
index	1
Consolidate Data Variables	
main	
0	
0	
node	"Email 1 Subject Generator"
type	"main"
index	0
1	
node	"Email 1 Body Generator"
type	"main"
index	0
2	
node	"Email 2 Body Generator"
type	"main"
index	0
3	
node	"Email 3 Subject Generator"
type	"main"
index	0
4	
node	"Email 3 Body Generator"
type	"main"
index	0
Email 1 Subject Generator	
main	
0	
0	
node	"Update Google Sheets"
type	"main"
index	0
Email 1 Body Generator	
main	
0	
0	
node	"Update Google Sheets"
type	"main"
index	1
Email 2 Body Generator	
main	
0	
0	
node	"Update Google Sheets"
type	"main"
index	2
Email 3 Subject Generator	
main	
0	
0	
node	"Update Google Sheets"
type	"main"
index	3
Email 3 Body Generator	
main	
0	
0	
node	"Update Google Sheets"
type	"main"
index	4
active	false
settings	
executionOrder	"v1"
versionId	"eece068a-a75c-4c35-a9a6-f81fb17a0c41"
meta	
instanceId	"d68549a94a6d7dd20fe641b66ab9456399f5b75322369bee6d0283b5dd4ca0ec"
id	"EGRsYlftlWrhAPVf"
tags	[]

Please share your workflow so we get a better idea of the logic

p.s. The troublesome node is the very last ‘Sheets’ node in the workflow.

Data is pinned.

The workflow you shared is not correct json data. Please select all nodes in your workflow and paste into a code block in here. Else try and share the json file on a google drive or something. I am unable to import your workflow

*not been

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.