Stop using Zapier, Make, n8n

Adam Skjervold
17 Aug 202425:33

Summary

TLDRIn this video, the presenter passionately discusses 'Trigger,' a technical tool likened to Zapier, which they believe is superior for businesses and side projects. They critique no-code platforms like Zapier and N8n for their limitations and technical issues, highlighting Trigger's advantages, such as detailed workflow visualization, automatic retries for failed tasks, and the ability to use TypeScript with GitHub Copilot for streamlined coding. The presenter also emphasizes the benefits of serverless computing, concurrency control, and the flexibility of using any preferred IDE with Trigger.

Takeaways

  • 😀 The speaker expresses a strong affection for the product 'Trigger' and wishes to see its success due to its utility.
  • 🔌 'Trigger' is positioned as a technical alternative to 'Zapier', offering a more integrated approach to workflow automation.
  • 🛠️ The script discusses the gap between 'no-code' platforms like 'Zapier' and 'N8N' and coding-based solutions, highlighting the limitations of both.
  • 💾 The speaker criticizes 'Zapier' for its clunky interface and the difficulty in editing workflows, as well as 'N8N' for its lack of intuitive error handling.
  • 🔍 'Trigger' is praised for its ability to host code, provide detailed run logs, and visualize workflow activity and failures.
  • 🔄 'Trigger' offers features like automatic retries for failed tasks, which is a significant advantage over 'no-code' alternatives.
  • 🖥️ The script emphasizes the importance of using an IDE with 'Trigger', allowing for a more personalized and efficient development experience.
  • 🔒 'Trigger' supports features like concurrency control and idempotency keys, which are crucial for handling tasks involving money and ensuring data integrity.
  • 🔍 The integration of 'TypeScript' with 'Trigger' is highlighted as a significant advantage, providing developers with real-time feedback and reducing errors.
  • 🤖 The use of 'GitHub Copilot' with 'TypeScript' in 'Trigger' workflows is showcased, demonstrating how it can suggest and auto-complete code, saving time and effort.
  • 🚀 The benefits of serverless computing with 'Trigger', such as cost-effectiveness and the ability to run tasks indefinitely without managing infrastructure, are explained.

Q & A

  • What is the main problem the video aims to address regarding business automations?

    -The main problem addressed is the gap between no-code platforms like Zapier and coding solutions, which creates difficulties in managing business automations due to the lack of flexibility and visibility in no-code platforms and the complexity of coding solutions.

  • What does the speaker dislike about Zapier?

    -The speaker dislikes Zapier's clunky interface, slow loading times, and the difficulty in editing workflows, which often requires refreshing the page and redoing the workflow steps.

  • What is the issue with no-code platforms like N8N according to the speaker?

    -The issue with no-code platforms like N8N is that they can be fast to set up but lack the flexibility and sophistication of coding solutions, leading to roadblocks when trying to customize or integrate with certain APIs.

  • How does the speaker describe Trigger in relation to Zapier?

    -The speaker describes Trigger as the technical version of Zapier, offering built-in integrations and a more sophisticated approach to workflow management compared to no-code platforms.

  • What is the advantage of using Trigger over no-code platforms like N8N?

    -Trigger allows for more sophisticated workflow management with the ability to write and deploy code, handle retries for failed tasks, and provide better visibility and reporting on workflow performance.

  • What is the benefit of using TypeScript with Trigger according to the video?

    -TypeScript with Trigger provides benefits such as type checking, which helps prevent errors by showing what properties and methods exist on objects, making coding more efficient and less error-prone.

  • How does Trigger handle tasks that need to run indefinitely or for a long time?

    -Trigger can run tasks for a long time without incurring high costs associated with serverless environments, as it can shut down and rewake the task when needed.

  • What is the significance of using an IDE with Trigger?

    -Using an IDE with Trigger allows for a better development experience, as developers can choose their preferred environment and take advantage of features like GitHub Copilot for code suggestions.

  • How does Trigger address the issue of concurrency in workflows?

    -Trigger handles concurrency by ensuring that tasks do not write to the database simultaneously, using concurrency keys to manage tasks that should only execute once for a given value.

  • What is the role of GitHub Copilot in the context of using Trigger?

    -GitHub Copilot assists developers by providing code suggestions and automatically writing code based on comments, making the development process faster and more efficient.

  • Why does the speaker recommend learning something more sophisticated than no-code platforms?

    -The speaker recommends learning more sophisticated tools because they offer greater flexibility, better error handling, and the ability to manage complex integrations and workflows that no-code platforms may struggle with.

Outlines

00:00

🤔 Introduction to Trigger and Its Necessity

