ForjinnForjinn
Components Guide

Triggers | Webhook & Cron Automation in Forjinn

Automate workflow execution with Forjinn's trigger system. Configure webhook triggers for 30+ platforms and cron schedule triggers for time-based automation.

Trigger System

Forjinn Triggers page showing webhook and cron trigger configuration interface with platform selection and schedule options

The Forjinn Trigger System enables automatic workflow execution through time-based (cron) and event-driven (webhook) triggers. Configure triggers to start workflows without manual intervention, integrating with 30+ platforms for event-driven automation.

Overview

Triggers serve as entry points for workflows, automatically starting execution based on:

  • Time-based schedules — Cron expressions for recurring execution
  • External events — Webhooks from supported platforms and services

Trigger Types

Cron Schedule Triggers

Time-based triggers execute workflows on a recurring schedule using cron expressions.

Predefined Schedules

ScheduleCron ExpressionDescription
Every Minute* * * * *Runs every minute
Hourly0 * * * *Runs at the top of every hour
Daily0 9 * * *Runs daily at 9 AM UTC
Weekly0 9 * * 1Runs every Monday at 9 AM UTC
Monthly0 9 1 * *Runs on the 1st of every month at 9 AM UTC
CustomUser-definedAny valid cron expression

Configuration

  1. Add a Trigger node to your workflow canvas
  2. Set Trigger Type to "Cron Schedule"
  3. Choose a predefined schedule or enter a custom cron expression
  4. Optionally set a Trigger Message — text passed to the workflow on execution
  5. Configure Max Executions — optional limit on total runs
  6. Set Timeout — maximum execution time in seconds
  7. Toggle Enabled on to activate the trigger
trigger:
  type: "cron"
  schedule: "daily"
  cronExpression: "0 9 * * *"
  triggerMessage: "Generate daily report"
  maxExecutions: 30
  timeout: 300
  enabled: true

Webhook Triggers

Webhook triggers respond to HTTP POST events from external platforms. When a configured event occurs, the external service sends a payload to your webhook URL, triggering workflow execution.

Supported Platforms

Communication & Collaboration
  • Slack, Discord, Microsoft Teams
  • Gmail, Outlook
Development & Project Management
  • GitHub, GitLab, Jira, Trello
  • Asana, Monday.com, Notion
E-commerce & Payments
  • Shopify, WooCommerce
  • Stripe, PayPal
Marketing & CRM
  • HubSpot, Salesforce
  • Mailchimp, SendGrid, Zendesk
Forms & Social
  • Typeform, Google Forms, Calendly
  • Facebook, Twitter/X, LinkedIn
Storage & Data
  • Dropbox, Google Drive, OneDrive
  • Airtable, Google Sheets

Webhook Configuration

  1. Add a Trigger node to your workflow canvas
  2. Set Trigger Type to "Webhook"
  3. Select the Webhook Platform from the dropdown
  4. Specify Event Types — which events should trigger execution
  5. Enter the Webhook Secret — for signature validation
  6. Copy the generated Webhook URL — configure this in your external platform
  7. Optionally set Custom Headers for additional security
  8. Toggle Enabled on to activate

How Webhook Triggers Work

  1. You configure a webhook trigger in your Forjinn workflow
  2. Forjinn generates a unique webhook URL for your trigger
  3. You configure this URL in the external platform (e.g., GitHub repository settings)
  4. When an event occurs, the platform sends an HTTP POST to your webhook URL
  5. Forjinn validates the request signature and headers
  6. If valid, your workflow executes with the webhook payload as input

Security

Signature Verification

Each platform uses specific validation to ensure webhook authenticity:

GitHub:

const signature = req.headers['x-hub-signature-256']
const expectedSignature = crypto
  .createHmac('sha256', secret)
  .update(payload)
  .digest('hex')

Slack:

const timestamp = req.headers['x-slack-request-timestamp']
const signature = req.headers['x-slack-signature']
const baseString = `v0:${timestamp}:${payload}`
const expectedSignature = crypto
  .createHmac('sha256', secret)
  .update(baseString)
  .digest('hex')

Stripe:

const signature = req.headers['stripe-signature']
const elements = signature.split(',')
const timestamp = elements.find(e => e.startsWith('t=')).split('=')[1]
const signatures = elements.filter(e => e.startsWith('v1='))

Best Security Practices

  • Always use webhook secrets for external platforms
  • Validate signatures on every incoming request
  • Use custom headers for additional authentication layers
  • Test webhook security in development before production deployment

API Endpoints

MethodEndpointDescription
POST/api/v1/triggersCreate a new trigger
GET/api/v1/triggersList all triggers
GET/api/v1/triggers/:idGet a specific trigger
PUT/api/v1/triggers/:idUpdate a trigger
DELETE/api/v1/triggers/:idDelete a trigger
POST/api/v1/triggers/webhook/:nodeIdWebhook receiver endpoint
GET/api/v1/triggers/statsGet trigger statistics

Troubleshooting

Common Issues

ProblemSolution
Cron trigger not executingVerify cron expression syntax; check trigger is enabled
Webhook validation failingVerify secret key matches; check signature format for the platform
Trigger not foundEnsure trigger is properly configured and saved
Execution limits reachedCheck and adjust maxExecutions setting
Payload not receivedVerify webhook URL is correct in the external platform; check event type matches

Debug Steps

  1. Check trigger status in the Forjinn Settings → Triggers page
  2. Verify webhook URL configuration in the external platform
  3. Test signature validation with a sample payload
  4. Review server logs for trigger execution errors
  5. Validate cron expression using an online cron parser

Best Practices

  1. Use Execution Limits — Set maxExecutions for cron triggers to prevent runaway schedules
  2. Enable Signature Verification — Always use webhook secrets for production triggers
  3. Test in Development — Validate trigger behavior before deploying to production workflows
  4. Monitor Execution — Review trigger statistics regularly for health and performance
  5. Handle Errors Gracefully — Build error handling into workflows triggered by external events
  6. Document Configurations — Keep trigger settings documented for team reference

On this page