Creating a GitHub Issue

This example demonstrates how to configure an API action to automatically create issues in a GitHub repository.

Configuration Details

  • Action Name: Create GitHub Issue
  • Instructions for AI Agent: "Use this action when a user reports a bug or requests a feature that needs to be tracked in our GitHub repository. Extract the issue title and description from the conversation."
  • Endpoint URL: https://api.github.com/repos/{owner}/{repo}/issues
  • Method: POST

Headers

  • Authorization: Bearer {github_token}
  • Accept: application/vnd.github+json
  • Content-Type: application/json

Body Parameters

json
{ "title": "{{issue_title}}", "body": "{{issue_description}}", "labels": ["bug", "from-api"] }

Placeholders

  • {{issue_title}}: The title of the GitHub issue, extracted from user input
  • {{issue_description}}: Detailed description of the issue, extracted from user input
  • {github_token}: Your GitHub personal access token (configured in authentication settings)
  • {owner}: Your GitHub username or organization name
  • {repo}: Your repository name
๐Ÿ’ก
You'll need to generate a GitHub personal access token with repo scope from your GitHub account settings to authenticate this API action.

Fetching Weather Data

This example demonstrates how to configure an API action to retrieve current weather information for a specific location.

Configuration Details

  • Action Name: Get Weather Data
  • Instructions for AI Agent: "Use this action when a user asks about current weather conditions for a city or location. Extract the city name from the conversation and fetch the latest weather data."
  • Endpoint URL: https://api.openweathermap.org/data/2.5/weather?q={{city_name}}&appid={api_key}&units=metric
  • Method: GET

Headers

  • Accept: application/json

Query Parameters

  • q: {{city_name}} - The name of the city for which to fetch weather data
  • appid: {api_key} - Your OpenWeatherMap API key
  • units: metric - Units of measurement (metric for Celsius, imperial for Fahrenheit)

Placeholders

  • {{city_name}}: The city name extracted from user input
  • {api_key}: Your OpenWeatherMap API key (configured in authentication settings)
๐Ÿ’ก
You'll need to sign up for a free OpenWeatherMap account and generate an API key from their dashboard to authenticate this API action.

Deleting a Customer Record

This example demonstrates how to configure an API action to delete a customer record from a CRM system or database.

Configuration Details

  • Action Name: Delete Customer Record
  • Instructions for AI Agent: "Use this action when a user requests to delete a customer account or when a customer requests data deletion for GDPR compliance. Extract the customer ID from the conversation and confirm the deletion intent before proceeding."
  • Endpoint URL: https://api.example-crm.com/v1/customers/{{customer_id}}
  • Method: DELETE

Headers

  • Authorization: Bearer {api_token}
  • Accept: application/json
  • Content-Type: application/json

Body Parameters

json
{ "reason": "{{deletion_reason}}", "confirmed": true }

Placeholders

  • {{customer_id}}: The unique identifier of the customer to be deleted, extracted from user input
  • {{deletion_reason}}: The reason for deletion (e.g., "User request", "GDPR compliance", "Duplicate account")
  • {api_token}: Your CRM API authentication token (configured in authentication settings)
โš ๏ธ
Warning: DELETE operations are typically irreversible. Always implement confirmation steps in your AI Agent's workflow before executing deletion actions. Consider implementing soft deletes or archiving as an alternative.