4 Parameter Passing Examples
The Integration Center offers hundreds of pre-integrated APIs from dozens of service providers. For beginners, handling special parameter types can be challenging. This article demonstrates how to pass four common parameter types:
- URL of documents or images
- Simple arrays
- Arrays of objects
- Base64-encoded images
1. Image / Document URL
Some APIs, such as invoice recognition or OCR, require image or document URLs as input. As long as the API server can access the provided URL, it will be able to process the file.

When the parameter for the URL is based on an attachment field (e.g., selecting an uploaded file or image), the URL needs to be extracted using a workflow.
-
Option 1: API Query Field
When using the API Query field type, it cannot be triggered during record creation. Instead, follow these steps:
- Save the record with the uploaded attachment first
- Use a code block node in the workflow to retrieve the URL of the attachment field
- Write the retrieved URL into a separate text field, e.g., "Image URL"
- The API query button can then use the value of the "Image URL" field as the parameter
-
Option 2: Call Integrated API via Workflow
In a workflow, use a code block node to extract the image URL. Then pass the URL output from the code block directly into the API call as a parameter.
How to Retrieve the URL of an Attachment
For details on obtaining the attachment URL, see Common Code Block Examples – 5.1
2. Simple Arrays
Let's take the example of sending a text message to a WeCom (WeChat Work) group. The API requires a parameter in the form of a simple array, as shown below:

A simple array follows the format:
[element1, element2, ...]
In this scenario, the array contains the mobile numbers of members to be mentioned, for example: [19909090909,18811111111,...]. If you want to mention all members in the group, the array should be: ["@all"]
Currently, only code block nodes in workflows can output values in this array format. Therefore, to pass this type of parameter, you must use a workflow.
The API Query field cannot pass array parameters when creating a new record. You must first save the record, then use a workflow to construct the array, and finally trigger the API query button.
How to Generate a Simple Array
This section demonstrates how to generate an array of mobile phone numbers for use in APIs such as sending a text message to a WeCom (WeChat Work) group.
Calling an Integrated API in Workflow
Worksheet Setup
1. Add a “Mentioned Members” Field
Use a multi-select Members field to specify which users to @mention.

2. Add a “Mention All” Field
This is typically a single checkbox. When selected, the array value should be ["@all"].

Workflow Configuration
You can trigger the workflow either via a custom button or automatically when a new record is created.
1. Add a Branch Node to Handle Mention Logic
When the workflow is triggered, first check if the "Mention All" field is selected. If not, process the list of selected members instead.
If your use case does not require the
@allfunctionality, you may omit the “Mention All” field and its related workflow branches.

2. Branch: Mentioning All Members
-
2.1. Input the @all array directly in a code block node

-
2.2. Use a JSON Parsing node to format the output

-
2.3. Select the parsed array in the Call Integrated API node

3. Branch: Mentioning Specific Members
-
3.1. Use the “Get Multiple Personnel” node
Fetch selected members from your organization.

-
3.2. Convert mobile numbers to an array using a code block

You can hardcode the array for initial testing: ["+8619909090909"]
Later, replace it with dynamic fields from the previous node.

var mobiles= JSON.parse(input.mobile.replace(/\+86/g, ""))
output = {mobiles:mobiles}; -
3.3. Format the result with a JSON Parsing node

-
3.4. Use the parsed array as an input in the Call Integrated API node

API Query Field to Call Integrated API
When passing a simple array using the API query field, the format differs from that used in workflows. Specifically, only commas are needed between elements—square brackets are not required. Therefore, when using an API query field to pass a simple array, you can use a text field or a multi-select field, as both can store this format.
-
Mention specific members by phone number

-
Mention all members

We’ll use the example of sending a group message in WeCom. Before triggering the API query, you must use a workflow to retrieve a list of phone numbers and write it to a text field. The API query field will then use that text field as the input parameter.
Workflow Configuration
1. Process the list of phone numbers using a code block

Start by hardcoding test values. Once confirmed, replace them with dynamic values from a previous workflow node.

The goal of this code block is to remove any unwanted characters such as +86, quotes, and brackets.
output = {output: input.phone.replace(/["\[\]]|(\+86)/g, '') };
If you need to extract other fields from multiple records and join them as an array into a text field, you can use a similar code structure.
output = {output: input.phone.replace(/["\[\]]/g, '') };
2. Write the formatted content to a text field

Result Example

API Query Field Configuration
In the API query field settings, select the text field that contains the list of phone numbers. This will serve as the simple array parameter when calling the API.

3. Object Arrays
An object array represents multiple records. Each object corresponds to one record.
For example, the following object array represents two people with their names and ages.
[
{
"name" : "jim",
"age" : 18
},
{
"name" : "bob",
"age" : 16
}
]
Example: Passing an Object Array
Example: Sending rich media messages to a WeCom group
This API supports sending multiple rich media messages in a single request, so the parameter must be passed as an object array. There are two supported ways to pass an object array.

API Query Field
When passing an object array via an API query field, you can only select a subform or a relationship field (multiple records).
This is because both fields are multi-row structures—each row represents a business object, and multiple rows together form an object array.

If the content to be sent is stored in the current record only, the API query field cannot be used. In this case, use a workflow triggered by a custom button instead.
Workflow
In a workflow, first use the Get Multiple Data node to retrieve the records to be sent.
Then, in the Call Integrated API node, select the fields from the retrieved records as the object array parameter.

Sending Content from the Current Record
What if all the content to be sent exists only in the current record (not in related records or a subform)?
Because object array parameters require a multi-record structure, you still need to use the Get Multiple Data node.
Configure the filter condition as Record ID equals the current record ID, so that only the current record is returned.

After retrieving the record, select the corresponding fields as parameters in the Call Integrated API node.
4. Image Base64 Encoding
Some APIs require image data to be passed as Base64-encoded content and do not support image URLs.
In such cases, you must first use a code block node in a workflow to convert the image to Base64, and then call the API.

For details on obtaining an image’s Base64 encoding, see Common Code Block Examples – 5.2