The speaker begins by expressing their admiration for Trigger, a product they deeply enjoy and believe in. They clarify that they are not affiliated with the company but genuinely want to see it succeed. The speaker emphasizes the rarity of finding a product so essential that its absence would be highly inconvenient, using the iPhone as an example of a product that, while replaceable, is deeply integrated into many people's lives. They also mention that Trigger is surprisingly easy to use despite its technical appearance. The main problem addressed is the gap between no-code platforms like Zapier and coding platforms, which require technical knowledge and server setup. The speaker highlights the inefficiencies and frustrations of using Zapier and the limitations of no-code solutions, setting the stage for the introduction of Trigger as a solution to these issues.

05:03

🔌 Trigger as a Technical Zapier with Built-in Integrations

The speaker describes Trigger as the 'technical version of Zapier' and explains its advantages over other automation tools. Trigger comes with built-in integrations for various services like Open AI, Mailgun, Twilio, and more, which simplifies the process compared to setting up APIs manually. The speaker appreciates the Notion integration and mentions that Trigger is backed by Superbase, allowing for easy integration with many tools without dealing with APIs directly. They also discuss the benefits of Trigger's workflow deployment options, either on their servers or self-hosted, and its ability to handle retries for failed tasks, a feature lacking in no-code alternatives like Zapier and N8n.

10:03

🛠️ The Advantages of Coding with Trigger and TypeScript

The speaker delves into the technical aspects of using Trigger, highlighting the benefits of writing workflows in TypeScript, a superset of JavaScript. They demonstrate how TypeScript's type-checking feature can prevent errors and improve the coding experience by providing real-time feedback on object properties and methods. The speaker also appreciates the flexibility of using any preferred Integrated Development Environment (IDE) with Trigger and the integration with GitHub Copilot, which assists in writing code more efficiently. They emphasize the importance of being able to see and test workflows, a feature not available in no-code tools, and the ability to deploy changes to production without disrupting existing processes.

15:04

🔄 Exploring Trigger's Serverless Benefits and Concurrency Control

The speaker discusses the benefits of serverless computing with Trigger, such as the ability to run tasks concurrently without managing infrastructure. They also explain the importance of idempotency and concurrency keys in financial transactions to prevent double charges or errors. The speaker provides a detailed example of how Trigger handles these scenarios, ensuring that operations are processed only once and not simultaneously, which would be a complex challenge to solve in a no-code environment. They also mention the cost-effectiveness of Trigger compared to serverless environments like AWS Lambda, which can incur high costs for keeping servers open.

20:05

👋 Conclusion: Trigger's Superiority Over No-Code Tools

In conclusion, the speaker reiterates the superiority of Trigger over no-code tools like N8n and Zapier, particularly in terms of visibility into workflow data, testing flexibility, and the ability to manage complex tasks that no-code tools cannot handle. They emphasize the unique advantages of Trigger, such as the use of TypeScript, GitHub Copilot integration, and the inherent support for concurrency and idempotency, which are not available in no-code alternatives. The speaker ends by expressing their enthusiasm for Trigger and looks forward to the next video.

Mindmap

Keywords

💡Trigger

Trigger, in the context of this video, refers to a technical tool that automates workflows, akin to Zapier but with more advanced features. The video's presenter expresses a strong affinity for Trigger due to its ability to handle complex tasks with ease. It is positioned as a solution bridging the gap between no-code platforms like Zapier and custom-coded solutions.

💡No-code

No-code is a term used to describe software platforms that allow users to create applications or automate tasks without writing any code. In the video, no-code platforms are criticized for their limitations, such as lack of flexibility and issues with debugging and customization, as opposed to the more sophisticated environment provided by Trigger.

💡Zapier

Zapier is an online automation tool that the video compares to Trigger. The presenter mentions disliking Zapier due to its clunky interface and lack of efficiency when editing workflows, suggesting that Trigger offers a superior alternative.

💡Make (n8n)

Make, also known as n8n, is another no-code workflow automation tool. The video contrasts Make with Trigger, highlighting the difficulties in using Make, such as slow loading times and cumbersome editing processes, to emphasize the ease of use and efficiency of Trigger.

💡Workflow

A workflow in this video represents a sequence of tasks or processes that are automated to perform specific functions within a business or project. The main theme revolves around the comparison of different tools' capabilities to manage and execute workflows effectively.

💡TypeScript

TypeScript is a superset of JavaScript that adds static types to the language. In the video, TypeScript is praised for its ability to provide real-time feedback on code errors and improve the development process with features like interfaces and type checking, which are utilized in Trigger's code execution.

💡IDE (Integrated Development Environment)

An IDE is a software application that provides comprehensive facilities for coding, such as code editing, debugging, and running programs. The video highlights the advantage of using Trigger with any preferred IDE, enhancing the development experience and allowing for tools like GitHub Copilot to assist in writing code.

💡GitHub Copilot

