Trigger and Action

NO IMAGE

 Home > Connect > Workato > Trigger and Action

Explain and use triggers and actions


Type
Trigger and ActionDescription
TriggerWhen BOT execution is completedThe completion of BOT execution is a trigger.
Obtain the BOT output value that can be used in the subsequent action.
ActionExecute BOTBOT 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.
ActionUpload fileUpload 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.
ActionDownload fileDownload 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)

LanguageSelect the language used when executing BOT.
ContractSelect your Cloud BOT contract.
You can select your Cloud BOT contract that the external connection is enabled.
BOTSelect 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)

LanguageSelect 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)

LanguageSelect the language used when executing BOT.
ContractSelect your Cloud BOT contract.
You can select your Cloud BOT contract in which the external connection is enabled.
File contentsSpecify the file (binary data). Associate the File contents with the output value of a previous trigger or action.
File nameSpecify 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)

LanguageSelect the language used when executing BOT.
ContractSelect your Cloud BOT contract.
You can select your Cloud BOT contract that the external connection is enabled.
File refSpecifies 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 nameTypeValue
LanguagestringRequested language (Japanese: ja, English: en)
ContractstringPublic ID for the API
BOTstringBOT ID

Execute BOT Parameter Object

This is an Object that stores the setting value of Execute BOT. The structure is as follows.

Key nameTypeValue
LanguagestringRequested language (Japanese: ja, English: en)
ContractstringPublic ID for the API.
BOTstringBOT ID
AsyncbooleanSynchronous mode (true: synchronous, false: asynchronous)
{data name} or {group name[data name]}string or ArrayBOT input value

About BOT input value

The BOT input value changes depending on the data type.

Data typeTypeValue
Text typestringString
Multiple text typeArrayString array
File typeArrayFile ref value

Group

Data typeTypeValue
Text typeArrayString array
Multiple text typeArrayGroup 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 nameTypeValue
LanguagestringRequested language (Japanese: ja, English: en)
ContractstringPublic ID for the API.
File contentsstringBinary data
File namestringFile name

Download Parameter Object

This is a Object that stores setting values of Download file. The structure is as follows.

Key nameTypeValue
LanguagestringRequested language (Japanese: ja, English: en)
ContractstringPublic ID for the API.
File refstringFile 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 nameTypeValue
CodeintegerResponse code
Job IDstringJob ID
BOT IDstringBOT ID
BOT namestringBOT name
StatusintegerRun status (0: Success, 1: Error, 2: running)
Start timestring<date-time>Time when execution started
Elapsed timeintegerNumber of seconds for execution
Cast URL *stringURL that refers to the virtual browser screen during BOT execution
MessagestringMessage
OutputObjectOutput 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 nameTypeValue
CodeintegerResponse code
File refstringFile 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 nameTypeValue
File contentsstringBinary data
File sizenumberFile size (byte)
File namestringApplicable 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 nameTypeValue
{data name} or {group name}Data name: string or array/group name: ObjectData name: output data value/group name: Group Object

About output values

The output data value changes depending on the data type.

Data typeTypeValue
Text typestringString
Multiple text typeArrayString array
File typeArray(List)File Object array

File Object

This is an Object that stores a file. The structure is as follows.

Key nameTypeValue
File refstringFile ref value
MetaObjectMeta Object

Meta Object

This is an Object that stores a file metadata. The structure is as follows.

Key nameTypeValue
File namestringfile name
File sizenumberFile size (byte)
TimestampstringFile 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 nameTypeValue
ValuesArrayInput data values array / output data values array