Overview

Advanced Input Tools provide specialized input capabilities for handling different types of data sources including webhooks, Slack events, image files, and text files. These tools are essential for building comprehensive workflows that integrate with external systems.

Key Features

INPUT_WEBHOOK

  • Receive webhook requests from various services
  • Handle HTTP POST requests to your publishable URL
  • Parse JSON and form data automatically
  • Essential for API integrations

INPUT_SLACK_EVENT

  • Receive Slack App event subscriptions
  • Handle real-time Slack workspace events
  • Process messages, reactions, and user interactions
  • Requires Slack App configuration

INPUT_IMAGE_FILE

  • Input image files from direct download URLs
  • Convert images to base64-encoded strings
  • Support for various image formats
  • Optimized for AI processing workflows

INPUT_FILE_AS_TEXT

  • Input text files from URLs
  • Support for multiple text formats (CSV, JSON, XML, YAML, HTML)
  • Return presigned URLs for file access
  • Automatic encoding detection

Setup Instructions

Note: INPUT_ tools are crucial for MCP (Model Context Protocol) and API integrations. Their IDs must match exactly in your MCP configuration and API endpoints.

Example: Webhook Processing Workflow

- id: receive_webhook
  name: receive_webhook
  tool: INPUT_WEBHOOK
  input:
    - name: description
      value: "Receive order notification from e-commerce platform"
    - name: use_as_input
      value: true

- id: process_order
  name: process_order
  tool: OPENAI_INVOKE
  config:
    - name: version
      value: gpt-4
  input:
    - name: prompt
      value: |
        Process this order data and extract key information:
        {{steps.receive_webhook.result.body}}
        
        Extract: customer info, order items, total amount, shipping details

Example: Slack Event Processing

- id: slack_listener
  name: slack_listener
  tool: INPUT_SLACK_EVENT
  input:
    - name: description
      value: "Listen for mention events in Slack"
    - name: use_as_input
      value: true

- id: respond_to_mention
  name: respond_to_mention
  tool: SLACK_POST_MESSAGE
  input:
    - name: channel
      value: "{{steps.slack_listener.result.channel}}"
    - name: text
      value: "Thanks for mentioning me! I'll process your request."

Example: Image Analysis Pipeline

- id: input_image
  name: input_image
  tool: INPUT_IMAGE_FILE
  input:
    - name: file_url
      value: "https://example.com/image.jpg"
    - name: description
      value: "Product image for analysis"

- id: analyze_image
  name: analyze_image
  tool: GEMINI_INVOKE_WITH_IMAGE
  config:
    - name: version
      value: gemini-1.5-flash
  input:
    - name: prompt
      value: "Analyze this product image and describe its features"
    - name: base64_image
      value: "{{steps.input_image.result.base64_content}}"

Use Cases

  • API Integration: Receive data from external services via webhooks
  • Real-time Processing: Handle Slack events and notifications
  • Image Processing: Analyze images with AI models
  • Document Processing: Handle text files and documents
  • Event-driven Workflows: Trigger workflows based on external events