GitHub Copilot is an AI-powered code assistant that suggests code snippets and automates coding tasks. The video demonstrates how Copilot can be integrated with Trigger and TypeScript to streamline the coding process, illustrating the power of AI in software development.

💡Serverless Computing

Serverless computing is a cloud computing execution model where the cloud provider dynamically manages the allocation and provisioning of servers. The video mentions serverless computing as one of Trigger's benefits, allowing users to run jobs without worrying about server management or infrastructure setup.

💡Concurrency

Concurrency in computing refers to the ability of a system to handle multiple tasks or processes simultaneously. The video discusses how Trigger manages concurrency, ensuring that tasks do not interfere with each other, which is crucial for maintaining data integrity, especially in financial transactions.

💡Idempotency

Idempotency is a property of an operation where applying the operation multiple times does not change the result beyond the initial application. In the context of the video, idempotency is important for ensuring that actions like payments are executed only once, preventing duplicate charges or errors.

Highlights

Introduction to Trigger, a product the speaker highly appreciates and wishes to see succeed.

The speaker's emotional attachment to products like Trigger and iPhone, emphasizing the importance of product reliability.

The dichotomy between no-code platforms like Zapier and coding solutions, highlighting the ease of use versus flexibility.

Criticisms of Zapier's clunkiness and the limitations of no-code platforms like N8N.

The challenges of editing workflows in no-code platforms and the technical difficulties encountered.

The limitations of no-code platforms when dealing with specialized or unusual API integrations.

The introduction of Trigger as a technical solution akin to Zapier but with more advanced features.

Trigger's integration capabilities with various tools and its backing by Superbase for extended functionality.

The operational benefits of Trigger, including its ability to automatically retry failed tasks.

The visualization and monitoring features of Trigger that provide insights into workflow performance.

The ease of transitioning from development to production with Trigger, avoiding common deployment pitfalls.

The advantages of using TypeScript with Trigger for better code management and error prevention.

The flexibility of choosing an IDE when working with Trigger, enhancing the development experience.

The integration of GitHub Copilot with Trigger, streamlining the coding process with AI suggestions.

Trigger's serverless architecture, offering concurrency and itmpotency without the need for manual infrastructure management.

The speaker's personal testimony on the transformative impact of using TypeScript, Trigger, and GitHub Copilot in their workflow.

Conclusion summarizing the benefits of Trigger over no-code tools and traditional coding environments.

Transcripts

play00:00

welcome back to the internet guys and

play00:03

today I'm going to be showing you

play00:05

trigger which I freaking love and before

play00:07

I get into this I just want to say in no

play00:09

way am I affiliated with trigger apart

play00:12

from that I do want to see them succeed

play00:14

because I just really love this product

play00:17

and if they went away I would well I

play00:19

wouldn't contemplate

play00:22

uh but my point is that you rarely find

play00:25

a product where if it went away you

play00:27

would be really pissed like if the

play00:29

iPhone went away I just buy a pixel you

play00:31

know it's not that hard but if trigger

play00:33

went away I seriously don't know what I

play00:34

would do and don't worry guys because I

play00:36

know it looks a little bit technical but

play00:38

I'm going to explain why it's actually

play00:40

extremely easy to use but before we get

play00:42

into that I'm going to talk about the

play00:45

problem the problem that we actually

play00:47

have to solve because a lot of

play00:48

businesses and side projects they run in

play00:50

either two places okay so a lot of your

play00:53

automations and business logic as it's

play00:55

called is going to run on either

play00:57

somewhere like zappier make n an one of

play00:59

these code platforms I'll show you my n

play01:02

right here and the other way to do it is

play01:04

to basically just write all your code

play01:06

have it run on a server somewhere or in

play01:08

the back end of your website and there

play01:11

is a Ocean between those two

play01:13

options cuz one of them is super easy

play01:15

you drag and drop and then the other you

play01:17

literally have to know how to code and

play01:18

you have to do all this stuff and know

play01:20

how to set up a server it's a massive

play01:22

difference and they also have a lot of

play01:26

their problems like in their own so

play01:28

first of all zaper is clunky I have a

play01:30

video where I was talking about how you

play01:31

should use n an and I trash zapier I

play01:34

still hate zapier so uh you can just try

play01:37

zapier for yourself if you don't uh if

play01:39

you won't take my word for it N is a lot

play01:42

better but I just want to show you I

play01:43

mean this is my n i I built a decent

play01:46

amount in here and if we just load this

play01:48

up I mean first of

play01:50

all it takes forever to load and then

play01:53

this is my workflow and dude there are

play01:56

so many problems when it comes to

play01:57

editing I made that video last time a

play02:00

little bit uh preemptively because when

play02:03

it comes to actually like editing your

play02:05

workflow you have to go you have to test

play02:07

each step individually so you hit test

play02:09

step and then you pin the previous data

play02:11

but I kept getting this problem where

play02:12

