Triggers from webhook

Written By Stanislas

Last updated 5 days ago

Webhook triggers let you automatically start agent automations when external systems send data to Swiftask via HTTP POST requests. Instead of manually triggering an agent, you set up a webhook URL that external services can call—when they do, your automation runs instantly.


Overview

A webhook trigger is a URL endpoint that external systems can send data to. When a POST request arrives at that URL, Swiftask automatically activates your configured automation and passes the incoming data to your agent. This is ideal for integrating Swiftask with external services like ticketing systems, form builders, payment processors, or custom applications.

Think of a webhook trigger as a doorbell for your automation. When someone rings it (sends a POST request), your agent wakes up and handles the task.


Prerequisites

Before creating a webhook trigger, you need:

  • An agent configured: The agent must have clear objectives, instructions, and any necessary skills (send email, export files, log to database, etc.)

  • Knowledge base (if needed): If your agent references documents or data, add them to the agent's knowledge base first

  • Access to Automations: You must have permission to create automations in your workspace

  • External system ready: You'll need an external service or application that can send HTTP POST requests


Step-by-step guide

Step 1: Access the Triggers section

Navigate to the agent you want to automate.

  1. Click Agents in the left sidebar

  2. Find your agent and click to open it

  3. In the left sidebar, look for Automations section

  4. Click Triggers (marked as NEW)

  5. You'll see a list of any existing triggers for this agent

Screenshot: Triggers section showing the New Trigger button

Step 2: Choose the trigger type

Click the New Trigger button (red button with + icon).

A dialog opens showing trigger type options.

  1. Look for Webhook option

  2. Read the description: "Trigger via HTTP webhook URL. Perfect for integrating with external services."

  3. Click Webhook to select it

Screenshot: Trigger type selection showing Webhook as one of four options

Step 3: Configure the webhook trigger

The dialog advances to the configuration step.

You'll see a form with the following field:

Trigger Name

  1. Click the input field labeled "Trigger Name"

  2. Enter a descriptive name that identifies this trigger

  3. Examples: "Customer Support Ticket", "New Form Submission", "Payment Received"

  4. This name appears in your triggers list and logs, so make it specific

The dialog explains: "After creating this trigger, you'll receive a unique webhook URL that you can use to trigger your automation from any external service."

Screenshot: Configure webhook trigger form with trigger name field

Step 4: Review your trigger

After entering the trigger name, click Next.

The dialog advances to the review step.

You'll see a summary of your webhook configuration:

  • Trigger type: Webhook

  • Description: "Trigger via HTTP webhook URL. Perfect for integrating with external services."

  • Trigger Name: Your entered name

Review the information to ensure it's correct.

Screenshot: Review trigger configuration before creating

Step 5: Create the trigger

Once you've reviewed the configuration:

  1. Click the red Create Trigger button

  2. The dialog closes

  3. You're returned to the Triggers list

  4. Your new webhook trigger now appears in the list with status "Active"

Screenshot: Webhook trigger successfully created and visible in triggers list

Step 6: Get your webhook URL

After the trigger is created, you can view its details to get the webhook URL.

  1. In the Triggers list, find your webhook trigger

  2. Click on it to open the details panel

  3. Scroll to find Webhook URL (POST)

  4. Copy the full URL—this is what external systems will call

The details panel also shows:

  • ID: Unique identifier for this trigger

  • Type: WEBHOOK

  • Trigger Name: Your configured name

  • Status: Active (or Inactive if toggled off)

  • Created At / Updated At: Timestamps

  • Automation Status: PENDING (waiting for first execution)

  • Example usage: A curl command showing how to call the webhook

Screenshot: Trigger details panel showing webhook URL and example usage

Configuring your external system

Once you have your webhook URL, you need to configure your external system to send POST requests to it.

Basic webhook URL structure

Your webhook URL looks like this:

https://graphql.swiftask.ai/api/agent-automation/webhook/[unique-id] 

