Adding a FileMaker connector trigger
You can use the Claris FileMaker Cloud or Claris FileMaker Server connectors to trigger a flow. To do so, you must create a script in your custom app that sends JSON data to Claris Connect. The script you create in your custom app can be activated manually from the Scripts menu or via a script trigger, for example OnRecordCommit. See "Creating and editing scripts" and "Setting up script triggers" in FileMaker Pro Help.
To trigger a flow with a FileMaker connector:
-
Create a flow, then select the connector to use. See Create a flow.
-
On the Action page that displays the Trigger by script trigger, click Continue.
-
On the Account page, click Connect New Account.
-
Enter the required information, then click Sign In.
Once you sign in, a set of instructions appears on the Configure page and a callback URL is generated.
-
Open FileMaker Pro, then create a script by following the instructions shown onscreen.
-
Test the trigger by running the script—either manually or via a script trigger— to send the data you specified in the script step to Claris Connect, then click Save Trigger.
Data sent to Claris Connect is then available for use as step data in subsequent steps in the flow. See Using step data.
Example 1, Trigger Claris Connect Flow
The example below shows a script that uses the Trigger Claris Connect Flow script step to trigger a flow, where:
"My Field"
is the name of a new attribute in the JSON data.
MyTable
is a table in the custom app.
myField
is a field in the MyTable
table and the value of the "My Field"
attribute.
returnField
is a field in the MyTable
table that stores the response from the flow.
When the script is ran, the contents of myField
are sent to the trigger in Claris Connect, used in the flow, and returned to the custom app using the Reply with JSON Data HTTP utility action. See Creating webhooks.
Example 2, Insert from URL
This example shows a script that uses the Insert from URL script step and cURL options to trigger a Claris Connect flow using a similar setup as Example 1.
In this example:
$$JSONData
is a variable that stores the JSON data.
$response
is a local variable (specified in Target) that stores the response from the Insert from URL step.
When the script is ran, the contents of myField
are sent to the trigger in Claris Connect and can be used in the flow.