I'd hit test and it wouldn't work and

play02:15

you can't just like you have to refresh

play02:17

the page and then you have to redo the

play02:19

whole workflow and it becomes a massive

play02:22

pain in the ass to use and that's just

play02:24

the problem because it's no code it's

play02:26

very like uh abstracted and you're

play02:29

always going to Fig problems um where

play02:31

you just can't solve it and it takes a

play02:33

ton of time the other thing with no code

play02:35

is I found that yeah it's pretty it's

play02:38

pretty fast if I want to add like a web

play02:40

hook I mean there it is that's an

play02:42

endpoint I'll click out of it but there

play02:44

it is that's our endpoint and then we

play02:46

can like customize the URL but and now

play02:49

it's not even working I can't oh geez

play02:52

dude um although it's good to actually

play02:55

like build things with no code um and

play02:58

it's kind of fast you end up up getting

play03:00

stuck at a lot of places where you just

play03:02

can't do something that you could in a

play03:05

more sophisticated environment like you

play03:07

basically just like any of these things

play03:09

I'll probably get hung up and because

play03:11

it's an in like a UI interface like if

play03:13

we go to this part where I have to get

play03:15

the company access token because it's a

play03:18

weird API they have a really weird way

play03:20

of like requesting the data oh no all

play03:25

right my light died but I'm back they

play03:26

have a really weird way of requesting

play03:28

the data and it ends up being a problem

play03:31

because in order to get this like all

play03:34

correct you can't just copy from their

play03:36

documentation like the fetch request you

play03:38

can't just copy and paste because there

play03:40

no code you have to fiddle around for

play03:42

like 3 hours until you fix it where in a

play03:45

more sophisticated environment it might

play03:46

take 10 minutes to get it set up Pro

play03:49

probably less so that's kind of the

play03:51

downside of no code and why I recommend

play03:54

kind of learning something a little bit

play03:55

more sophisticated but

play03:58

then then we come over to something more

play04:01

sophisticated and again we have a

play04:03

problem I mean first of all this is a

play04:06

JavaScript document which I'll talk

play04:07

about in a second but let's just go to

play04:10

let's just go to the uh logs here and

play04:13

I'm just going to show you what the

play04:15

actual problem is because this this is

play04:18

what you get when you're looking when

play04:20

you're running basically code on a

play04:21

server you get a log section here where

play04:25

they just give you a bunch of red lines

play04:26

and a bunch of black and white lines and

play04:28

yeah you can output data to it but it

play04:30

gives you zero context into how well

play04:33

things are working how fast they're

play04:34

executing you have to literally like

play04:36

build a separate product to actually

play04:39

figure out what's going on here and it

play04:41

just becomes a massive pain in the ass

play04:43

so that's why I say there's a

play04:44

Ocean between something like this and

play04:48

something like this which are both bad

play04:52

and uh I mean there's just been no

play04:53

solution until I started using trigger

play04:56

so let's get into it now first of all

play04:59

the definition of trigger as defined by

play05:02

the co-founder or CEO or whoever he is

play05:05

it's described as the technical version

play05:07

of zapier which I totally agree and I

play05:09

totally love um quick example so with

play05:13

zapier you get a lot of Integrations and

play05:15

Trigger has this stuff built in for you

play05:18

so you get open AI mail gun twilio

play05:21

resend whatever you actually need like

play05:23

all this stuff and amazingly they have a

play05:26

notion integration which I like using

play05:28

notion you can integrate with WS air

play05:30

table you can basically integrate with

play05:32

whatever you need and by the way they're

play05:34

also backed by superpa base so you can

play05:36

integrate with a lot of these different

play05:38

tools without having to like mess around

play05:41

with apis on your own but we should

play05:43

explain a little bit more about what

play05:45

trigger dodev actually is and how it

play05:48

works because I'm sure you're confused I

play05:50

was extremely confused for a long time

play05:52

so essentially what they do is they

play05:54

allow you to write your workflows and

play05:57

then deploy them to their servers or you

play05:59

can self-host it which is more

play06:02

complexity than I actually want um and

play06:05

then they handle all this kind of stuff

play06:07

that's like such a pain in the ass to

play06:09

deal with on like a typical server or

play06:11

even an N so let's say you're making a

play06:14

call to a like open

play06:16

API open AI their API I mean a lot of

play06:21

the time your call is just going to fail

play06:22

it's like when you're talking to chat

play06:24

jbt and it just doesn't respond it just

play06:26

shows an error you have to actually like

play06:28

copy your message and paste it again and

play06:31

that's a problem if you're relying on

play06:33

that workflow to actually serve your

play06:34

customers so with trigger dodev they're

play06:36

going to automatically retry failed

play06:38

tasks and naan just doesn't have that it

play06:41

fails and then you're out of luck I

play06:44

