Skip to main content

Integration Guide: Connecting Octoparse AI to Lark

Learn how to connect Octoparse AI with Lark. This step-by-step guide covers Lark App creation, API permission setup, and authorizing Sheets or Base for seamless data automation.

Sophie avatar
Written by Sophie
Updated yesterday

Integrating Octoparse AI with Lark opens up a world of possibilities for your team’s productivity. By building this connection, you allow your workflows to automatically update spreadsheets, sync data in real-time, and send notifications—turning your data collection into a collaborative powerhouse.

Before you can start using specific Lark commands, you need to "build a bridge" between Octoparse AI and the Lark platform. This guide will walk you through the essential environment setup, from configuring the Developer Console to authorizing your first document.

Preparing Your Environment: Creating a Lark App

To get started, your Bot needs a formal identity to communicate with Lark’s API. You achieve this by creating a "Custom App" within the Lark Developer Console. Think of this app as a secure gateway that Octoparse AI will use to access your data.

First, log in to the Lark Open Platform and navigate to the Developer Console. Create a new "Custom App" and give it a name that’s easy to recognize, such as "Octoparse AI Integrator."

Once the app is created, your first priority is to secure your App ID and App Secret(can be seen in the Credentials & Basic Infos tab). These credentials are the "username and password" for your integration—keep them safe, as you will need to input them into Octoparse AI later.

Configuring Permissions and Going Live

An app without permissions is like a key that doesn't turn any locks. To allow Octoparse AI to interact with your data, you must define its "Scope."

Within your app settings, navigate to the Permissions & Scopes section. Here, you need to search for and enable permissions related to Doc and Base. These scopes allow the app to read from and write to both Lark Sheets and Lark Base.

However, simply selecting permissions isn't enough. For the app to become functional, you must create a version, and submit for release.

💡 Pro-Tip: Navigating Corporate Approvals

If you are using a Lark Enterprise account, your app version will likely require approval from your IT administrator before it goes live. If you are on a personal account, the approval is usually automatic. Your workflow will not be able to "find" the app until it is officially in the Published status.

Authorizing Your Target Document

Even after your app is live, it doesn't automatically have access to every file in your workspace. You must manually "invite" the app into the specific Lark Sheet or Lark Base you intend to automate.

Open your target document and look for the More (...) menu. Find the "Add Applications" option and search for the app you just created. By adding it to the document, you are explicitly granting it permission to edit that specific file. This step is the most common reason for "Access Denied" errors, so ensure your app is added to every document you plan to use.

Authenticating in Octoparse AI

Now that the Lark side is ready, it’s time to head back to Octoparse AI to establish the connection. This is done through a "Handshake" process where your App ID and Secret are exchanged for a temporary Access Token.

Use the Get Lark access token command at the very beginning of your workflow. Once you input your credentials, the instruction generates a variable (usually named larkAccessToken). This token acts as a digital key that proves your Bot has the right to perform tasks. Every subsequent Lark command—such as reading a row or adding a record—will require this token to function.

Identifying Your Target: Sheets vs. Base

Finally, you need to tell Octoparse AI exactly which document to work on. While the process of obtaining the link is the same—copying the full URL from your browser's address bar—you must select the specific instruction that matches your document type.

Depending on your target, ensure you use the correct command:

  • For Standard Spreadsheets: Use the Get Lark sheet instruction. Pasting your URL here will create a "Sheet object" variable, specifically designed for row-and-column data.

  • For Multi-dimensional Databases: Use the Get Lark base instruction. Combine your URL with the access token to create a "Base object" variable, which allows you to manage complex records, fields, and views.

By choosing the appropriate command for your file type, you ensure that Octoparse AI can correctly parse the document and execute your automation tasks with precision.

Summary Checklist

Before you move on to specific data operations, double-check these three vital steps:

  • Is your Lark App Published and approved?

  • Have you Added the App to the specific document you want to edit?

  • Have you successfully generated an Access Token in Octoparse AI?

Once these are checked off, you are ready to start building advanced data pipelines!

Did this answer your question?