Triggers


🔔 What Are Triggers in GTWY AI?

Triggers are event-based entry points that start a workflow in GTWY AI.

In simple terms:

A Trigger listens for something to happen — like a webhook call or a Shopify event — and when that happens, it activates your AI logic (called a Bridge).

For example:

  • An order is placed on Shopify → trigger fires → LLM summarizes the order.

  • A form is submitted → trigger fires → GTWY sends a response email using AI.

  • A webhook sends customer feedback → trigger fires → sentiment analysis happens using Claude or GPT.


❓ Why Do We Need Triggers?

Without triggers, your AI logic would just sit idle, waiting for manual inputs.

Triggers allow your AI logic to:

  • Respond automatically and instantly to real-world events.

  • Enable real-time AI automation.

  • Create seamless integration with third-party tools (Shopify, Airtable, Slack, etc.).

🧠 Analogy:

Think of a trigger like a doorbell:

  • Someone presses it (event occurs),

  • You hear the sound (workflow starts),

  • You respond (the LLM runs your prompt).


🔁 How to Integrate Triggers in GTWY AI?

✅ Step-by-step Guide:

1. Create or Open a Bridge

  • Go to your GTWY dashboard.

  • Click on “Bridges” → Create a new one (name it anything like "Order Summary").

2. Select Trigger Type

  • Choose “Triggers” as the mode (not API, Chatbot, or Batch API).

  • This means your prompt will be fired by some external event.

3. Click “+ Connect Trigger”

  • A side panel opens showing many integrations like:

    • Webhook

    • Shopify

    • Slack

    • Razorpay

    • Airtable

  • Select the one relevant to your use case.

triggers.png

4. Configure the Trigger

  • Example for Webhook:

    • GTWY gives you a unique URL.

    • You can send a POST request to that URL with JSON data.

  • Example for Shopify:

    • Choose an event like order_created.

    • Authenticate your store.

    • GTWY listens to that event.

5. Write Your Prompt

  • Define what AI should do when the trigger fires:

    Generate a short summary of this customer order using natural language.
    

6. (Optional) Add Pre Functions

  • Clean or manipulate incoming data before it reaches your prompt.

7. Deploy & Test

  • Activate the bridge.

  • Send a test event or webhook.

  • Check if GTWY’s prompt is executed and returns output.


🧪 Example: Webhook Trigger Use Case

Imagine you want to summarize support tickets using GPT-4.

Here’s how it works:

  1. Connect a Webhook Trigger.

  2. GTWY gives you a URL:
    https://trigger.gtwy.ai/webhook/abc123

  3. Your external app sends:

    {
      "ticket": "The app keeps crashing when I open it."
    }
    
  4. Prompt:

    "Summarize this ticket in less than 20 words. Suggest a possible cause."

  5. GTWY executes it and gives:

    "User reports app crashing on startup — possible bug in initialization sequence."


✅ Summary

Concept

Meaning

Trigger

An event listener that starts your GTWY AI workflow

Why needed

To automate real-time responses using AI, without manual input

How to use

Connect → Choose source (Shopify/Webhook/Slack) → Write prompt → Done!


Want me to give a real working example with curl or Shopify integration step-by-step?