mean if it fails like you better you

play06:46

better uh have a way to know about it so

play06:49

what trigger doev does is it host your

play06:51

code it allows you to actually look at

play06:53

all of your runs so I'm going to pull up

play06:56

my trigger and if I just go to my

play06:59

current project then something really

play07:01

cool is here so first of all we can see

play07:03

every single task that I have set up and

play07:06

we can see like a map of all the

play07:08

activity and failures and all that stuff

play07:10

but the cool thing is if we look at the

play07:14

Run logs it's actually going to show you

play07:17

exactly what the workflow is doing so

play07:19

it's going to show you okay yes it

play07:21

started on the Chron chronological uh

play07:24

schedule and then it ran and here's the

play07:27

output all right I'll try to give a a

play07:29

little bit of a a better example cuz

play07:30

this right here this is a fat ass

play07:32

workflow and basically what it's going

play07:34

to do is it's going to break down the

play07:36

whole workflow for you so you get all as

play07:38

much like reporting and visualization

play07:42

into what's happening same with same

play07:44

thing with like uhan which doesn't have

play07:47

this you you have no idea to tell like

play07:49

to tell how long something's taking and

play07:51

with this you can literally see like

play07:53

okay this step took 885 milliseconds cuz

play07:55

I was calling an API and then this uh

play07:58

API called to uh open

play08:02

AI yeah anyways this one uh getting the

play08:06

cost of the call that was only you know

play08:08

100 milliseconds and you can actually

play08:10

see all this data which becomes so

play08:12

valuable the other thing about trigger

play08:14

uh the like n an or zapier can't handle

play08:17

is if you're running a business on it

play08:19

well you're going to deploy your product

play08:21

and if you get customers your customers

play08:23

are going to want your product to work

play08:25

obviously right and you're going to want

play08:28

to change things but as you change

play08:30

things you're going to break things and

play08:32

typically in a in a typical like

play08:34

Enterprise business you're GNA have or

play08:36

any business you're going to have a

play08:38

development and then you're going to

play08:39

have a production um kind of staging and

play08:44

with trigger. da you can easily like get

play08:46

like everything started on your computer

play08:49

locally test everything out and then

play08:51

when it's ready to go you deploy it to

play08:53

the servers so that the customers can

play08:55

actually use it so you basically like

play08:57

prevent yourself from shooting yourself

play08:59

in the foot I mean with an an if I want

play09:01

to make a little change here and I

play09:03

accidentally make a mistake I'm going to

play09:05

have to and okay and I make a mistake

play09:07

and then I press save on accident I

play09:09

haven't changed anything I don't think

play09:12

and it wants me to save but if I press

play09:15

save that could something up in the

play09:16

back end and I have no idea so that's

play09:19

why trigger that di is so strong but

play09:23

there's one thing that does tend to be

play09:25

pretty nice about an an and zapier and

play09:27

and all these kind of things and I mean

play09:30

let let's try to put together a demo

play09:32

here so if we just go refresh location

play09:35

so we'll test this so we'll hit test

play09:37

step this is a cron trigger it supposed

play09:40

to fire every 20 hours so let's test

play09:43

that and then I'll pin this data so we

play09:46

can use it in the next step and then

play09:48

I'll come to list locations and what

play09:50

we're going to do here is oh wait

play09:54

actually these are uncoupled I'll I'll

play09:57

test this one CU I want to get some

play09:59

fresh data and then for this one if you

play10:03

can see we're using uh data from the

play10:06

last step in this in this step right

play10:09

here okay so all I need to do is I go

play10:12

from refresh token so I'm going to grab

play10:14

that refresh token just drop it in there

play10:16

and boom we're good to go obviously I I

play10:18

don't want to do that um but yeah all

play10:20

you do is you drag and drop from one

play10:22

step to the other and that's why no code

play10:24

is so easy but I'm going to show you

play10:26

something that I recently started using

play10:28

and it's it's been

play10:31

insane if you're not a developer you

play10:33

might be screaming right now don't worry

play10:35

don't worry I will I will make this

play10:37

simple and easy um let's let's let's

play10:40

let's get an example going here so this

play10:43

is my trigger dodev code and don't worry

play10:45

it's it's not hard to code um this is my

play10:48

trigger. Dev code and it's written in

play10:50

typescript typescript is a type of

play10:54

JavaScript it's actually a superet of

play10:56

JavaScript so you have JavaScript and

play10:57

then you have typescript so you can

play10:59

write everything in in typescript and it

play11:01

gets compiled to JavaScript which means

play11:04

it can run basically anywhere so the

play11:06

advantage of typescript I'm going to

play11:08

show that right now because what we're

play11:10

doing in this workflow here is we're

play11:12

using a

play11:14

stripe uh the stripe integration to

play11:16

charge a customer and this can actually

play11:20

