Superpower yourself with N8N automations & integration of various systems/APIs🚀

Kaspar L. Palgi
CrewNew.com
Published in
5 min readDec 22, 2022

N8N is a low-code open-source visual workflow automation platform like Zapier/IFTTT/etc. And as it is open-source, it is also free, we can verify that it has a nice clean code, and every programmer can customise it as per their own needs).

Image from n8n.io

In the above image, every square is a node doing something and the flow goes from the left to the right sometimes depending on some conditions. This workflow is waiting for some webhook to be triggered to get started. It could be whatever. Some Jira/Trello/Asana/etc task was created for example. Then there’s some data transformation, eg. renaming the “assignee” as an “owner” or whatever data transforming could be needed. Then we save the data in PostgreSQL and also in the Google Sheets. Now, with the IF node, we may be checking if the task was important and if yes then also send the Slack notification.

N8N advantages

One of the key advantages of N8N is its extensibility. It includes around 400 pre-built nodes for popular services and applications, but users can also create their own custom nodes using JavaScript. This allows users to connect to virtually any service or application and gives them the flexibility to tailor their workflows to their specific needs. With custom coding and HTTP request integration to any REST / GraphQL API, it is quick to connect it with any app out there that has API access.

The biggest difference between N8N and for example Zaiper is that in N8N you can write a custom JavaScript code in the middle of your workflows as much as you want so you are not limited to what N8N can do for you. You can write whatever you need. It even supports NodeJS (the most popular backend stack for many years).

N8N also has a strong community of users who contribute to the development of the tool and share their workflows and custom nodes online. That’s the beauty of open-source. This makes it easier for others to find and use pre-built nodes and workflows, or learn from others’ examples to create their own automation solutions.

Some other open-source advantages: the freedom to code whatever you wish. You can even access the core code to modify it. And the open-source code is also nicely structured and clean. It is meant to be readable and extendable easily for any developer. And you have the freedom to own your own data — you are not locked into one provider. Privacy and freedom.

N8N got a $12m investment in 2021 so they do have some great programmers in their team on top of the open-source community contributors!

Real-life case study

The list of automation ideas that is being updated and voted by the whole team of brand new N8N cloud platform>>

The customer needed to give their visitors the ability to open the gate 2 times for everybody who bought the ticket from some external ticket sales platform. The customer said that everybody quoted a minimum of one week of coding for this whereas I completed it in a bit less than one working day.

Click on the image to see it bigger

There are actually two workflows. The first workflow is simples so I didn’t add an image. It just gets the data from the ticketing system and saves it to the admin panel/database built in 1h in Directus. It also sends from Gmail the email to the visitor that has a link in it to this workflow (seen in the above image) that will…

  1. “Webhook” — to catch the link click with the unique token
  2. “Does the token exist” — verify the visitor and if doesn’t exist then inform the visitor “showTokenMissing”
  3. “Query Ticket By ID“-get from the Directus via GraphQL information about the ticket so we can with the next IF node check if the gate can be opened or it has been opened already 2 times.
  4. “Set Call” —will set the data needed to make the phone call that will open the gate lock
  5. “Mutation Ticket“— will now deduct one call from the number of calls remaining via GraphQL API.
  6. Finally, we just query all the ticket information and redirect the visitor to the page with all the information.

Some more use cases

Some smaller use cases with less than 1h of work to set up. Usually, around 10min and I can train you and your team to build such workflows yourself:

  • If the invoice gets paid (data from Wise API or any other bank API or email) then mark it paid in the system and send a notification to the Slack/Discord/Zulip/Telegram/etc #payments channel.
  • If there’s a new PDF invoice from somebody or new e-shop order then save it in the accounting software.
  • If there’s a new contact in HubSpot or any other CRM then add it also to Google Contacts or wherever else needed + send the second email after 3 days and if no reply then WhatsApp message in 7 days unless it is the weekend and should wait till Monday.
  • Discord voice channel #daily-standup bot to save attendances into a database for statistics on who has been attending and how often
  • If there’s a new holiday added by the worker in Directus then add it also to the Google calendar.
  • If someone added new Google Contacts, then add it also to all the colleagues in the department.
  • If a new colleague is added to the database, then create also accounts at Trello, Slack, Zulip, NextCloud, etc. etc. etc.
  • If there’s any change in the competitor’s website/blog/social media then notify in the team chat channel.
  • Post automatically into multiple social media channels
  • etc. etc. etc.

I highly suggest reading from this book’s first chapter the “Why does no code matter?” section here. Scroll down and click “Read more.” It’s a nice publishing company. I‘m half complete writing them about one of the greatest low-code back-end API engines Hasura.

Feel free to contact me for a free consultation🙂

--

--

Kaspar L. Palgi
CrewNew.com

Backend programmer and veteran tech enthusiast. Mentoring and writing tech books. Team lead at CrewNew.com / lead developer at Klarity.app