Create Entity
Audience:
Low-code EngineersSkill Prerequisites:
Actions,Tokens,Connectors
Creates a new record (entity) in Microsoft Dynamics 365 / Dynamics CRM, for example a contact, an account or a lead. You pick the entity, then map each attribute (column) to a value. The ID of the new record, a GUID, can be saved in a token.
This action is part of the Dynamics (CRM, 365) add-on. The add-on is installed separately and requires the DYNCRM feature to be licensed. If it isn't licensed, the action fails with a message that the feature is unlicensed.
Typical Use Cases
- Create a lead or contact in Dynamics when someone submits a form
- Create a case from a support request and save its ID for later actions
- Copy records from your application into Dynamics, one at a time, inside a Repeat
Don't use it to
- Change a record that already exists. Use Update Entity instead.
- Check whether a record exists before creating it. Use Find Entity first, then add a condition to this action.
Related Actions
| Action Name | Description |
|---|---|
| Update Entity | Changes attributes of an existing Dynamics record. |
| Delete Entity | Deletes a Dynamics record by its ID. |
| Find Entity | Finds a Dynamics record that matches conditions. |
| Read Entity | Reads attributes of a Dynamics record by its ID. |
| Read Multiple Entities | Reads a list of Dynamics records. |
| Add Connector | Creates a connector from actions. |
| Test Connector | Checks that a connector can sign in. |
Input Parameter Reference
| Parameter | Description | Supports Tokens | Default | Required |
|---|---|---|---|---|
| Connector | The Dynamics Service Connector to use. See Connecting to Dynamics. | No | none | Yes |
| Logical Name | The entity to create a record in. The list shows the entities of the selected connector by display name, and saves the logical name, for example contact. You can also type a logical name or use a token. The value is changed to lowercase. | Yes | none | Yes |
| Entity Attributes | A list of attributes to set. Attribute Name is the attribute's logical name, for example firstname. Value is the value to save, and supports tokens. See Attribute values. | Values only | empty | No |
| Created EntityId Token | The name of a token, without brackets, that receives the ID of the new record, for example NewContactId. | No | empty string | No |
Output Parameters Reference
| Parameter | Description |
|---|---|
[<Created EntityId Token>] | The ID (GUID) of the new record. It's only set when Created EntityId Token has a value. |
Connecting to Dynamics
The action connects through a connector of type Dynamics Service Connector. Create it on the Connectors page (see Connectors) or with Add Connector, and check it with Test Connector.
| Connector field | Description |
|---|---|
| Organization Service URI | The address of the Dynamics Organization Service. Some services need the full address, for example https://<service.organization.com>/XRMServices/2011/Organization.svc. Required. |
| Organization Unique Name | The unique name of your Dynamics organization. Required. |
| Username | The Dynamics user to sign in with. Required. |
| Password | The user's password. Required. |
| Domain | Only for Active Directory (on-premises) sign-in. Leave it empty otherwise. |
The connector signs in with a username and password. It detects the sign-in type from the service: Active Directory (on-premises, uses Domain), or an online or federated sign-in. There's no option for OAuth, app registrations or client secrets.
The actions run with the permissions of that Dynamics user. The sign-in is reused until its security token is about to expire.
Attribute values
Each value is text after tokens are replaced. The action reads the attribute's type from Dynamics and converts the text to that type:
| Attribute type | What to enter | Example |
|---|---|---|
| Text | Any text | [FirstName] |
| Whole number | A whole number | 25 |
| Decimal, Floating point | A number | 12.5 |
| Currency | A number, without a currency symbol | 1500.00 |
| Two options (Yes/No) | true or false, or 1 or 0 | true |
| Date and time | A date, or a date and time. The ISO format is the safest. | 2026-09-27 or 2026-09-27T14:30:00 |
| Option set, Status, Status reason | The option's number value, not its label | 100000000 |
| Unique identifier | A GUID | [ExternalId] |
| Lookup, Customer, Owner | The GUID of the related record | [AccountId] |
Keep these in mind:
- Values that can't be converted don't raise an error here. An empty or invalid number becomes
0, and an empty or invalid Yes/No value becomesfalse. Check your tokens before the action runs. - Empty text saves no value.
- Lookups are set after the record is created. The action creates the record first, then links each lookup to the related record. See Considerations.
Considerations
- Use logical names. Attribute names must match the logical name exactly, including case. Logical names are lowercase, for example
firstname, notFirstName. An unknown name fails withThe entity of type '<entity>' does not have attribute '<name>'. - Fill in required attributes. Dynamics rejects the record if a required attribute is missing. The error comes from Dynamics.
- Lookups run in a second step. If linking a lookup fails, the record already exists in Dynamics without that link. Only add lookup rows that have a value. For a lookup, the action looks for the relationship on that attribute and fails with
No relationship could be found for entity '<entity>' with attribute '<name>' as Lookup Fieldif there's none. - Customer and Owner lookups can point to more than one entity. The action uses the first relationship it finds for the attribute, so test these carefully.
- Errors stop the flow. Connection and Dynamics errors fail the action. To handle them, put it inside Execute Actions and use its
On Erroractions. See Common Parameters forConditionand the other common settings.
Examples
To understand how to use the below examples, please see Running Examples.
1. Create a contact from a form
This action creates a contact from form values and saves its ID in [NewContactId]. The connector ID is in the [DynamicsConnectorId] token.
{
"Title": "Create Entity",
"ActionType": "DynamicsCrm.CreateEntity",
"Description": "Create the contact in Dynamics",
"Parameters": {
"Credentials": {
"IsExpression": true,
"Entry": "[DynamicsConnectorId]"
},
"LogicalName": "contact",
"EntityAttributes": [
{ "name": "firstname", "value": "[FirstName]" },
{ "name": "lastname", "value": "[LastName]" },
{ "name": "emailaddress1", "value": "[Email]" },
{ "name": "donotemail", "value": "false" }
],
"CreatedEntityIdToken": "NewContactId"
}
}
2. Create a lead linked to an account
This action creates a lead only when Company isn't empty. The parentaccountid lookup takes the GUID of an existing account, and leadqualitycode takes an option set number.
{
"Title": "Create Entity",
"ActionType": "DynamicsCrm.CreateEntity",
"Description": "Create a lead for the account",
"Condition": "[Company] != \"\"",
"Parameters": {
"Credentials": {
"IsExpression": true,
"Entry": "[DynamicsConnectorId]"
},
"LogicalName": "lead",
"EntityAttributes": [
{ "name": "subject", "value": "Web inquiry from [Company]" },
{ "name": "lastname", "value": "[LastName]" },
{ "name": "companyname", "value": "[Company]" },
{ "name": "parentaccountid", "value": "[AccountId]" },
{ "name": "leadqualitycode", "value": "2" }
],
"CreatedEntityIdToken": "NewLeadId"
}
}
Revised 09/27/2026