be a bit of a pain in the ass all right

play11:22

and by the way if I wanted to do this in

play11:23

no code I don't even know if I could I

play11:25

mean it's like a specialized use case

play11:28

and anything that's not remotely normal

play11:31

is going to be a pain in the ass and no

play11:33

code so anyways what we're doing is

play11:36

we're creating a payment intent

play11:39

and after that after we create that

play11:42

payment intent then we also want to get

play11:44

the default payment method off of the

play11:46

customer all right and the cool thing

play11:49

about this is look at this long ass line

play11:51

of code I I don't know what this is I

play11:53

don't know like why it looks like this

play11:56

right but what we can do is we can say

play11:59

say uh payment method we'll just Define

play12:03

a new variable and we'll say that's

play12:04

going to be

play12:05

await um maybe we don't have to wait it

play12:08

it's going to

play12:09

be uh stripe or it's going to be our

play12:12

payment

play12:13

intent Dot and then if I tried to do

play12:18

like payment method

play12:23

here I mean first of all I spelled this

play12:26

wrong so that's going to that's going to

play12:27

be an issue but but

play12:32

wait all right it was a bad example

play12:34

because payments attend exist but if I

play12:37

if I try to do type and I hover it over

play12:39

it it's going to tell me it says TS

play12:42

typescript property type does not exist

play12:45

on this type of object because this is

play12:47

the object that we're we're creating and

play12:49

it's saying this type does not exist

play12:52

which is so useful because when

play12:54

you're normally coding you dude it's

play12:57

like so hard to guess because literally

play12:59

you would be looking at stripe

play13:01

documentation you'd be coming back here

play13:02

you'd be like okay is it type info and

play13:07

then it's still not going to work it's

play13:09

going to say no it doesn't exist and if

play13:11

you were just doing JavaScript you would

play13:13

compile this you would run it or you

play13:14

wouldn't compile it but you would just

play13:16

run it and you would get an error and uh

play13:19

that's not going to happen with Ty

play13:21

script it's literally going to tell you

play13:22

exactly what exists and what doesn't

play13:24

it's basically like drag and drop

play13:26

editing

play13:27

um and and let me try to break down just

play13:31

another example here so if we go over to

play13:34

my call recording workflow so this is

play13:36

the workflow that handles a phone call

play13:39

being finished and then the call

play13:42

recording being dropped to my task and

play13:46

this is extremely useful this is

play13:47

something you can Define in typescript

play13:49

it's called an interface or I believe I

play13:51

can change this type and it's the same

play13:54

no never mind um but essentially this is

play13:56

going to tell your code in your program

play13:58

like or actually it's going to tell

play13:59

typescript what your payload is going to

play14:02

look like like what the data you're

play14:04

dealing with is going to look like so if

play14:07

we go down to somewhere where I'm using

play14:09

let's go like location ID so if we go

play14:13

down to this and if I said okay payload

play14:16

do location ID and I tried to use that

play14:19

it's going to tell me right now that

play14:23

location ID does not exist on the

play14:25

payload that I sent in it has to be

play14:27

location ID and this is such an enormous

play14:31

timesaver and also an enormous just

play14:34

benefit to your entire life that uh I

play14:36

mean it it basically makes coding like

play14:39

no code I mean there's still a bit of a

play14:41

learning curve but really like I I would

play14:43

be I would be a week back in my

play14:46

development process um if I wasn't using

play14:49

typescript so that brings us on to our

play14:53

second benefit of uh trigger and

play14:57

basically it's that you get to pick your

play14:59

your own IDE I mean an IDE if you're not

play15:01

sure is a uh an integrated development

play15:03

environment so I'm using Zed you could

play15:06

also use VSS code is extremely popular

play15:08

you could use Vim you could use

play15:11

text edit and here we are with that same

play15:14

uh stripe uh workflow that we were just

play15:17

looking at in text edit I mean you could

play15:19

use this it's terrible it it's

play15:22

horrible I mean you would never want to

play15:23

do this but you could I mean the the

play15:26

benefit of doing that is just amazing

play15:29

like you can actually use whatever

play15:30

program you want to edit your workflow

play15:33

and it just make it just makes for such

play15:35

a better development experience um but

play15:38

the other thing about using your own IDE

play15:41

is let me remind myself is co-pilot you

play15:44

may have heard about GitHub co-pilot and

play15:46

how their some lawsuit is happening

play15:48

because they're using other people's

play15:50

code to train a robot that replaces them

play15:52

and I just want to say I love

play15:55

co-pilot and this is one of the biggest

play15:57

benefits of trigger is that you can

play15:59

actually work with co-pilot to build

play16:01

your your execution programs so let's

play16:04

just uh let's just get a really good

play16:06

example so okay so to demonstrate this

play16:08

we're back in our stripe charge workflow

play16:11

