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.

  1. Log in to your n8n panel using the email and password you created during the initial setup.
  1. Click on 'Start from scratch' to begin creating your first workflow, as this is a new setup.
    Screenshot for How to Build Automation Workflows with n8n on Your VPS
  2. Click the '+ Add first step' button in the center of the page to select a trigger node.
    Screenshot for How to Build Automation Workflows with n8n on Your VPS
  • You may choose a trigger that best suits your project. For this guide, we will use the trigger manually.
    Screenshot for How to Build Automation Workflows with n8n on Your VPS
  1. Once you have selected the trigger node, you can add the next nodes by clicking the '+' button after trigger node.
    Screenshot for How to Build Automation Workflows with n8n on Your VPS
  • You may choose any node that suits your project requirements. For this guide, we will select the Gmail node.
    Screenshot for How to Build Automation Workflows with n8n on Your VPS
  1. Next, you need to select the appropriate action. Since we want to fetch unread emails, the suitable action is 'Get many messages'.
    Screenshot for How to Build Automation Workflows with n8n on Your VPS
  • 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'.
    Screenshot for How to Build Automation Workflows with n8n on Your VPS
  1. 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.
    Screenshot for How to Build Automation Workflows with n8n on Your VPS

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

  1. 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.
    Screenshot for How to Build Automation Workflows with n8n on Your VPS

  2. Click on New Project to create a new project.
    Screenshot for How to Build Automation Workflows with n8n on Your VPS

  3. Enter the Project Name and Location, then click the 'Create' button.
    Screenshot for How to Build Automation Workflows with n8n on Your VPS

  4. 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.
    Screenshot for How to Build Automation Workflows with n8n on Your VPS

  5. Click the 'Enable' button to activate the Gmail API and link it to your Gmail credentials.
    Screenshot for How to Build Automation Workflows with n8n on Your VPS

  6. Click the 'Create credentials' button.
    Screenshot for How to Build Automation Workflows with n8n on Your VPS

  7. Select 'User data' as the data type, then click the 'Next' button to proceed.
    Screenshot for How to Build Automation Workflows with n8n on Your VPS

  8. Fill in the App name, User support email, and Developer contact information fields, then click 'Save and continue' to proceed.
    Screenshot for How to Build Automation Workflows with n8n on Your VPS

  9. For the Scopes section, you can skip it and proceed by clicking Save and continue.
    Screenshot for How to Build Automation Workflows with n8n on Your VPS

  10. 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.
    Screenshot for How to Build Automation Workflows with n8n on Your VPS

  11. You can click Copy for the Client ID credential and then proceed by clicking Done.
    Screenshot for How to Build Automation Workflows with n8n on Your VPS

  12. After completing the credential setup, navigate back to the Credentials tab and click the pencil icon to edit.
    Screenshot for How to Build Automation Workflows with n8n on Your VPS

  13. 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.
    Screenshot for How to Build Automation Workflows with n8n on Your VPS

  14. 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.
    Screenshot for How to Build Automation Workflows with n8n on Your VPS

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

  1. If you receive an "Access blocked: gbnet.cloud has not completed the Google verification process" error, follow this step; otherwise, you can skip it.
    Screenshot for How to Build Automation Workflows with n8n on Your VPS
  • To fix this, go back to Google Cloud Platform, click the Audience tab, then click Publish app and confirm to proceed.
    Screenshot for How to Build Automation Workflows with n8n on Your VPS
  • Make sure the status changes to Back to testing, then try signing in with Google again.
    Screenshot for How to Build Automation Workflows with n8n on Your VPS
  1. On this screen, simply expand Advanced and click "Go to gbnet.cloud (unsafe)" to proceed
    Screenshot for How to Build Automation Workflows with n8n on Your VPS
  2. Ensure to select All access for Gmail to ensure full functionality, then click Continue to proceed.
    Screenshot for How to Build Automation Workflows with n8n on Your VPS
  3. After successfully connecting with Gmail, verify that the data has been saved, then close the credentials page.
    Screenshot for How to Build Automation Workflows with n8n on Your VPS
  4. You can click the Test step button, and the output will be displayed on the right side.
    Screenshot for How to Build Automation Workflows with n8n on Your VPS
  5. 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.

  1. 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'.
    Screenshot for How to Build Automation Workflows with n8n on Your VPS
  • 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'.
    Screenshot for How to Build Automation Workflows with n8n on Your VPS

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

  1. 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.
    Screenshot for How to Build Automation Workflows with n8n on Your VPS

You may repeat step 22 to 24.

  • You may get the Client ID and Client Secret in this page.
    Screenshot for How to Build Automation Workflows with n8n on Your VPSNavigate this page, refer to Step 18.
  1. 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.
    Screenshot for How to Build Automation Workflows with n8n on Your VPS
  2. After configuring the Google Sheets node, you can test the workflow and wait for it to execute.
    Screenshot for How to Build Automation Workflows with n8n on Your VPS
  3. To verify, open the sheet you configured to check if the data has been successfully fetched.
    Screenshot for How to Build Automation Workflows with n8n on Your VPS

You have successfully build workflows in n8n

Need Further Assistance?

If you need help with this guide, our support team is ready to assist you.

?האם התשובה שקיבלתם הייתה מועילה 0 משתמשים שמצאו מאמר זה מועיל (0 הצבעות)