can u create n8n automations
- User
can u create n8n automations
Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
can u create n8n automations
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
Okay, I can definitely help you create n8n automations! However, I can't directly run them. I can provide you with the JSON workflow definitions, explain the nodes, and give you guidance on how to import and configure them in your n8n instance.
To give you the best help, I need to know what you want to automate. But I'll start by giving you a few examples, ranging from simple to more complex, and then I'll explain how to get them into n8n. After that, I'll ask you about your specific automation needs.
Here's how we'll approach this:
1. Simple: Receive a Webhook and Send an Email
This automation listens for a webhook request and then sends an email with the data received.
{
"nodes": [
{
"parameters": {},
"id": "a1b2c3d4e5f67890",
"name": "Start - Webhook",
"type": "n8n-nodes-base.webhook",
"typeVersion": 1,
"position": [
240,
300
]
},
{
"parameters": {
"host": "smtp.gmail.com",
"port": 465,
"secure": true,
"authentication": "plain",
"username": "{{$node[\"a1b2c3d4e5f67890\"].json[\"body\"][\"email\"]}}", // Replace with your email
"password": "{{$secrets.emailPassword}}", // Use n8n secrets for security
"to": "recipient@example.com", // Replace with recipient email
"subject": "Webhook Data",
"text": "{{$node[\"a1b2c3d4e5f67890\"].json[\"body\"][\"message\"]}}"
},
"id": "f9e8d7c6b5a43210",
"name": "Send Email",
"type": "n8n-nodes-base.emailSend",
"typeVersion": 1,
"position": [
640,
300
]
}
],
"connections": {
"a1b2c3d4e5f67890": {
"main": [
[
{
"node": "f9e8d7c6b5a43210",
"type": "main",
"index": 0
}
]
]
}
}
}
Explanation:
host, port, secure, authentication: These are SMTP server details (Gmail example). You'll need to adjust these for your email provider.username: The email address you're sending from. I've used data from the webhook body.password: Important: Store your email password as an n8n secret (see below). This is much more secure than hardcoding it.to: The recipient's email address.subject: The email subject.text: The email body. I've used data from the webhook body.2. Intermediate: Google Sheets to Slack
This automation reads a row from a Google Sheet when a new row is added and posts a message to a Slack channel.
{
"nodes": [
{
"parameters": {
"spreadsheetId": "YOUR_SPREADSHEET_ID",
"sheetName": "Sheet1",
"query": ""
},
"id": "1234567890abcdef",
"name": "Google Sheets - Get Row",
"type": "n8n-nodes-base.googleSheets",
"typeVersion": 1,
"position": [
240,
300
]
},
{
"parameters": {
"channel": "#your-slack-channel",
"message": "New row added to Google Sheets:\n{{$node[\"1234567890abcdef\"].json[\"values\"][0]}}"
},
"id": "fedcba0987654321",
"name": "Slack - Post Message",
"type": "n8n-nodes-base.slack",
"typeVersion": 1,
"position": [
640,
300
]
},
{
"parameters": {
"spreadsheetId": "YOUR_SPREADSHEET_ID",
"sheetName": "Sheet1",
"operation": "Watch Rows",
"watchTrigger": "New Row"
},
"id": "9876543210fedcba",
"name": "Google Sheets - Watch Rows",
"type": "n8n-nodes-base.googleSheets",
"typeVersion": 1,
"position": [
240,
100
]
}
],
"connections": {
"9876543210fedcba": {
"main": [
[
{
"node": "1234567890abcdef",
"type": "main",
"index": 0
}
]
]
},
"1234567890abcdef": {
"main": [
[
{
"node": "fedcba0987654321",
"type": "main",
"index": 0
}
]
]
}
}
}
Explanation:
3. More Complex: Twitter Search to Airtable
This automation searches Twitter for specific keywords and saves the results to an Airtable base.
(This one is longer, so I'll provide a link to a gist instead of pasting the full JSON here: https://gist.github.com/your-github-username/replace-with-gist-id - You'll need to create a gist on GitHub and replace the placeholder with the gist ID.)
Explanation:
Important: Secrets
For sensitive information like API keys and passwords, always use n8n's secret management. Instead of hardcoding the values in the JSON, use placeholders like {{$secrets.apiKey}}. You'll then need to define the secret in n8n's settings. This is much more secure.
Okay, that's a lot of information. Now it's your turn. Tell me about the automation you want to create. Please be as specific as possible. Consider these questions:
The more details you provide, the better I can help you create a working n8n automation. Let's start with the trigger – what event should start this automation? I'm ready when you are!