Hooks types
Common: reusable logic Import: Allows to import excel files Send Notification (web) Scheduled Jobs Generate QR CodeSend Emails
- From: Email address from where you want to send the email, It is not required if was configured in the application designer
- To: Email address of the destination person
- Subject: Subject of the email (text plain)
- Message: The body of the email can be in HTML format or Text Plain.
To know more about the allowed email options please read nodemailer docs
Documentation for Sending Emails with Base64 Attachments (backend, hooks)
Override email provider settings
If you want to use a different mail provider you can pass that configuration as a second parameter of the sendEmail functionAsync Logic
Querying and importing database model
To see more querying examples you can use any sequelize method: https://sequelize.org/v4/manual/tutorial/querying.html
Hooks Errors
This section will show you how to throw hook errors. The simplest way to throw an error looks like this🔁Redirecting to a different Feature
If you want to allow the user to see a modal with a button that redirects to a new Feature, you should throw an exception using theCodenullError class with the following parameters:
✅ Example:
💡This is how the error message will look, once the user hit the “Aceptar/Ok” button will be redirected to the new featuretype: "navigation"is mandatory to trigger the redirect behavior. Theparamsarray allows dynamic values to be passed to the destination feature

Executing Store Procedure from Hooks
Other Import examples
Troubleshooting
- Timeout doing database operations on the
afterSaveor any other after hook