Skip to content

Integration with MakeCom

rolandm99 edited this page Sep 23, 2025 · 1 revision

Integrations with Make.com

The Make.com integration allows you to connect Gauzy with Make.com's powerful automation platform, enabling you to create automated workflows triggered by timer events in Gauzy.

Overview

The Make.com integration provides:

  • OAuth2 Authentication: Secure authentication with Make.com
  • Webhook Integration: Real-time event notifications to Make.com scenarios
  • Timer Event Synchronization: Automatic forwarding of timer start/stop events
  • Multi-tenant Support: Organization and tenant-level integration settings
  • Secure Credential Management: Encrypted storage of OAuth credentials

Features

  • Timer Events: Automatically sends timer start, stop, and status update events to Make.com
  • OAuth Authentication: Secure connection using OAuth2 flow
  • Webhook Configuration: Configurable webhook URLs for different scenarios
  • Real-time Updates: Instant notification of timer events to Make.com scenarios
  • Multi-organization Support: Separate settings for different organizations within a tenant

Setup Instructions

1. Create a Make.com Application

  1. Go to Make.com and log into your account
  2. Navigate to Apps > Custom Apps and create a new application
  3. Configure the following settings:
    • Name: Your application name (e.g., "Gauzy Timer Integration")
    • OAuth Redirect URL: {API_BASE_URL}/api/integration/make-com/oauth/callback
    • Scopes: Configure according to your needs
  4. Note down your Client ID and Client Secret

2. Environment Configuration

Configure the following environment variables in your Gauzy instance:

# Make.com API Configuration
CLIENT_BASE_URL=http://localhost:4200
GAUZY_MAKE_BASE_URL=https://www.make.com
GAUZY_MAKE_DEFAULT_SCOPES="offline_access"
GAUZY_MAKE_POST_INSTALL_URL="${CLIENT_BASE_URL}/#/pages/integrations/make"
GAUZY_MAKE_REDIRECT_URL=https://your-api.com/api/integration/make-com/oauth/callback
GAUZY_MAKE_API_URL="https://hook.us2.make.com/api/v2"
GAUZY_MAKE_CLIENT_ID=your-make-client-id
GAUZY_MAKE_CLIENT_SECRET=your-make-client-secret
GAUZY_MAKE_WEBHOOK_URL=https://your-make-webhook-url

3. Build the Plugin

The Make.com integration plugin should be automatically included in your Gauzy installation. If you need to build it manually run:

yarn build:package:plugin:integration-make-com

and for the Make.com UI

yarn build:package:plugin:integration-make-com-ui

Configuration in Gauzy UI

1. Access Integration Settings

  1. Log into your Gauzy tenant dashboard
  2. Navigate to Settings > Integrations
  3. Find and select Make.com from the list of available integrations

2. OAuth Setup

  1. In the Make.com integration page, click "Configure OAuth"
  2. Enter your Make.com application credentials:
    • Client ID: Your Make.com app client ID
    • Client Secret: Your Make.com app client secret
  3. Click "Save OAuth Settings"
  4. You'll be redirected to Make.com for authorization
  5. Authorize the application and you'll be redirected back to Gauzy

3. Webhook Configuration

  1. After OAuth setup, configure your webhook settings:
    • Enable Integration: Toggle to enable/disable the integration
    • Webhook URL: Enter the webhook URL from your Make.com scenario
  2. Click "Save Settings"

How to Get Make.com Webhook URL

  1. In Make.com, create a new scenario
  2. Add a "Webhooks" > "Custom webhook" trigger
  3. Copy the generated webhook URL
  4. Paste this URL into the Gauzy Make.com integration settings

How It Works (Case: Time Tracking Automation)

Authentication Flow

  1. OAuth Setup: Admin configures client credentials in Gauzy UI
  2. Authorization: User authorizes Gauzy to access Make.com account
  3. Token Management: Access tokens are automatically refreshed when needed
  4. Secure Storage: All credentials are encrypted and stored securely

Event Flow

  1. Timer Events: When a user starts/stops a timer in Gauzy
  2. Event Handlers: Dedicated handlers capture timer events
  3. Webhook Service: Formats and sends events to configured Make.com webhook
  4. Make.com Processing: Your Make.com scenario receives and processes the event

Event Types

The integration sends the following event types to Make.com:

Timer Start Event (timer.start)

