Brand new to n8n. Some help would be amazing

Hi all,

I am brand new to n8n. I am setting it up because the company i work for needs to streamline a lot of our processes. For instance the problem im trying to solve now is i want to send an email to certain emails every time a row is added to a google sheet. This will function as our order form and lets the warehouse know they need to send out a specific item. Is there somewhere i could use to get a better understanding of how to work with this amazing program?

PS: I read through all of the documentation concerning the google api.

Welcome to the community @Scott_Wadsworth!

Sadly do we not have a Google Sheets Trigger node yet. But it got requested already:

So for now a workaround is needed. If I remember correctly did we actually want to create a tutorial that does exactly that. Will check with my team where we stand and then update here.

But it will be more or less identical to what is happening here:

1 Like

Ok, there is a workaround using a free plugin for google sheets called trigger and send. This plugin will send an HTTP Request to an endpoint every time a form (associated with a spreadsheet) is submitted. You can catch that HTTP Request using the webhook node and then send the email using one of the nodes to do so.

The plugin can be found here.

1 November, 2020 - Loom Recording — Watch Video

5 Likes

THANK YOU seriously this is a huge help and great step in the right direction. I do look forward to the actual gsheets node. how do i get the webohook url to be valid?

Of course. Not sure what do you mean by to be valid. Can you please elaborate?

If it says localhost then you have to set the env variable WEBHOOK_TUNNEL_URL. More info about that can be found here.

Thank you for your help! So basically all I have to do is set it up to transmit through? even if there is no domain pointing at it?

Not sure what you mean with event if there is no domain pointing at it. Can you please elaborate?

You have to add the url you grabbed from the webhook node to trigger and send plugin.

So i have it set up on my personal network.

So is it possible to use this same idea to say create a user in google workspace based on the information from the webhook then add that user to a group? Im a complete newb when it comes to this program and am honestly struggling to wrap my head around it.

Yes, this is completely posible. You just have to connect the Webhook to the G Admin node. I guessing you need to use the data from the webhook node in the G Admin node and this can be done expressions.
More info about expressions can be found here.

Let me know if something it’s not clear.

Ok so im not really understanding this very well. How does one exactly create a user from the webhook?

You have to reference the data coming from the webhook node in the G Admin Node. This tutorial might be helpful to understand the whole picture.

Im sorry to keep being a bother. SO i’ve got it successfully creating the user. But now i need it to actually add that user to a group based on what department is listed.

The idea is this. I fill out a google form with the techs information, it creates a user adds that user to the company group, and then whatever other group they are selected for. It then sends that user an email with their log in information. It would also send an email to our billing manager and HR department saying hey we’ve hired this person at this much from this state. Here is their contact information.

I have not got it to successfully add the created user to the group. That doesn’t actually seem to be possible with n8n… Am i just going overboard here?

You are not bothering me at all. This is one of the main purposes of the community.

ah, that is a good use case. Yeah, that should be possible using the group:create on the G Suite Node. Can you please share the workflow with me so that I can have a proper look? Also If you can tell me how the data the Webhook node is receiving looks like.

To share the workflow just select all nodes, copy them, and then paste them here. Do not worry about credentials as they are not copied.

{
“nodes”: [
{
“parameters”: {
“httpMethod”: “POST”,
“path”: “5783ba8d-2e33-4444-bed7-f070edd596ea”,
“options”: {}
},
“name”: “Webhook”,
“type”: “n8n-nodes-base.webhook”,
“typeVersion”: 1,
“position”: [
510,
300
],
“webhookId”: “5783ba8d-2e33-4444-bed7-f070edd596ea”
},
{
“parameters”: {
“firstName”: “={{$json[“body”][“First”]}}”,
“lastName”: “= {{$json[“body”][“Last”]}}”,
“password”: “Password12#$”,
“domain”: “ltdbroadband.com”,
“username”: “={{$json[“body”][“First”]}}{{$json[“body”][“Last”]}}”,
“additionalFields”: {
“changePasswordAtNextLogin”: true,
“emailUi”: {
“emailValues”: [
{
“type”: “home”,
“address”: “={{$json[“body”][“Employee_Email”]}}”
}
]
}
}
},
“name”: “G Suite Admin”,
“type”: “n8n-nodes-base.gSuiteAdmin”,
“position”: [
750,
300
],
“typeVersion”: 1,
“credentials”: {
“gSuiteAdminOAuth2Api”: “test”
}
},
{
“parameters”: {
“resource”: “group”,
“operation”: “update”,
“groupId”: “[email protected]”,
“updateFields”: {}
},
“name”: “G Suite Admin1”,
“type”: “n8n-nodes-base.gSuiteAdmin”,
“typeVersion”: 1,
“position”: [
960,
300
],
“credentials”: {
“gSuiteAdminOAuth2Api”: “test”
}
}
],
“connections”: {
“Webhook”: {
“main”: [
[
{
“node”: “G Suite Admin”,
“type”: “main”,
“index”: 0
}
]
]
},
“G Suite Admin”: {
“main”: [
[
{
“node”: “G Suite Admin1”,
“type”: “main”,
“index”: 0
}
]
]
}
}
}

theres what i have so far.

Cannot paste the workflow. Make sure you select all the nodes. Also, the workflow you pasted has “ and it should be ". So, definitely, something happened there.

{
“nodes”: [
{
“parameters”: {},
“name”: “Start”,
“type”: “n8n-nodes-base.start”,
“typeVersion”: 1,
“position”: [
250,
300
]
},
{
“parameters”: {
“httpMethod”: “POST”,
“path”: “5783ba8d-2e33-4444-bed7-f070edd596ea”,
“options”: {}
},
“name”: “Webhook”,
“type”: “n8n-nodes-base.webhook”,
“typeVersion”: 1,
“position”: [
510,
300
],
“webhookId”: “5783ba8d-2e33-4444-bed7-f070edd596ea”
},
{
“parameters”: {
“firstName”: “={{$json[“body”][“First”]}}”,
“lastName”: “= {{$json[“body”][“Last”]}}”,
“password”: “Password12#$”,
“domain”: “ltdbroadband.com”,
“username”: “={{$json[“body”][“First”]}}{{$json[“body”][“Last”]}}”,
“additionalFields”: {
“changePasswordAtNextLogin”: true,
“emailUi”: {
“emailValues”: [
{
“type”: “home”,
“address”: “={{$json[“body”][“Employee_Email”]}}”
}
]
}
}
},
“name”: “G Suite Admin”,
“type”: “n8n-nodes-base.gSuiteAdmin”,
“position”: [
750,
300
],
“typeVersion”: 1,
“credentials”: {
“gSuiteAdminOAuth2Api”: “test”
}
},
{
“parameters”: {
“resource”: “group”,
“operation”: “update”,
“groupId”: “[email protected]”,
“updateFields”: {}
},
“name”: “G Suite Admin1”,
“type”: “n8n-nodes-base.gSuiteAdmin”,
“typeVersion”: 1,
“position”: [
960,
300
],
“credentials”: {
“gSuiteAdminOAuth2Api”: “test”
}
}
],
“connections”: {
“Webhook”: {
“main”: [
[
{
“node”: “G Suite Admin”,
“type”: “main”,
“index”: 0
}
]
]
},
“G Suite Admin”: {
“main”: [
[
{
“node”: “G Suite Admin1”,
“type”: “main”,
“index”: 0
}
]
]
}
}
}

i think i missed the start module.

Ah now I understand. Yes, there is no way to add a user to a group yet. In order to do so, the member resource has to be implemented. Will add it to my TODO list.