Trigger and Action
Home > Connect > Workato > Trigger and Action
- 1. Explain and use triggers and actions
- 2. Object definition
- 2.1. Triggers Parameter Object
- 2.2. Execute BOT Parameter Object
- 2.3. Upload Parameter Object
- 2.4. Download Parameter Object
- 2.5. Bot Result Object(Output)
- 2.6. Upload Result Object(Output)
- 2.7. Download Result Object(Output)
- 2.8. Output Object(Output)
- 2.9. File Object
- 2.10. Meta Object
- 2.11. Group Object
- 2.12. Group Row Data Object
Explain and use triggers and actions
Type | Trigger and Action | Description |
Trigger | When BOT execution is completed | The completion of BOT execution is a trigger. Obtain the BOT output value that can be used in the subsequent action. |
Action | Execute BOT | BOT on the Cloud BOT can be executed as an action. You can specify the input values when BOT is executed. In addition, you can use the output values at execution in the remaining action. |
Action | Upload file | Upload the file data to Cloud BOT. File ref value can be obtained as an output value, as well as the output value can be used with Execute BOT. |
Action | Download file | Download the file data from Cloud BOT. You can retrieve the file from the File ref value. |
When BOT execution is completed (Trigger)
Set the completion of BOT execution as a trigger.
Obtain the BOT output value that can be used in the subsequent action.
"When BOT execution is completed" setting value(Setup)
Language | Select the language used when executing BOT. |
Contract | Select your Cloud BOT contract. You can select your Cloud BOT contract that the external connection is enabled. |
BOT | Select the BOT to trigger. You can select the BOT that the external connection is set. |
Refer to this page about an input definition for "When BOT execution is completed".
"When BOT execution is completed" execution result (Output)
The Bot Result Object is output as "When BOT execution is completed" execution result (Output).
Refer to Bot Result Object for details.
Execute BOT(Action)
BOT on the Cloud BOT can be executed as an action.
You can specify the input values when BOT is executed. In addition, you can use the output values at execution in the remaining action.
"Execute BOT" setting values (Setup)
Language | Select the language used when executing BOT. |
Contract | Select your Cloud BOT contract. You can select your Cloud BOT contract that the external connection is enabled. |
BOT | Select the BOT to execute. You can select the BOT that the external connection is set. |
Async | [Yes]Run the BOT asynchronously. Response is returned immediately after the BOT starts running. [No]Run the BOT synchronously. Response is returned when the BOT completes its execution. * If the BOT is executed asynchronously, or if 25 seconds have passed since the BOT starts running, the response will be returned at that point even if the BOT is still executing. The status will be “2” (running). In addition, Cast URL is published. |
BOT input value | Specify the input value of the BOT. * If not set, it will run with BOT's default values. * Click "optional fields available" and specify fields to set any input values. |
Refer to this page about an Input Object definition for "Execute BOT".
About inputting the BOT input values
The input method changes depending on the data type of the BOT input value. It is compared with the input interface on the Data Viewer of the Cloud BOT.
Text type
- Text type data specifies a single string.
Multiple text type
- Multiple text type data specifies multiple strings (array).
File type
- File type data specifies File ref value (array).
Group
Group rows are represented by an array.
- Set "INPUT MODE" to "Fixed list" and click "Add item" to add more group rows.
The way to input the added row changes depends on the data type. It is compared with the input interface on the Data Viewer of the Cloud BOT.
Text type
- Text type data specifies multiple strings (array).
Multiple text type
- Multiple text type data specifies multiple strings (array).
File type
- File type data specifies File ref value (array).
"Execute BOT" execution result (Output)
The Bot Result Object is output as "Execute BOT" execution result (Output).
Refer to Bot Result Object for details.
Upload file(Action)
Upload the file data to Cloud BOT.
File ref value can be obtained as an output value, as well as the output value can be used with Execute BOT.
"Upload file" setting value (Setup)
Language | Select the language used when executing BOT. |
Contract | Select your Cloud BOT contract. You can select your Cloud BOT contract in which the external connection is enabled. |
File contents | Specify the file (binary data). Associate the File contents with the output value of a previous trigger or action. |
File name | Specify the file name. Associate the Name with the output value of a previous trigger or action. |
Refer to this page about an Input Object definition for "Upload file".
"Upload file" execution result (Output)
The Upload Result Object is output as "Upload file" execution result (Output).
Refer to Upload Result Object for details.
Download file(Action)
Download the file data from Cloud BOT.
You can retrieve the file from the File ref value.
"Download file" setting value (Setup)
Language | Select the language used when executing BOT. |
Contract | Select your Cloud BOT contract. You can select your Cloud BOT contract that the external connection is enabled. |
File ref | Specifies File ref value. |
Refer to this page about an Input Object definition for "Download file".
"Download file" execution result (Output)
The Download Result Object is output as "Download file" execution result (Output).
Refer to Download Result Object for details.
Object definition
Triggers Parameter Object
This is an Object that stores the setting value of When BOT execution is completed. The structure is as follows.
Key name | Type | Value |
Language | string | Requested language (Japanese: ja, English: en) |
Contract | string | Public ID for the API |
BOT | string | BOT ID |
Execute BOT Parameter Object
This is an Object that stores the setting value of Execute BOT. The structure is as follows.
Key name | Type | Value |
Language | string | Requested language (Japanese: ja, English: en) |
Contract | string | Public ID for the API. |
BOT | string | BOT ID |
Async | boolean | Synchronous mode (true: synchronous, false: asynchronous) |
{data name} or {group name[data name]} | string or Array | BOT input value |
About BOT input value
The BOT input value changes depending on the data type.
Data type | Type | Value |
Text type | string | String |
Multiple text type | Array | String array |
File type | Array | File ref value |
Group
Data type | Type | Value |
Text type | Array | String array |
Multiple text type | Array | Group Row Data Object array (list) |
Upload Parameter Object
This is a Object that stores setting values of Upload file. The structure is as follows.
Key name | Type | Value |
Language | string | Requested language (Japanese: ja, English: en) |
Contract | string | Public ID for the API. |
File contents | string | Binary data |
File name | string | File name |
Download Parameter Object
This is a Object that stores setting values of Download file. The structure is as follows.
Key name | Type | Value |
Language | string | Requested language (Japanese: ja, English: en) |
Contract | string | Public ID for the API. |
File ref | string | File ref value |
Bot Result Object(Output)
This is an Object that stores the execution result (Output) of When BOT execution is completed and Execute BOT. The structure is as follows.
Key name | Type | Value |
Code | integer | Response code |
Job ID | string | Job ID |
BOT ID | string | BOT ID |
BOT name | string | BOT name |
Status | integer | Run status (0: Success, 1: Error, 2: running) |
Start time | string<date-time> | Time when execution started |
Elapsed time | integer | Number of seconds for execution |
Cast URL * | string | URL that refers to the virtual browser screen during BOT execution |
Message | string | Message |
Output | Object | Output Object |
* Displayed when status is 2.
Upload Result Object(Output)
This is an Object that stores the execution result (Output) of Upload file. The structure is as follows.
Key name | Type | Value |
Code | integer | Response code |
File ref | string | File ref value |
Download Result Object(Output)
This is an Object that stores the execution result (Output) of Download file. The structure is as follows.
Key name | Type | Value |
File contents | string | Binary data |
File size | number | File size (byte) |
File name | string | Applicable file name |
Output Object(Output)
This is an Object that stores the output values of the execution result (Output). Data and groups have different values. The structure is as follows.
Key name | Type | Value |
{data name} or {group name} | Data name: string or array/group name: Object | Data name: output data value/group name: Group Object |
About output values
The output data value changes depending on the data type.
Data type | Type | Value |
Text type | string | String |
Multiple text type | Array | String array |
File type | Array(List) | File Object array |
File Object
This is an Object that stores a file. The structure is as follows.
Key name | Type | Value |
File ref | string | File ref value |
Meta | Object | Meta Object |
Meta Object
This is an Object that stores a file metadata. The structure is as follows.
Key name | Type | Value |
File name | string | file name |
File size | number | File size (byte) |
Timestamp | string | File created date and time (UNIX timestamp) |
Group Object
This is an Object that stores a group. The structure is as follows.
キー名 | 型 | 値 |
{data name} | Array / Array(List) | Output data names array/Group Row Data Object array |
Group Row Data Object
This is an Object that stores a row data of a group. The structure is as follows.
Key name | Type | Value |
Values | Array | Input data values array / output data values array |