{
  "event": "timer.start",
  "data": {
    "id": "timer-id",
    "startedAt": "2024-01-01T10:00:00Z",
    "employee": { ... },
    "project": { ... },
    "task": { ... },
    "organizationContact": { ... }
  },
  "timestamp": "2024-01-01T10:00:00Z",
  "tenantId": "tenant-id"
}

Timer Stop Event (timer.stop)

{
  "event": "timer.stop",
  "data": {
    "id": "timer-id",
    "stoppedAt": "2024-01-01T11:00:00Z",
    "duration": 3600,
    "employee": { ... },
    "project": { ... },
    "task": { ... },
    "organizationContact": { ... }
  },
  "timestamp": "2024-01-01T11:00:00Z",
  "tenantId": "tenant-id"
}

Timer Status Event (timer.status)

{
  "event": "timer.status",
  "data": {
    "timerStatus": "running",
    "lastLog": { ... }
  },
  "timestamp": "2024-01-01T10:30:00Z",
  "tenantId": "tenant-id"
}

Testing the Integration

1. Test Webhook Connection

  1. In Make.com, create a simple scenario with a webhook trigger
  2. Add a "Tools" > "Set variable" action to log received data
  3. Copy the webhook URL to your Gauzy integration settings
  4. Enable the integration and save settings

2. Test Timer Events

  1. Start a timer in Gauzy (Desktop app, Web app, or Mobile app)
  2. Check your Make.com scenario execution history
  3. Verify that the timer start event was received
  4. Stop the timer and verify the timer stop event

3. Verify Event Data

Check that the received events contain expected data:

  • Event type (timer.start, timer.stop, etc.)
  • Timer/time log details
  • Employee information
  • Project and task details (if applicable)
  • Timestamp and tenant ID

Troubleshooting

Common Issues

1. Webhook Events Not Received

  • Verify webhook URL is correctly configured
  • Check that integration is enabled
  • Ensure Make.com scenario is active
  • Check network connectivity and firewall settings

2. OAuth Authorization Fails

  • Verify client ID and client secret are correct
  • Check redirect URL matches configuration
  • Ensure Make.com app is properly configured

3. Timer Events Missing Data

  • Verify timer is associated with proper project/task
  • Check employee permissions and assignments
  • Review integration logs for error messages

Debug Steps

  1. Check Integration Status:

    # Via API
    GET /api/integration/make-com/
  2. Review Server Logs: Look for Make.com related log entries in your Gauzy server logs

  3. Test Webhook Manually: Use tools like Postman to send test events to your Make.com webhook

  4. Verify OAuth Tokens: Check that OAuth tokens are valid and not expired

Security Considerations

  • Credential Encryption: All OAuth credentials are encrypted before storage
  • Token Refresh: Access tokens are automatically refreshed when expired
  • Tenant Isolation: Integration settings are isolated per tenant/organization
  • HTTPS Only: All communications use HTTPS encryption
  • Webhook Validation: Consider implementing webhook signature validation

API Endpoints

The Make.com integration exposes the following API endpoints:

  • GET /api/integration/make-com/ - Get integration settings
  • POST /api/integration/make-com/ - Update integration settings
  • POST /api/integration/make-com/oauth-settings - Configure OAuth settings
  • GET /api/integration/make-com/oauth-config - Get OAuth configuration
  • GET /api/integration/make-com/oauth/authorize - Initiate OAuth authorization
  • POST /api/integration/make-com/token - Handle token requests (for custom apps)
  • GET /api/integration/make-com/oauth/callback - OAuth callback endpoint

Use Cases

1. Time Tracking Automation

  • Automatically create time entries in external systems
  • Generate reports when timers are stopped
  • Send notifications to project managers

2. Project Management Integration

  • Update project status based on timer events
  • Calculate project progress automatically
  • Trigger billing processes

3. Team Communication

  • Send Slack/Teams notifications when team members start/stop work
  • Update team dashboards with real-time activity
  • Generate daily/weekly activity summaries

4. Productivity Monitoring

  • Track work patterns and productivity metrics
  • Generate automated productivity reports
  • Alert on unusual working patterns

Advanced Configuration

Organization-Level Settings

The integration supports organization-level configuration for multi-organization tenants:

// Get organization-specific settings
GET /api/integration/make-com?organizationId={org-id}

// Update organization-specific settings
POST /api/integration/make-com?organizationId={org-id}

Custom Event Filtering

You can configure Make.com scenarios to filter events based on:

  • Employee ID
  • Project ID
  • Task ID
  • Organization ID
  • Event type
  • Custom tags

Support and Resources

For issues and feature requests, please visit the GitHub Issues page.

Clone this wiki locally