Create Event Trigger

Event triggers can be created using the Hasura console.

Open the Hasura console, head to the Events tab and click on the Create trigger button to open up the interface below to create an event trigger:

Add Event Trigger

Give a name for the event trigger (say send_email) and select the table users and select the operation insert.

Click on Create.

Create event trigger

Try it out

To test this, we need to insert a new row into users table.

Head to Console -> Data -> users -> Insert Row and insert a new row.

Now head to the Events tab and click on send_email event to browse the processed events.

Test event trigger

Now, every time a new row is inserted into users table - this event would be invoked.

Close

Get Started with GraphQL Now

Hasura Cloud gives you a fully managed, production ready GraphQL API as a service to help you build modern apps faster.
Ready to get started?
Start for free on Hasura Cloud or you could contact our sales team for a detailed walk-through on how Hasura may benefit your business.
Stay in the know
Sign up for full access to our community highlights, new features, and occasional baby animal gifs! Oh, and we have a strict no-spam rule. ✌️