This content has been translated from Japanese using LLM. There may be some awkward nuances in the translation.

How to Use Polling Events

The polling event feature allows you to periodically retrieve events from a remote API and automatically execute commands.

Configuration Method

1. Enabling Polling Events

To enable the polling event feature, configure the following settings:

  • Polling Event URL: API endpoint for retrieving events
    • Example:
      code
      https://api.example.com/events
  • Polling Interval (seconds): Interval between polling requests
    • Recommended: 30 seconds or more
  • Polling Event Bearer Token: Token for API authentication

2. Input in the Configuration Screen

The following items can be entered in the configuration screen:

code
Polling Event URL: https://api.example.com Polling Interval (seconds): 30 Polling Event Bearer Token: ••••••••••••••••

Operation Specifications

Polling Process

  • When enabled, GET requests are sent to the polling event URL at the specified interval
  • Commands are automatically executed based on the retrieved response
  • Each event has a unique ID to prevent duplicate execution

API Response Format

The polling endpoint must return an event list with the following schema:

typescript
// Base event schema id: z.string(), // Unique event ID createdAt: z.string(), // Event creation date and time type: z.literal('performSearch'), tag: z.string(), // Search tag query: z.string(), // Search query

Scheduling Functionality

This mechanism does not have direct scheduling functionality, but scheduling can be achieved by updating the event list externally.

Supported Event Types

Currently supported event types:

performSearch

Event to execute a search

  • tag: Tag for the search target (when executing an LLM, the LLM will be executed with this tag)
  • query: Search query string (when executing an LLM, this effectively functions as a prompt)

LLM Execution Feature

  • If an LLM can be executed with the tag, the query effectively functions as a prompt
  • If TabTool is installed, it's possible to open any page and analyze its contents

Implementation Examples

API Endpoint Example

json
{ "events": [ { "id": "event-001",// use uuid "type": "performSearch", "tag": "claude-4-0", "query": "Please open https://example.com, retrieve its contents, and send it to a specific URL. Please close the tab after completion.", "createdAt": "2024-01-15T10:32:00Z" }, { "id": "event-002", "type": "performSearch", "tag": "gemini-flash-2.5", "query": "Please analyze the contents of the specified web page and create a summary. Use markdownTool to save it. Please close the tab after completion.", "createdAt": "2024-01-15T10:33:00Z" }, { "id": "event-003", "type": "performSearch", "tag": "gpt-5", "query": "Please regularly check news sites and extract important information. Please close the tab after completion.", "createdAt": "2024-01-15T10:34:00Z" } ] }

Use Cases

Leveraging Google Chrome Operations

Various use cases are possible by leveraging the advantages of being able to operate Google Chrome:

Processing Pages Requiring Login

  • Retrieve content from pages requiring login
  • Analyze the retrieved data
  • Send analysis results to a specific endpoint with query parameters

Flexible Prompt Execution

  • Ability to flexibly send prompts enables complex processing
  • Sufficiently supports regular automated processing

Tab Management Optimization

  • Utilize TabTool's "closeTab" function to solve the problem of too many tabs
  • Recommended to include "Please close the tab after completion" in prompts

Specific Application Examples

Regular Data Collection

  • Retrieve data from dashboards requiring login
  • Analyze the retrieved data and generate reports
  • Send results to specified API endpoints

Website Monitoring

  • Regularly check specific websites for changes
  • Notify when important updates occur
  • Analyze changes and create summaries

Automated Workflows

  • Process multiple web pages sequentially
  • Integrate data from each page
  • Send final results to external systems

Preventing Duplicate Execution

  • Each event ID must be unique
  • Event IDs that have been executed are recorded internally and will not be executed again
  • If an event with the same ID is received again, execution is skipped

Precautions

  • It is recommended to set the polling interval to 30 seconds or more
  • API endpoints should implement appropriate authentication (Bearer token)
  • Response format should follow the specified schema
  • Be mindful of API rate limits when sending a large number of events at once

Troubleshooting

Common Issues

Polling Does Not Start

  • Verify the URL is correctly configured
  • Check if the Bearer token is valid

Events Are Not Executed

  • Verify the response format matches the schema
  • Check if event IDs are not duplicated

Authentication Errors

  • Verify the Bearer token is correctly configured
  • Check the token's expiration date

Summary

The polling event feature is a powerful function that retrieves events from a remote API periodically and executes them automatically. Key points:

  • Configuration: Set URL, interval, and Bearer token
  • Event Types: performSearch enables LLM execution
  • Scheduling: Achieved through integration with external systems
  • Chrome Operations: Can process pages requiring login
  • Tab Management: Control tab proliferation with the closeTab function
  • Duplicate Prevention: Prevent duplicate execution with unique IDs

By utilizing this feature, you can streamline various tasks such as regular data collection, website monitoring, and automated workflows.

Comprehension Check