Skip to main content

Functions

Serverless functions let you add server-side logic without having your own server. For example, online payments, sending SMS, or anything else that needs server-side code.


Ready Templates

0xMinds has ready templates that simplify common tasks:

TemplateUse case
Online PaymentConnect to payment gateways
SMS SendingSend SMS to users
Telegram BotCreate a Telegram bot
EmailSend automated emails
WebhookReceive data from external services

Activating a Template

  1. Select a template from the list
  2. Enter required settings:
    • Service API Key
    • Template-specific settings
  3. Choose a name for the function
  4. Click "Activate"

Trigger Types

Each function has a trigger that determines when it runs:

HTTP

Function is called with an HTTP request:

POST https://api.0xminds.com/functions/your-function-name

Use case: When you want to call the function from frontend or external service.

Schedule

Function runs automatically at specified times:

  • Every hour
  • Every day
  • Every week
  • Or custom time (Cron)

Use case: Sending daily reports, cleaning old data

Database

Function runs when there's a database change:

  • When a new row is added
  • When a row is edited
  • When a row is deleted

Use case: Send notification when a new order is placed


Logs

In the Logs section you'll see function execution history:

ColumnDescription
TimeWhen it ran
StatusSuccess or error
DurationHow long it took
InputWhat data it received
OutputWhat data it returned

Debugging

If a function errors:

  1. Check the logs
  2. Read the error message
  3. Check the input
  4. Check settings (like API Key)

Important Notes

Tip
  • Each function execution uses energy
  • Only enable scheduled functions when needed
  • Check logs regularly
Security
  • Never put API Keys in frontend code
  • Protect sensitive functions with authentication