Integration Examples

Common custom action patterns and real-world integration examples

Integration Examples

💡
Custom actions require a Pro plan or higher. Upgrade to Pro →

Slack Notifications

Send messages to Slack channels via webhook.

Configuration

curl -X POST https://hooks.slack.com/services/{{var.SLACK_WEBHOOK_ID}} \
  -H "Content-Type: application/json" \
  -d '{
    "text": "{{message}}",
    "channel": "{{channel}}",
    "username": "Chipp Bot"
  }'

Parameters

ParameterSourceConfiguration
messageAI GeneratedMessage content to send
channelAI GeneratedTarget channel (optional)
SLACK_WEBHOOK_IDVariableYour Slack webhook ID

Usage

"Send a message to #general saying the report is ready"

OpenAI Completions

Call OpenAI's API for advanced processing.

Configuration

curl -X POST https://api.openai.com/v1/chat/completions \
  -H "Authorization: Bearer {{var.OPENAI_API_KEY}}" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-4",
    "messages": {{system.message_history}},
    "temperature": 0.7,
    "max_tokens": {{maxTokens}}
  }'

Parameters

ParameterSourceConfiguration
OPENAI_API_KEYVariable (secret)Your OpenAI API key
message_historySystem VariableConversation context
maxTokensAI GeneratedToken limit (default: 1000)

SendGrid Email

Send transactional emails via SendGrid.

Configuration

curl -X POST https://api.sendgrid.com/v3/mail/send \
  -H "Authorization: Bearer {{var.SENDGRID_API_KEY}}" \
  -H "Content-Type: application/json" \
  -d '{
    "personalizations": [{
      "to": [{"email": "{{recipientEmail}}"}],
      "subject": "{{subject}}"
    }],
    "from": {
      "email": "{{var.FROM_EMAIL}}",
      "name": "{{var.FROM_NAME}}"
    },
    "content": [{
      "type": "text/html",
      "value": "{{emailBody}}"
    }]
  }'

Variables

SENDGRID_API_KEY = SG.abc123...
FROM_EMAIL = noreply@example.com
FROM_NAME = Your Company

Google Sheets

Read and write data to Google Sheets.

Read Data

curl -X GET "https://sheets.googleapis.com/v4/spreadsheets/{{var.SHEET_ID}}/values/{{range}}" \
  -H "Authorization: Bearer {{var.GOOGLE_API_KEY}}"

Append Data

curl -X POST "https://sheets.googleapis.com/v4/spreadsheets/{{var.SHEET_ID}}/values/{{range}}:append" \
  -H "Authorization: Bearer {{var.GOOGLE_API_KEY}}" \
  -H "Content-Type: application/json" \
  -d '{
    "values": [[
      "{{system.timestamp}}",
      "{{system.user_id}}",
      "{{data}}"
    ]]
  }'

Webhook with Dependencies

Multi-step workflow using action dependencies.

Step 1: Create User

curl -X POST https://api.example.com/users \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer {{var.API_KEY}}" \
  -d '{
    "name": "{{userName}}",
    "email": "{{userEmail}}"
  }'

Returns: {"data": {"id": "user_123", "email": "john@example.com"}}

Step 2: Send Welcome Email

Use the user ID from Step 1:

curl -X POST https://api.example.com/emails \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer {{var.API_KEY}}" \
  -d '{
    "user_id": "{{userId}}",
    "template": "welcome",
    "send_at": "{{system.timestamp}}"
  }'

Parameter Configuration for user_id:

  • Source: Output from another Action
  • Action: Create User
  • JSONPath: $.data.id

CRM Integration

Update customer records in your CRM.

Configuration

curl -X PATCH https://api.crm.com/v2/contacts/{{contactId}} \
  -H "Authorization: Bearer {{var.CRM_API_KEY}}" \
  -H "Content-Type: application/json" \
  -d '{
    "properties": {
      "last_contact": "{{system.timestamp}}",
      "last_message": "{{summary}}",
      "status": "{{status}}"
    }
  }'

AI Instructions

For summary parameter:

Summarize the key points from the conversation in 1-2 sentences

For status parameter:

Determine status: 'interested', 'qualified', 'not-interested', or 'follow-up'

Stripe Payment

Create payment intents via Stripe API.

Configuration

curl -X POST https://api.stripe.com/v1/payment_intents \
  -u "{{var.STRIPE_SECRET_KEY}}:" \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -d "amount={{amount}}&currency=usd&customer={{customerId}}"

Parameters

ParameterSourceConfiguration
STRIPE_SECRET_KEYVariable (secret)Your Stripe secret key
amountAI GeneratedAmount in cents
customerIdAI GeneratedStripe customer ID

Weather API

Fetch weather data for user queries.

Configuration

curl -X GET "https://api.openweathermap.org/data/2.5/weather" \
  -G \
  --data-urlencode "q={{city}}" \
  --data-urlencode "appid={{var.WEATHER_API_KEY}}" \
  --data-urlencode "units=metric"

Usage Examples

"What's the weather in New York?" "Is it raining in London?"

GitHub Integration

Create issues in GitHub repositories.

Configuration

curl -X POST https://api.github.com/repos/{{var.GITHUB_OWNER}}/{{var.GITHUB_REPO}}/issues \
  -H "Authorization: Bearer {{var.GITHUB_TOKEN}}" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "{{issueTitle}}",
    "body": "{{issueBody}}",
    "labels": {{labels}},
    "assignees": {{assignees}}
  }'

Parameter Configuration

ParameterSourceAI Instructions
issueTitleAI GeneratedCreate a concise title for the GitHub issue
issueBodyAI GeneratedWrite a detailed description of the issue
labelsAI GeneratedArray of relevant labels like ["bug", "urgent"]
assigneesAI GeneratedArray of GitHub usernames to assign

Best Practices

1. Error Handling

Always return clear error messages:

{
  "success": false,
  "error": "API key invalid. Please check your credentials."
}

2. Rate Limiting

Respect API rate limits:

  • Add delays between requests
  • Implement exponential backoff
  • Cache responses when possible

3. Security

  • Use HTTPS endpoints only
  • Store credentials as secret variables
  • Never log sensitive data
  • Validate all inputs

4. Performance

  • Paginate large result sets
  • Use field selection to minimize data
  • Implement timeouts (30s max)
  • Cache frequently accessed data

5. Testing

  • Test with various inputs
  • Verify error handling
  • Check edge cases
  • Monitor response times

Next Steps