Lark Integration

Connect your Lark workspace to Docaflex for seamless document automation and workflow integration.

Overview

Docaflex integrates deeply with Lark (Feishu) to provide comprehensive document automation capabilities. This integration allows you to:

  • Auto-generate documents from Lark Base records
  • Trigger workflows from form submissions
  • Send notifications and updates to Lark Messenger
  • Create approval workflows in Lark
  • Sync data bidirectionally between systems

Setup Guide

1. Create a Lark Application

📱 Lark Developer Console

  1. 1. Visit the Lark Developer Console
  2. 2. Click "Create App" and choose "Custom App"
  3. 3. Fill in your app details and description
  4. 4. Note down your App ID and App Secret

2. Configure OAuth Scopes

Enable the following scopes for your Lark application:

Required Scopes

  • bitable:app - Base access
  • contact:user.id:readonly - User info
  • im:message - Send messages
  • approval:approval - Approval workflows

Optional Scopes

  • docs:doc - Document creation
  • task:task - Task management
  • calendar:calendar - Calendar events
  • vc:meeting - Video conferences

3. Environment Configuration

Add your Lark credentials to your environment variables:

LARK_APP_ID=your_app_id_here
LARK_APP_SECRET=your_app_secret_here

Integration Features

🗃️ Lark Base Integration

Automatically generate documents when Base records are created or updated.

  • • Real-time webhook triggers
  • • Smart field mapping
  • • Batch document generation
  • • Bidirectional data sync

📋 Form Integration

Generate documents instantly from Lark form submissions.

  • • Automatic form detection
  • • Template field mapping
  • • Multi-format output
  • • Response validation

✅ Approval Workflows

Create sophisticated approval processes for your documents.

  • • Multi-stage approvals
  • • Conditional routing
  • • Automatic notifications
  • • Audit trail tracking

💬 Messenger Integration

Send rich notifications and interactive cards to Lark chats.

  • • Interactive message cards
  • • Group and direct messages
  • • File attachments
  • • Action buttons

API Endpoints

Use these endpoints to interact with Lark integrations:

Webhook Endpoint

POST /api/lark/webhook

Receives events from Lark applications

Base Connection

POST /api/larkbase/connect

Establish connection to Lark Base

Troubleshooting

⚠️ Common Issues

Authentication Errors

Verify your App ID and App Secret are correct and the app is published.

Webhook Not Receiving Events

Check that your webhook URL is publicly accessible and returns a 200 status.

Permission Denied

Ensure all required scopes are enabled and the user has granted permissions.

Hi there 👋 How can we help?