> For the complete documentation index, see [llms.txt](https://docs.work-relay.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.work-relay.com/processes/process-actions/process-actions-types/create-record.md).

# Create Record

### Generic Process Action properties

This action has generic properties, as other process actions:

* **Name** - give action a name in order to search for it easy, otherwise system will use ID of this Action.
* **Step** - the step action is added at. This property can't be edited manually, but it will be updated if move this action to other step or connector.
* **Type** - main property which determines what Action will do and it's configuration. Once action is created, type can't be changed.
* **Status** - you can activate or deactivate an action temporary (e.g., for debug).
* **Start Type** - can be set to "Before step" or "After step".&#x20;

{% hint style="info" %}
This option is available only when action is added to the step. If action is added to a connector, it will be executed like "After step", where step is the outgoing step of this connector.
{% endhint %}

* **Execute** - specify if Action will be executed always or when some conditions are matched.
* **Description** - used internally only for admin's goals.

### Overview

**Create Record** action allows to add a new record(s) of the selected Object.

### Configuration

* Select necessary object in Context Object Type.&#x20;

{% hint style="info" %}
This is not mandatory, but can be useful - e.g., if you want to create some new record with field values based on another record shown in current form.
{% endhint %}

* Set **Action Type** = "Create Record".&#x20;
* Select the **Object Name** - this will be an object which you will create record for.
* **Add fields**.&#x20;

{% hint style="warning" %}
All fields that are required for selected Object will be added by default and you can't remove them.
{% endhint %}

* Fill in **value** for each field. You can use static values by default. Switch to Advanced mode to use Merge Fields or [formulas](/automations/functions-and-formulas/introduction-and-usage.md) to populate values (see more info on Merge Fields and Formulas at [Working with Context objects](/automations/global-actions-and-action-groups/basics/working-with-context-objects.md) and [Working with Functions](/automations/functions-and-formulas/introduction-and-usage.md).
* Specify a **Variable Name** (optionally). This will add a variable which will be populated with the Id of the created record.&#x20;

{% hint style="info" %}
It's useful if you need to handle successful result of this action and refer to newly created record - for example, build a link to new record and send it to some user by email.
{% endhint %}

<img src="/spaces/kkIfnKKNSULyGZ085PIG/files/nxXAo9VFAIexcU9bXnXJ" alt="" class="gitbook-drawing">

### How to create multiple records

* Check **"Repeat"** if you need to create multiple records. When checked, **two new fields** appear:
  * **Number of Iterations** - it can contain a number or some variable/merge field returning a number of records to create. If do not populate, system will show an error message.
  * **Iterator Name**: you can set a variable which will be populated with the value of the record creation cycle iterator. It's useful if you need to handle successful result of this action and refer to the index of iterations - for example, paste it in the record name. This variable should be user as standard merge field. E.g., if variable name is **record\_index**, add it as `{$Variables.record_index}`.

<figure><img src="/spaces/kkIfnKKNSULyGZ085PIG/files/YWS3KtfsYwUOKX6cZ7Xq" alt=""><figcaption></figcaption></figure>

Iterator variable value starts from 0 and increments by 1. In the example at the picture above such records will be created:

<figure><img src="/spaces/kkIfnKKNSULyGZ085PIG/files/JPHGHANYqpThgR4RzgSI" alt=""><figcaption></figcaption></figure>

You can use this variable in formulas. E.g., if in the example above set Account Name to `Test FORMULA[({$Variables.record_index} +1) * 10] Company`, the following records will be created:

<figure><img src="/spaces/kkIfnKKNSULyGZ085PIG/files/Da7mTnjfyBjtuj8bMwbl" alt=""><figcaption></figcaption></figure>

### **Configure background execution**

* Check **Execute in background** if you need to execute **Create record** action in other context than current user operation. See more info at [How to use Execute in background option](/automations/global-actions-and-action-groups/using-actions/how-to-use-execute-in-background-feature.md).

  If check this option, the new field will appear:

  * **With gap**: by default it is 0, but can be set as an integer number of minutes. This field specifies interval before action execution (for repeated actions - before each iteration).

<figure><img src="/spaces/kkIfnKKNSULyGZ085PIG/files/GVqJCT2TzF9GaJFVuUd4" alt=""><figcaption></figcaption></figure>
