Articles on: Linux VPS

How to Build Automation Workflows with n8n on Your VPS

What can you do in n8n?
n8n allows you to automate tasks by connecting various apps and services through an easy-to-use visual workflow editor. You can integrate APIs, handle data transformations, and trigger actions based on specific events such as receiving new emails, form submissions, or defined schedules.

Example of what you can build using n8n on your VPS



Send newly received Gmail messages to a Slack channel as team notifications.
Automatically save form submissions from Typeform into a Google Sheet.
Scheduled Twitter posts automatically by pulling content from an RSS feed.
Sync new CRM data (e.g., HubSpot) with Airtable or your internal database in real time.
Trigger custom workflows via webhooks when a customer makes a purchase on your Shopify store.

This guide will walk you through how to build basic workflows in the n8n panel, hosted on your VPS. In this example, you’ll create an automation that fetches unread emails from Gmail and log their details (like Subject, From, and Date) into a Google Sheet.

Log in to your n8n panel using the email and password you used during the initial setup when you first accessed the panel.
Click on 'Start from scratch' to begin creating your first workflow, as this is a new setup.

Click the '+ Add first step' button in the center of the page to select a trigger node.

You may choose a trigger that best suits your project. For this guide, we will use the trigger manually.

Once you have selected the trigger node, you can add the next nodes by clicking the '+' button after trigger node.

You may choose any node that suits your project requirements. For this guide, we will select the Gmail node.

Next, you need to select the appropriate action. Since we want to fetch unread emails, the suitable action is 'Get many messages'.

Then, you need to configure the parameters. If you have already set up Gmail credentials, you can select the available credential. If not, expand the 'Choose Credential' section and click '+ Create New Credential'.

By clicking setup new credential, a window like the one shown below will appear. To obtain the Client ID and Client Secret, you need to access the Google Cloud Platform.

You need to copy the OAuth Redirect URL and paste it into the Authorized redirect URLs field in Step 16.

In the Google Cloud Platform, you can either select an existing project or create a new one by clicking the 'Select a project' at the top left for your n8n integration.


Click on New Project to create a new project.

Enter the Project Name and Location, then click the 'Create' button.

Once you are redirected to the dashboard of the newly created project, use the search bar at the top to find 'Gmail API' and click on it.

Click the 'Enable' button to activate the Gmail API and link it to your Gmail credentials.

Click the 'Create credentials' button.

Select 'User data' as the data type, then click the 'Next' button to proceed.

Fill in the App name, User support email, and Developer contact information fields, then click 'Save and continue' to proceed.

For the Scopes section, you can skip it and proceed by clicking Save and continue.

Select Web application as the application type, enter a name, click + Add URI under Authorized redirect URIs, and paste the URL retrieved from the n8n panel as mentioned in Step 6. Once done you can click the 'Create' button.

You can click Copy for the Client ID credential and then proceed by clicking Done.

After completing the credential setup, navigate back to the Credentials tab and click the pencil icon to edit.

You can click Copy for the Client secret credential, then go to the n8n panel to paste the Client ID and Client secret that you have copied.

Paste the details you copied in Step 17 and Step 19 here. Once you've filled out the fields, proceed by clicking the Sign in with Google button.

Paste the data copied in Step 17 into the Client ID field, and the data from Step 19 into the Client secret field.

If you receive an "Access blocked: gbnet.cloud has not completed the Google verification process" error, follow this step; otherwise, you can skip it.

To fix this, go back to Google Cloud Platform, click the Audience tab, then click Publish app and confirm to proceed.

Make sure the status changes to Back to testing, then try signing in with Google again.

On this screen, simply expand Advanced and click "Go to gbnet.cloud (unsafe)" to proceed

Ensure to select All access for Gmail to ensure full functionality, then click Continue to proceed.

After successfully connecting with Gmail, verify that the data has been saved, then close the credentials page.

You can click the Test step button, and the output will be displayed on the right side.

The Gmail node has been successfully configured. You can now proceed to add the next node, Google Sheets.

If you are using Google Sheets, you also need to enable the Google Drive API.

You may repeat step 4, but this time change the search to Google Sheets and Google Drive API.

You need to select the appropriate action. Since we want to put the data in Google Sheets, the suitable action is 'Append or update row in sheet'.

Then, you need to configure the parameters. If you have already set up Google Sheets credential, you can select the available credential. If not, you may click '+ Create New Credential'.

You may repeat step 10 and 11, but this time change the search to Google Sheets API.

Paste the details you copied in Step 17 and Step 19 here. Once you've filled out the fields, proceed by clicking the Sign in with Google button.

You may repeat step 22 to 24.

You may get the Client ID and Client Secret in this page.
navigate this page, refer to Step 18.

After successfully connecting with Google, set the Document and Sheet to store the data fetched from Gmail. Once confirmed, click Test step and check the output on the right side.

After configuring the Google Sheets node, you can test the workflow and wait for it to execute.

To verify, open the sheet you configured to check if the data has been successfully fetched.


You have successfully build workflows in n8n

If you face any issues or need assistance, don’t hesitate to reach out — our support team is always ready to help!

🔧 Need help? Submit a Support Ticket
💬 Chat with us on Live Chat via our website

Updated on: 27/05/2025

Was this article helpful?

Share your feedback

Cancel

Thank you!