Sending data to the webhook

External systems should send a POST request with JSON data:

curl -X POST https://graphql.swiftask.ai/api/agent-automation/webhook/[unique-id] \ -H "Content-Type: application/json" \ -d '{ "data": "Any data you want to send to the agent" }' 

The agent receives this data and processes it according to its configured instructions.


Practical use cases

Use case 1: Customer support ticket automation

Setup: You use a ticketing system (like Zendesk) to manage support requests.

Webhook trigger: When a new ticket is created, the ticketing system sends a POST request to your Swiftask webhook.

Agent action: Your support agent reads the ticket details, searches your knowledge base for relevant information, and sends a response email to the customer.

Result: Customers get instant responses to common questions without manual intervention.

Use case 2: Form submission processing

Setup: You have a contact form on your website built with a form service (like Typeform or Formspree).

Webhook trigger: When someone submits the form, the form service sends the submission data to your Swiftask webhook.

Agent action: Your agent reads the form response, categorizes the inquiry, and routes it to the appropriate team member or sends an acknowledgment email.

Result: Form submissions are automatically processed and categorized instantly.

Use case 3: Payment notification handling

Setup: You process payments through a payment processor (like Stripe).

Webhook trigger: When a payment is received, the payment processor sends a webhook notification to Swiftask.

Agent action: Your agent receives the payment details, updates your database, generates an invoice, and sends a confirmation email to the customer.

Result: Payment processing is fully automated from notification to customer confirmation.

Use case 4: External data enrichment

Setup: You have a CRM system with new leads arriving.

Webhook trigger: When a new lead is created in your CRM, it sends the lead data to your Swiftask webhook.

Agent action: Your agent receives the lead information, researches the company, enriches the lead profile with additional data, and sends the updated information back to your CRM.

Result: Your CRM automatically gets enriched lead data without manual research.


Tips & best practices

Keep trigger names descriptive: Use names that clearly indicate what triggers the automation. "Customer Support" is better than "Trigger 1".

Test with curl first: Before integrating with your external system, test your webhook URL manually using curl or Postman to ensure it works.

Handle errors gracefully: If your agent fails to process webhook data, check the execution logs to see what went wrong. Adjust your agent's instructions if needed.

Monitor webhook executions: In the Triggers list, you can toggle triggers on/off and view their status. Monitor the "Automation Status" to see if triggers are executing successfully.

Use meaningful data in your webhook: Send all the information your agent needs to complete the task. Don't send empty or incomplete data.

Secure your webhook: Treat your webhook URL like a password. Don't share it publicly or commit it to version control. If compromised, delete the trigger and create a new one.


Troubleshooting

"Webhook URL not working"

  • Verify the URL is copied exactly as shown in the trigger details

  • Check that your external system is sending a POST request (not GET)

  • Ensure the Content-Type header is set to "application/json"

  • Look at the trigger's execution logs to see if the webhook was received

"Trigger appears but automation doesn't run"

  • Check that the trigger status is "Active" (toggle it on if needed)

  • Verify the agent has all necessary skills configured

  • Check the agent's instructions are clear and specific

  • Review execution logs to see error messages

"I need to update the webhook URL"

  • Delete the current trigger and create a new one

  • Update your external system to use the new webhook URL

"Multiple webhook triggers for the same agent"

  • You can create multiple webhook triggers for different external systems

  • Each trigger gets its own unique URL

  • Each trigger can have different names for easy identification


Additional resources

  • Introduction to automating with agents: Learn the broader concepts of agent automation and how triggers work

  • Creating an automation with agents: Set up the full automation workflow after creating your trigger

  • Agents > Create AI agent > Objectives & instructions: Configure what your agent should do when the webhook fires

  • Agents > Create AI agent > Skills (AI Tools): Add capabilities like sending emails or updating databases


Ready to automate? Create your first webhook trigger now and start connecting external systems to your Swiftask agents. The webhook URL is generated instantly and ready to use.