The method
Use this prompt directly in ChatGPT/Gemini/Claude. Paste the n8n workflow JSON or a description of its nodes and connections. Specify the input data. Ideally, use with smaller workflows first to ensure manageable outputs. Refine prompts based on LLM responses.
The prompts
Prompt 1
Analyze the following n8n workflow JSON and identify any potential errors, inefficiencies, or areas for improvement. Explain your reasoning for each suggestion. The workflow receives data from a webhook, transforms it using a Function node, and then sends it to a Google Sheets node. Input data example: `{"name": "John Doe", "email": "[email protected]"}`. Workflow JSON: ```json
{
"nodes": [
{
"parameters": {},
"name": "Webhook",
"type": "webhook",
"typeVersion": 1
},
{
"parameters": {
"jsCode": "item.newName = item.name.toUpperCase();nreturn item;"
},
"name": "Function",
"type": "function",
"typeVersion": 1
},
{
"parameters": {},
"name": "Google Sheets",
"type": "googleSheets",
"typeVersion": 1
}
],
"connections": [
{
"source": "Webhook",
"destination": "Function"
},
{
"source": "Function",
"destination": "Google Sheets"
}
]
}
```
{
"nodes": [
{
"parameters": {},
"name": "Webhook",
"type": "webhook",
"typeVersion": 1
},
{
"parameters": {
"jsCode": "item.newName = item.name.toUpperCase();nreturn item;"
},
"name": "Function",
"type": "function",
"typeVersion": 1
},
{
"parameters": {},
"name": "Google Sheets",
"type": "googleSheets",
"typeVersion": 1
}
],
"connections": [
{
"source": "Webhook",
"destination": "Function"
},
{
"source": "Function",
"destination": "Google Sheets"
}
]
}
```
Prompt 2
I have an n8n workflow that's supposed to trigger when a new row is added to a Google Sheet, then send a customized email using the data from that row. However, the workflow isn't triggering consistently. The Google Sheet trigger node is set up with the correct spreadsheet ID and range. The email sending node is configured with SMTP credentials and utilizes data from the trigger. Could you review the steps, configurations, and potential reasons why the workflow might not be triggering reliably and provide troubleshooting steps? Consider factors like polling intervals, API authentication, and common configuration errors in n8n's Google Sheets and Email nodes.