Skip to content
Need assistance wit...
 
Notifications
Clear all

Need assistance with a Google Sheets integration issue

5 Posts
4 Users
0 Reactions
3 Views
Steveire
(@steveire)
Posts: 2
New Member
Topic starter
 

Hi, I've set up the following flow (voice to send email):

However, I'm encountering an error in the logs: "it seems you haven’t provided the recipient’s name or the content of the email you’d like me to draft. Could you please specify the details, including the recipient’s name and the purpose or main message of the email?" The voice agent in 11L indicates that the email has been sent, but it's not actually being sent. My contact data is stored in Google Drive. As you can probably tell, I'm quite new to this.

json
{
"nodes": [
{
"parameters": {
"options": {}
},
"id": "f324e45f-063a-4250-b462-c944893ef718",
"name": "OpenAI Chat Model",
"type": "@callin.io/n8n-nodes-langchain.lmChatOpenAi",
"typeVersion": 1,
"position": [
160,
220
],
"credentials": {
"openAiApi": {
"id": "Co43TImWNrXmsUx0",
"name": "callin.io free OpenAI API credits"
}
}
},
{
"parameters": {
"options": {}
},
"id": "e9b9e2ed-15c4-45d5-9aad-9392eadd6ee7",
"name": "Respond to Webhook",
"type": "callin.io-nodes-base.respondToWebhook",
"typeVersion": 1.1,
"position": [
600,
0
]
},
{
"parameters": {
"httpMethod": "POST",
"path": "n8n",
"responseMode": "responseNode",
"options": {}
},
"id": "a30bad94-cd4f-4437-bed9-dce7b79816f8",
"name": "Webhook",
"type": "callin.io-nodes-base.webhook",
"typeVersion": 2,
"position": [
0,
0
],
"webhookId": "44fd9c8a-250a-4c05-9035-91bf6f85d015"
},
{
"parameters": {
"promptType": "define",
"text": "=Email for: {{ $json.body.to }}nEmail content: {{ $json.body.emailContent }}",
"options": {
"systemMessage": "= Overview nYou are an AI agent responsible for drafting and sending professional emails based on user instructions. You have access to two tools: "ContactData" to find email addresses and "sendEmail" to compose and send emails. Your objective is to identify the recipient’s contact information, draft a professional email, and sign off as "[Steve]" before sending.nn—nn Context n- Incoming requests are received via webhook in natural language format (e.g., "Email John Doe to confirm the Tuesday meeting."). n- The email should be formal, polite, and task-specific. n- All emails should include a closing line and signature. n- If contact data is not found, return an error message in the webhook response.nn—nn Instructions n1. Parse the request message to extract the recipient’s name and purpose of the email. n2. Use the __contactData__ tool to retrieve the recipient’s email address. n3. Draft a professional email including: n - Appropriate greeting n - Main message based on the input n - Sign-off line ("Best regards," or similar) n - Signature as "[Steve]" n4. Use the __sendEmail__ tool with the recipient’s email, a suitable subject, and the drafted body. n5. Return a response to the webhook indicating the email was successfully sent, or return an error if failed. nn—nn Tools n- __contactData__ n - Purpose: Look up recipient email addresses n - Input: `` name `` (e.g., "Jane Smith") n - Output: `` email `` (e.g., "janesmith@example.com") nn- __Gmail__ n - Purpose: Send an email with subject and content n - Input: n - `` recipient ``: Email address n - `` subject ``: Email subject line n - `` body ``: Full message body nn—nn Examples n- Input: "Send an email to Sarah Lee to thank her for her feedback on the proposal." n- Output: n - Subject: "Thank You for Your Feedback" n - Body: n "Hi Sarah, n Thank you for your feedback on the proposal. I truly appreciate your input and suggestions. n Best regards, n [Steve]"nn—nn SOP (Standard Operating Procedure) n1. Receive input via webhook. n2. Extract name and intent from message. n3. Query `` contactData `` using extracted name. n4. If contact found: n a. Draft email body based on intent. n b. Compose a subject line from intent. n c. Call `` sendEmail `` with email, subject, and body. n d. Return success message to webhook. n5. If contact not found: n a. Return error message to webhook indicating recipient not found. nn—nn Final Notes n- Keep the tone polite and professional. n- Always include a greeting and closing in the message. n- If more than one name is detected, default to the first unless specified. n—n"
},
"id": "e1d04d01-4644-4167-bce8-3c6a7ce8c9e3",
"name": "Email Agent",
"type": "@callin.io/n8n-nodes-langchain.agent",
"typeVersion": 1.7,
"position": [
220,
0
]
},
{
"parameters": {
"documentId": {
"__rl": true,
"value": "1w5eMUty6Bzdd8gEO4Irp_n8NV9SJWKqLYqKjXPuKbrY",
"mode": "list",
"cachedResultName": "ContactData",
"cachedResultUrl": "<a href="https://docs.google.com/spreadsheets/d/1w5eMUty6Bzdd8gEO4Irp_n8NV9SJWKqLYqKjXPuKbrY/edit?usp=drivesdk" rel="noopener nofollow ugc"> https://docs.google.com/spreadsheets/d/1w5eMUty6Bzdd8gEO4Irp_n8NV9SJWKqLYqKjXPuKbrY/edit?usp=drivesdk</a> ;"
},
"sheetName": {
"__rl": true,
"value": "gid=0",
"mode": "list",
"cachedResultName": "Sheet1",
"cachedResultUrl": "<a href="https://docs.google.com/spreadsheets/d/1w5eMUty6Bzdd8gEO4Irp_n8NV9SJWKqLYqKjXPuKbrY/edit#gid=0" rel="noopener nofollow ugc"> https://docs.google.com/spreadsheets/d/1w5eMUty6Bzdd8gEO4Irp_n8NV9SJWKqLYqKjXPuKbrY/edit#gid=0</a> ;"
},
"options": {}
},
"type": "callin.io-nodes-base.googleSheetsTool",
"typeVersion": 4.5,
"position": [
360,
220
],
"id": "4f672517-2638-4b7f-91ac-5facbf9a61c9",
"name": "Contact Data",
"credentials": {
"googleSheetsOAuth2Api": {
"id": "DkBVfBIYMUB1U880",
"name": "callin.io Google Sheets account"
}
}
},
{
"parameters": {
"sendTo": "={{ $fromAI("emailaddress") }}",
"subject": "={{ $fromAI("Subject") }}",
"emailType": "text",
"message": "={{ $fromAI("emailbody") }}",
"options": {}
},
"type": "callin.io-nodes-base.gmailTool",
"typeVersion": 2.1,
"position": [
480,
220
],
"id": "d89cf9a0-2219-431e-a3d8-13626511736f",
"name": "sendEmail",
"webhookId": "dee5c1f2-dd6a-4f05-a0e7-9ae3f69fffb6",
"credentials": {
"gmailOAuth2": {
"id": "tlWkRfeFJH6KPKRH",
"name": "callin.io Gmail account"
}
}
}
],
"connections": {
"OpenAI Chat Model": {
"ai_languageModel": [
[
{
"node": "Email Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Webhook": {
"main": [
[
{
"node": "Email Agent",
"type": "main",
"index": 0
}
]
]
},
"Email Agent": {
"main": [
[
{
"node": "Respond to Webhook",
"type": "main",
"index": 0
}
]
]
},
"Contact Data": {
"ai_tool": [
[
{
"node": "Email Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"sendEmail": {
"ai_tool": [
[
{
"node": "Email Agent",
"type": "ai_tool",
"index": 0
}
]
]
}
},
"pinData": {},
"meta": {
"templateCredsSetupCompleted": true,
"instanceId": "382ebfd226b7d57a1b8cb1f0acd5a4e73279906faf7b3d563d15b8377371a9f2"
}
}

 
Posted : 04/04/2025 11:07 am
jcuypers
(@jcuypers)
Posts: 29
Eminent Member
 

Hi, could you please share your dynamic workflow? Please copy and paste it into a code segment so it becomes interactive.

Best regards,
j.

 
Posted : 04/04/2025 11:10 am
Steveire
(@steveire)
Posts: 2
New Member
Topic starter
 

Hi, I've just added the information.

json
{
"nodes": [
{
"parameters": {
"options": {}
},
"id": "f324e45f-063a-4250-b462-c944893ef718",
"name": "OpenAI Chat Model",
"type": "<a class="mention" href="/u/n8n">@n8n</a>/n8n-nodes-langchain.lmChatOpenAi",
"typeVersion": 1,
"position": [
160,
220
],
"credentials": {
"openAiApi": {
"id": "Co43TImWNrXmsUx0",
"name": "n8n free OpenAI API credits"
}
}
},
{
"parameters": {
"options": {}
},
"id": "e9b9e2ed-15c4-45d5-9aad-9392eadd6ee7",
"name": "Respond to Webhook",
"type": "n8n-nodes-base.respondToWebhook",
"typeVersion": 1.1,
"position": [
600,
0
]
},
{
"parameters": {
"httpMethod": "POST",
"path": "n8n",
"responseMode": "responseNode",
"options": {}
},
"id": "a30bad94-cd4f-4437-bed9-dce7b79816f8",
"name": "Webhook",
"type": "n8n-nodes-base.webhook",
"typeVersion": 2,
"position": [
0,
0
],
"webhookId": "44fd9c8a-250a-4c05-9035-91bf6f85d015"
},
{
"parameters": {
"promptType": "define",
"text": "=Email for: {{ $json.body.to }}nEmail content: {{ $json.body.emailContent }}",
"options": {
"systemMessage": "=Overview nYou are an AI agent responsible for drafting and sending professional emails based on user instructions. You have access to two tools: "ContactData" to find email addresses and "sendEmail" to compose and send emails. Your objective is to identify the recipient’s contact information, draft a professional email, and sign off as "[Steve]".nn—nnContext n- Incoming requests are received via webhook in natural language format (e.g., "Email John Doe to confirm the Tuesday meeting."). n- The email should be formal, polite, and task-specific. n- All emails should include a closing line and signature. n- If contact data is not found, return an error message in the webhook response.nn—nnInstructions n1. Parse the request message to extract the recipient’s name and purpose of the email.n2. Use the __contactData__ tool to retrieve the recipient’s email address.n3. Draft a professional email including: n - Appropriate greeting n - Main message based on the input n - Sign-off line ("Best regards," or similar) n - Signature as "[Steve]". n4. Use the __sendEmail__ tool with the recipient’s email, a suitable subject, and the drafted body.n5. Return a response to the webhook indicating the email was successfully sent, or return an error if failed.nn—nnTools n- __contactData__ n - Purpose: Look up recipient email addresses n - Input: `` name `` (e.g., "Jane Smith") n - Output: `` email `` (e.g., "janesmith@example.com") nn- __Gmail__ n - Purpose: Send an email with subject and content n - Input: n - `` recipient ``: Email address n - `` subject ``: Email subject line n - `` body ``: Full message body nn—nnExamples n- Input: "Send an email to Sarah Lee to thank her for her feedback on the proposal." n- Output: n - Subject: "Thank You for Your Feedback" n - Body: n "Hi Sarah, n Thank you for your feedback on the proposal. I truly appreciate your input and suggestions. n Best regards, n [Steve]".nn—nnSOP (Standard Operating Procedure) n1. Receive input via webhook.n2. Extract name and intent from message.n3. Query `` contactData `` using extracted name.n4. If contact found: n a. Draft email body based on intent.n b. Compose a subject line from intent.n c. Call `` sendEmail `` with email, subject, and body.n d. Return success message to webhook.n5. If contact not found: n a. Return error message to webhook indicating recipient not found.nn—nnFinal Notes n- Keep the tone polite and professional.n- Always include a greeting and closing in the message.n- If more than one name is detected, default to the first unless specified.n—n"
},
"id": "e1d04d01-4644-4167-bce8-3c6a7ce8c9e3",
"name": "Email Agent",
"type": "<a class="mention" href="/u/n8n">@n8n</a>/n8n-nodes-langchain.agent",
"typeVersion": 1.7,
"position": [
220,
0
]
},
{
"parameters": {
"documentId": {
"__rl": true,
"value": "1w5eMUty6Bzdd8gEO4Irp_n8NV9SJWKqLYqKjXPuKbrY",
"mode": "list",
"cachedResultName": "ContactData",
"cachedResultUrl": "<a href="https://docs.google.com/spreadsheets/d/1w5eMUty6Bzdd8gEO4Irp_n8NV9SJWKqLYqKjXPuKbrY/edit?usp=drivesdk" rel="noopener nofollow ugc"> https://docs.google.com/spreadsheets/d/1w5eMUty6Bzdd8gEO4Irp_n8NV9SJWKqLYqKjXPuKbrY/edit?usp=drivesdk</a> ;"
},
"sheetName": {
"__rl": true,
"value": "gid=0",
"mode": "list",
"cachedResultName": "Sheet1",
"cachedResultUrl": "<a href="https://docs.google.com/spreadsheets/d/1w5eMUty6Bzdd8gEO4Irp_n8NV9SJWKqLYqKjXPuKbrY/edit#gid=0" rel="noopener nofollow ugc"> https://docs.google.com/spreadsheets/d/1w5eMUty6Bzdd8gEO4Irp_n8NV9SJWKqLYqKjXPuKbrY/edit#gid=0</a> ;"
},
"options": {}
},
"type": "n8n-nodes-base.googleSheetsTool",
"typeVersion": 4.5,
"position": [
360,
220
],
"id": "4f672517-2638-4b7f-91ac-5facbf9a61c9",
"name": "Contact Data",
"credentials": {
"googleSheetsOAuth2Api": {
"id": "DkBVfBIYMUB1U880",
"name": "Google Sheets account"
}
}
},
{
"parameters": {
"sendTo": "={{ $fromAI("emailaddress") }}",
"subject": "={{ $fromAI("Subject") }}",
"emailType": "text",
"message": "={{ $fromAI("emailbody") }}",
"options": {}
},
"type": "n8n-nodes-base.gmailTool",
"typeVersion": 2.1,
"position": [
480,
220
],
"id": "d89cf9a0-2219-431e-a3d8-13626511736f",
"name": "sendEmail",
"webhookId": "dee5c1f2-dd6a-4f05-a0e7-9ae3f69fffb6",
"credentials": {
"gmailOAuth2": {
"id": "tlWkRfeFJH6KPKRH",
"name": "Gmail account"
}
}
}
],
"connections": {
"OpenAI Chat Model": {
"ai_languageModel": [
[
{
"node": "Email Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Webhook": {
"main": [
[
{
"node": "Email Agent",
"type": "main",
"index": 0
}
]
]
},
"Email Agent": {
"main": [
[
{
"node": "Respond to Webhook",
"type": "main",
"index": 0
}
]
]
},
"Contact Data": {
"ai_tool": [
[
{
"node": "Email Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"sendEmail": {
"ai_tool": [
[
{
"node": "Email Agent",
"type": "ai_tool",
"index": 0
}
]
]
}
},
"pinData": {},
"meta": {
"templateCredsSetupCompleted": true,
"instanceId": "382ebfd226b7d57a1b8cb1f0acd5a4e73279906faf7b3d563d15b8377371a9f2"
}
}

I hope I've done this correctly.

 
Posted : 04/04/2025 7:48 pm
Olek
 Olek
(@olek)
Posts: 8
Active Member
 

Check out this brief guide on how to post workflows effectively:

 
Posted : 06/04/2025 10:39 am
system
(@system)
Posts: 332
Reputable Member
 

This thread was automatically closed 90 days following the last response. New replies are no longer permitted.

 
Posted : 05/07/2025 10:39 am
Share: