Skip to main content

Integration Examples

Overview

This guide provides practical examples of integrating Gentic with various platforms and services.

Platform Integrations

Slack Integration

const workflow = await client.workflows.create({
name: "Slack Support",
steps: [
{
type: "slack",
config: {
channel: "support",
message: "{{input.message}}"
}
},
{
type: "agent",
config: {
agentId: "support-agent"
}
}
]
});

Salesforce Integration

const workflow = await client.workflows.create({
name: "Salesforce Sync",
steps: [
{
type: "salesforce",
config: {
object: "Case",
operation: "create",
data: {
subject: "{{input.subject}}",
description: "{{input.description}}"
}
}
}
]
});

AWS Integration

const workflow = await client.workflows.create({
name: "AWS Processing",
steps: [
{
type: "s3",
config: {
bucket: "data-bucket",
operation: "get",
key: "{{input.file}}"
}
},
{
type: "lambda",
config: {
function: "process-data",
payload: "{{previous.output}}"
}
}
]
});

Service Integrations

Email Service

const workflow = await client.workflows.create({
name: "Email Processing",
steps: [
{
type: "email",
config: {
provider: "gmail",
operation: "send",
to: "{{input.recipient}}",
subject: "{{input.subject}}",
body: "{{input.body}}"
}
}
]
});

Database Integration

const workflow = await client.workflows.create({
name: "Database Sync",
steps: [
{
type: "database",
config: {
provider: "postgresql",
operation: "query",
query: "SELECT * FROM users WHERE status = 'active'"
}
}
]
});

API Integration

const workflow = await client.workflows.create({
name: "API Integration",
steps: [
{
type: "http",
config: {
url: "https://api.example.com",
method: "POST",
headers: {
"Authorization": "Bearer {{secrets.apiKey}}"
},
body: {
data: "{{input.data}}"
}
}
}
]
});

Best Practices

  1. Security

    • Use environment variables
    • Implement proper authentication
    • Follow least privilege principle
  2. Error Handling

    • Implement retry logic
    • Log errors appropriately
    • Provide fallback options
  3. Performance

    • Optimize API calls
    • Implement caching
    • Monitor resource usage

Next Steps