> For the complete documentation index, see [llms.txt](https://docs.infotopics.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.infotopics.com/trulyp/writebackextreme/workflows.md).

# Workflows

The general idea of workflows is the ability to send a notification to another system of an action that is triggered in the extension. For example: When a user creates a collaboration record in the extension, the representative should be notified per mail.

## Workflows Architecture

Submitting a form in the WriteBackExtreme extension can trigger a workflow, meaning the submitted data is also sent to the workflow executor that will send the data to the configured processor.

<figure><img src="https://appsfortableau.infotopics.com/wp-content/uploads/2023/02/Screenshot-at-.png" alt=""><figcaption></figcaption></figure>

We currently support the following processors:

<figure><img src="https://appsfortableau.infotopics.com/wp-content/uploads/2022/12/WriteBackExtreme-Supported-Processors.png" alt=""><figcaption></figcaption></figure>

### **Getting started**

<figure><img src="https://2312557015-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWbWxEBax8PKTjFYRLWgi%2Fuploads%2FVtXYuPEnvvMw7f0sDUJa%2Fimage.png?alt=media&amp;token=da376fe7-ff44-4d4a-80b4-af470de90c70" alt=""><figcaption></figcaption></figure>

A workflow is defined on a schema. To make a new Workflow, head to the **Workflows** tab under WriteBackExtreme, and then click **Create new workflow** in the top right.

<figure><img src="https://2312557015-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWbWxEBax8PKTjFYRLWgi%2Fuploads%2Fqea2ciwN7PTkDf5IiB6n%2Fimage.png?alt=media&amp;token=c642575c-bd16-4dae-b8bb-2291f324066d" alt=""><figcaption></figcaption></figure>

Select the schema for which you want to create a workflow, the **schema fields** and the **system fields** you would like to send. There is four types of triggers; **Create, Delete, Update, Import.**

* **Create**: Runs when a new record is created.
* **Delete**: Runs when a record is deleted.
* **Update**: Runs when an existing record is changed.
* **Import**: Runs when records are added or updated through an import.
* **Manual**: Runs only when manually triggered.

#### **System fields**

System fields are fields that are not in the schema fields but are filled by the system, like the user who triggered the action, the trigger itself and the selected marks. The **Selected marks f**ield will append an array of the marks that the user selected in the connected sheet of the dashboard when creating/updating the form in the WriteBackExtreme or Inputtables extension.&#x20;

For example: I have a dashboard with a sheet of states and connect my extension to that sheet. When I select a state and make a record in my extension for that state, the workflow payload will include that selected state when it is triggered.

{% hint style="info" %}
In a Data correction schema, data is always treated as an update. This is also the case for data that is coming from inputtables.
{% endhint %}

After selecting the data  to send, press the **show sample payload** button to see what kind of data will be sent to the Processor:&#x20;

<figure><img src="https://2312557015-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWbWxEBax8PKTjFYRLWgi%2Fuploads%2FQVKmahCMhsIVrbDh2PN6%2Fimage.png?alt=media&amp;token=a2e9e8ba-2a35-41e7-9bfc-fe2bff112b70" alt=""><figcaption></figcaption></figure>

#### **Give it a try!**

The \`try\` button at the top of the workflow popup will generate a sample payload. This will enable the user to see the JSON structure of the payload that is sent by WriteBackExtreme. This is needed as input for the setup in some third party applications like Power automate and salesforce.

From here, you can either save the workflow, or add a **relation.**

### **Relations**

What makes workflows more powerful is the ability to add even more data to the request. For example: When you have a form in your extension where you can specify the state of the US. You can append data to the notification that is specific for that state. Relations can be set for all tables of a connection. Even if the tables are not managed by WriteBackExtreme at all. Only a connection is needed to make it work. Relations are defined globally for the given schema so that it is re-usable for any trigger that needs that information attached to the workflow payload.

To add a workflow relation click on the **new relation** button in the workflow create or edit screen.

<figure><img src="https://2312557015-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWbWxEBax8PKTjFYRLWgi%2Fuploads%2FFaKCWSHHYC5PXAfTxCVQ%2Fimage.png?alt=media&amp;token=141017af-f527-43e1-b20e-86f2c9760b83" alt=""><figcaption></figcaption></figure>

You will then be prompted with a helpful wizard to take you through setting up your relation. Give your relation a recognisable name, set the connection to your database which holds the table you wish to connect to then in the table find the column to match with a column in your schema. From that table you can decide which columns you wish to fetch by clicking on one or multiple.

#### **Logging**

Each trigger will create a log entry in Trulyp. These logs are only accessible to **Administrators,** under the **Monitoring** tab. All errors that are returned by the third-party application will be stored in our logs files. We only store logs of the last 14 days.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.infotopics.com/trulyp/writebackextreme/workflows.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