now what I used to have here is that if

play16:13

the payment failed it would basically

play16:15

just wait a day and then it would return

play16:18

um but we could actually automate the

play16:20

way that it charges customers so if

play16:22

they're payment fails the first day

play16:24

it'll wait one day and then it'll charge

play16:25

them again and let's actually just get

play16:28

rid of this I want to basically make it

play16:30

so that it waits one day and then it

play16:32

tries to charge them again then a couple

play16:33

days so I'm just going to write that out

play16:36

in comments so we'll say if payment

play16:40

fails uh wait for a day and Retreat I

play16:44

mean is there anything else to that um

play16:47

if payment fails wait for a

play16:50

day no

play16:52

payment failed wait for a day and then

play16:57

we'll say um

play16:59

um add tag failed payment and then we'll

play17:04

say and that tag by the way I'll show

play17:07

you is uh really useful in trigger I

play17:11

mean it's I don't know if it's useful

play17:12

yet but it it'll kind of show you like

play17:15

what your runs are so I can see okay so

play17:18

these message here are from Facebook and

play17:20

social and there social messages so that

play17:23

way I can basically break down my runs

play17:24

when I'm going to the bug later on um

play17:28

but say payment failed wait for a day

play17:30

add tag failed payment and

play17:33

then one other benefit of trigger that I

play17:36

just thought of is you can run tasks for

play17:39

like I don't know indefinitely like a

play17:40

really long time so if I say wait for a

play17:43

day it's fine it's going to pick up in a

play17:45

day whereas if you were using something

play17:47

like a AWS Lambda or something else like

play17:50

a serverless environment you would be

play17:52

getting charged a million dollars to let

play17:54

it run for a day because they're keeping

play17:57

the server open for you whereas here

play17:58

they have a way to shut it down and then

play18:01

uh rewake it up when it's ready so

play18:04

anyways um we're going to confirm the

play18:08

payment and then

play18:10

attempt

play18:11

to charge again so let's see how this

play18:14

goes I haven't I mean I've done this a

play18:16

couple times but we have co-pilot you've

play18:19

probably seen co-pilot in the background

play18:22

when I start to type something it's

play18:23

going to give me a

play18:26

suggestion dude all right so there we go

play18:29

so it's saying basically if I press tab

play18:32

I can accept that change all right so

play18:34

we'll go payment failed uh wait for a

play18:37

day so we'll go boom it look at this

play18:41

it's looking at these comments and it's

play18:42

doing exactly what I want so I'm like

play18:45

I'm like freaking just dying over here

play18:47

just like bro I've been working for 12

play18:49

hours and I don't know what to type and

play18:51

then I press enter and it just types

play18:53

exactly what I need and then we'll go

play18:56

await charge again and this is going to

play18:59

be a bit of a challenge because it's a

play19:02

bit further up but let's say

play19:05

um we'll just do a

play19:08

wait or no we'll

play19:10

do const try try again and look at this

play19:16

dude it's literally filling in that

play19:19

entire same line from up above that we

play19:22

were just using it used the same payment

play19:24

intent id that we had and if I press

play19:27

enter then it'll will'll pull in the

play19:29

exact same values that we needed and

play19:31

then I can press tab again to accept

play19:33

that and we have the exact same l i mean

play19:35

this is a weird example because I'm

play19:37

literally could have copy pasted the

play19:38

line but it's writing it for you without

play19:42

you having to know the actual syntax you

play19:44

just write comments and then it writes

play19:46

the code for you while you basically sit

play19:48

there and press Tab and uh that is the

play19:52

absolute best thing about I mean co-

play19:56

pilot is amazing and then I just

play19:58

I just want to give one more example

play20:00

because with typescript co-pilot Works

play20:03

amazing because basically I'm

play20:05

trying to call this function right here

play20:08

and you have to like organize it in a

play20:11

specific way so that it actually

play20:13

functions properly and this can be kind

play20:15

of a pain in the ass you have to keep

play20:16

switching back and say okay what what

play20:18

type of object does this one need and

play20:20

with typescript you can basically just

play20:22

go okay so I want to I know I want to

play20:24

send the type so it's going to be that

play20:27

and then the code is going to be that

play20:30

yep yep and then I mean then we're going

play20:34

to Define our Q or we'll just do an in

play20:37

potency key and boom I mean there's a

play20:39

little bit of a formatting error here

play20:41

but dude it's absolutely insane it

play20:44

literally writes code for you like

play20:46

copilot is one of those products that

play20:48

you just never get bored of like every

play20:50

day you have that moment where you just

play20:52

like oh tab tab tab and you write like

play20:56

two minutes of code in five seconds is

play20:59

amazing so I love co- pallet and

play21:02

I mean biggest thing is you get to use

play21:04

co- pallot and typescripts with um

play21:07

trigger so then the last thing is

