The 4me Connector can be used to easily connect to the 4me GraphQL API, which automatically exposes the data and functionality of 4me through a single endpoint. This eliminates the need to redeploy the connector in case of API updates. As soon as the API is updated, the 4me Connector automatically adapts to these updates.
Best Practice: Workflows and Tasks
To ensure maximum traceability, automation recipes should always be triggered from tasks within workflows in 4me. A single task triggers a single automation recipe, and the result and output of the recipe are added as a note to the task. When the automation is successful, the automation task is completed. In case of a failure, the automation recipe can activate troubleshooting tasks or simply update the status of the task to
failed. The manager of the workflow will automatically be notified by 4me.
The recommended trigger for an automation recipe is using webhooks. The recommended Event for the webhook that will trigger the recipe is
automation_rule. This allows the webhook to be triggered using automation rules in 4me. Automation rules provide maximum flexibility in determining when the webhook should be triggered and what is included in the webhook payload.
The following input fields are mandatory when configuring the 4me Workato Connector.
- The Event. The webhook’s event type.
- The GraphQL ID of the Webhook. This ID is used to properly route the incoming webhook to the correct recipe.
- The JWT public key. This key is used to validate the incoming webhook content.
This example shows how to create a new recipe in the 4me Workflow Automator tiggered via an automation rule.
Create a new OAuth Application
Open the settings, search for OAuth Applications and create a new application.
The 4me connector only supports the
client credential grant type.
Define the scope and click Generate OAuth Application.
client ID and
client secret are needed to setup the connection.
Create a connection and recipe in the 4me Workflow Automator
Open the 4me Workflow Automator.
If the icon is not visible make sure to assign the
4me Workflow Automator specialist role.
Create a new project and connection.
4me connector and enter all required information, including the
client ID and
Create a new recipe in the previously created project and choose
Trigger from an app and click
4me connector and choose the previously created connection.
The 4me Workflow Automator will generate the webhook URL.
Copy the URL to create a new webhook in 4me.
Create a webhook and webhook policy
Create a new
Webhook Policy and download the public key.
Create a new
Webhook and assign the previously created
Webhook identifier or
Update the recipe webhook information
In the 4me Workflow Automator enter the
Webhook identifier, select the
JWT algorithm and enter the
Webhook Policy Public Key or
Webhook identifier is used to route any incoming webhook to this recipe.
It is possible, not required, to describe all properties delivered by the
automation rule webhook.
This makes it much easier to reference them later in the recipe.
You can still reference them by name.
The 4me connector will automatically process the webhook verification request.
In the event of any problems, you can take the following steps to manually handle the verification request for the webhook.
- Click on
Testin the 4me Workflow Automator to test the recipe and wait for the webhook verification to be delivered.
- To speed up the verification you can redeliver the verification go to
webhook deliveriesand click
- After the test is finished, navigate to the
outputscreen of the 4me connector trigger and then expand the
payloadfield. From there, you can copy the
callbackvalue and paste it into a web browser.