Use webhook triggers in automated workflows

Use webhook triggers in automated workflows

4 min read
Available with these plans:
Starter
Basic
Pro
Enterprise
To upgrade your Lark Plan or for more information, contact Support or your Customer Success Manager.
I. Intro
Automated workflows in Base can be triggered when a webhook is received. Both internal and external systems can start automated workflows using webhook triggers. Webhook triggers increase the versatility of automated workflows, allowing you to integrate Base data with different external systems.
Note: The function is technically complex and requires some programming knowledge and familiarity with Base functions.
The information flow is as follows: An external system initiates a change and sends an HTTP request (must be a POST request) to the Base automated workflow. The Base automated workflow receives the information and then triggers the corresponding action.
250px|700px|reset
If you think of this process as a telephone call, then the external system is the caller and Base is the receiver. This means the steps must be performed in the following sequence:
  1. Obtain the webhook address: The webhook address is equivalent to the recipient's phone number and is provided by Base. Every automated workflow triggered by a webhook will correspond to a unique webhook address.
  1. Configure the request URL and write the HTTP request (the information to be transmitted).
  1. Set up an automated workflow in Base, set the trigger to When webhook received, and select the actions you want to execute.
Common use cases:
  • Link an external system to a base: For example, you can configure your project management software to send a request to the base and trigger an automated workflow to notify relevant members through Lark when a record changes.
  • Link bases: You can run automated workflows across different bases. For example, when changes are made to the "Client Information" base, an HTTP request is sent to the "Order Information" base to automatically create a new record in the "Order Information" base.
  • Sync data: Data sources currently update automatically every hour, but a webhook trigger can be used to automatically sync data immediately whenever data is added or edited.
II. Steps
Open a base and click Automations in the upper-right corner to create a new automated workflow.
Get the webhook address
Select When webhook received from the triggers on the left to see the unique webhook address for the workflow.
Every automated workflow triggered by a webhook has a unique webhook address. This address cannot be manually refreshed or edited. It needs to be entered into the system you want to link, so HTTP requests can be sent.
250px|700px|reset
250px|700px|reset
Configure the security settings
You can strengthen call security as needed by configuring IP restrictions, bearer tokens, and other settings.
IP restrictions: When enabled, only requests sent by IP addresses on the allowlist will trigger the automated workflow. Up to 10 IP addresses can be added. Press Enter after each IP address to add another IP address.
Bearer token: This is equivalent to applying a password to webhook triggers. When enabled, all requests must carry this token to trigger the automated workflow. You can copy and reset the token. Reset tokens will come into effect when you click Save and Activate for the automated workflow.
For more information on bearer tokens and their parameters, see Overview of webhook parameters in Base automated workflows.
250px|700px|reset
Configure data structure settings
Define webhook output in the data structure settings for use in subsequent automated workflows. There are three settings for data structure: Send Sample Request, Manual Setup, and Leave it empty.
250px|700px|reset
  • Send Sample Request: Send a sample request to the webhook address for the automated workflow. After it's sent, you can click the Generate button to configure the settings.
  • Requests will be monitored for the last three minutes until the loading is complete.
  • The loading time is capped at five seconds. If a request has not been received after five seconds, loading will stop and the request will need to be re-sent. If a request is received after five seconds, the complete structure of the request body will be displayed and this cannot be edited. If multiple requests are received within five seconds, the newest request will be used.
  • Click Re-generate to send a new request body and generate new settings.
Once a request is received, an output example (JSON schema) will be automatically generated in accordance with the structure of the sample request. The complete item structure can be parsed.
Note that, if you are editing or revising an enabled workflow, sending a sample request will trigger the entire automated workflow once.
250px|700px|reset
250px|700px|reset
  • Manual Setup: Manually enter a JSON sample of the request body in the Sample request payload field.
  • Leave it empty: Select this option if subsequent steps in the automated workflow do not need to reference the external request.
If you switch to another data structure configuration method when making edits, your original edits will be temporarily saved and then completely cleared when you close the automated workflow settings window.
Use the information received through the webhook
Webhook information can be referenced in subsequent automated workflow steps once the schema has been constructed.
Click the icon in the text box you want to reference and hover over The return value of request sent in step 1. You can directly click Select to reference it or click Next to see more details, and then select config, elements, or header.
250px|700px|reset
250px|700px|reset
If you edit the JSON schema after a subsequent step has already referenced the webhook information, the reference will be invalidated.
III. Related
IV. FAQs
What are the size limits for HTTP requests?
You can receive requests up to 4 MB in size.
What frequency restrictions apply to webhook triggers?
  • Each base can handle a maximum of 50 webhook trigger events per second.
  • Each automated workflow can handle a maximum of five webhook trigger events per second.
  • Each automated workflow that does not have bearer tokens enabled can handle a maximum of one webhook trigger event per second.
For more information on webhook trigger errors, see Overview of webhook parameters in Base automated workflows.
How are the configurations retained or updated when I duplicate automated workflows triggered by webhooks (using a template to create a workflow or importing/exporting a flow)?
  • The webhook address will be re-generated.
  • The token will also be re-generated if you have selected Bearer token.
  • IP restrictions, data structure settings, and other settings will remain unchanged.
Written by: Lark Help Center
Updated on 2025-01-21
How satisfied are you with this content?
Thank you for your feedback!
Need more help? Please contact Support.
1
rangeDom
rangeDom
rangeDom
rangeDom