play21:10

serverless I'll bundle this from uh with

play21:13

the last benefit serverless Computing

play21:15

and concurrency and let's also say cu's

play21:20

and

play21:23

uh okay so I'm going to bundle all this

play21:26

together but basically if we go back

play21:28

back I mean I'll just I'll just scroll

play21:30

through this so you can see but you can

play21:32

run jobs all at the same time you don't

play21:34

have to worry about setting up a server

play21:36

and managing infrastructure and all this

play21:38

stuff because that's a pain in

play21:40

the ass um and then there's a couple

play21:42

things called concurrency and itm

play21:44

potency and when you're dealing with

play21:46

things like charges and like money itm

play21:50

potency is extremely important because

play21:51

if someone refreshes the page and every

play21:53

time they refresh the page you're

play21:55

sending data to your server to charge

play21:57

them or to give them money

play21:59

you don't want it to just work every

play22:00

single time they refresh their page so

play22:02

typically you'll have some type of itm

play22:04

potency where you'll refresh the page

play22:06

once it'll send that special value to

play22:09

the server and then the server every

play22:11

time it gets it from then on will know

play22:13

okay we've already process this that's

play22:15

it imp potency that means that and

play22:18

otherwise dude it's such a pain in the

play22:19

ass you have to like create like a whole

play22:22

table in your database to store all this

play22:23

stuff to measure to manage it and with

play22:26

trigger you don't they literally include

play22:28

it if we come back here we're passing in

play22:30

the so this is when it actually like

play22:33

charges the customer or this is when we

play22:35

adjust the balance of the customer this

play22:37

is a good example we're passing in an

play22:39

itm potency key so that means when we're

play22:42

adjusting this balance we only want it

play22:43

to happen once with this uh payment

play22:46

intent which is like a stripe charge uh

play22:49

value so we only want that to happen

play22:52

once and then the concurrency key

play22:54

basically this is sick because

play22:57

if we look at our adjust balance method

play22:59

okay we're pulling out we're pulling out

play23:02

the company balance so we're looking in

play23:05

the database we're saying okay uh yeah

play23:08

wait where's it going to be

play23:11

company um select balance okay so we're

play23:15

selecting the balance so we're pulling

play23:17

out the balance and then I'm doing a

play23:20

couple things in between and then I'm

play23:21

updating that balance with the new

play23:24

amount so the new balance is going to be

play23:26

the past balance plus the the the change

play23:29

and then eventually here we're upserting

play23:33

or we're updating that one record with

play23:36

the New Balance but there could be a

play23:38

scenario

play23:40

where okay so there could be a scenario

play23:43

where you're reading the balance right

play23:45

here and the balance is $100 at start

play23:48

and then task two right here is reading

play23:52

the balance a millisecond after and it

play23:54

also sees

play23:55

$100 but then when the first task goes

play23:58

to write it's saying minus $50 so a $50

play24:01

charge it's going to write 150 right or

play24:05

no it's going to write 50 good thing

play24:07

that looks like a dollar sign so it's

play24:09

going to write $50 to the database but

play24:11

then task number two is adding $50 and

play24:15

it also saw 100 at the start so it's

play24:18

going to write 100 + 150 so you're

play24:22

basically giving the customer a free $50

play24:26

in this scenario and you have to like

play24:29

figure out how to solve this and the

play24:31

great thing about trigger is that stuff

play24:33

is solved for you it's not going to

play24:34

wrate to the database at the same time

play24:36

because we're using a where the oh we're

play24:41

using

play24:42

a a concurrency key right here which is

play24:46

the company ID so for the same company

play24:48

for the same balance value it can't

play24:50

write at the same time we have a limit

play24:52

of one and yeah I mean uh this video is

play24:55

already really long but hopefully that

play24:57

kind of helps you expl uh understand

play24:59

what trigger is and how it works and why

play25:02

it's so good I know I talked

play25:04

about a lot about typescript and and

play25:06

co-pilot which are amazing but

play25:08

the reality is you don't get these

play25:10

benefits when you use a no code tool

play25:12

like n or zapier or make and you also

play25:15

don't get these benefits I mean you

play25:17

don't get the benefits of actually

play25:19

seeing into your workflow seeing what

play25:20

the data looks like and testing them um

play25:23

whenever you want with like an actual

play25:25

server it's it's way more of a pain in

play25:26

the ass so anyways triggers is

play25:28

awesome um yeah I'll see you in the next

play25:31

video I guess

Rate This

5.0 / 5 (0 votes)

Ähnliche Tags
Workflow AutomationTrigger DevZapier AlternativeNo-Code ToolsTypeScriptServerlessIDE IntegrationConcurrency ControlAPI IntegrationDevelopment ToolsProductivity Boost
Benötigen Sie eine Zusammenfassung auf Englisch?