Create Entry
contentful.create_entry
ActionBusiness appsconnection required
Calls the Contentful API with the connection's credentials.
Create a draft entry of a content type; supply an entry id to choose it rather than let Contentful generate one.
Connection
- Required
- Yes — the node will not save without one
- Auth type
- Bearer token
- Providers
- Contentful
- Secret shape
- the CMA access token, or {"access_token": "…"}
- Config it needs
- space_id, environment_id, base_url
- Resolved by
- config.connection_id, else node.connection_id
Configuration
6 fields, 2 required. A dotted path is a nested object and name[] an array of objects — the editor renders the same tree.
| Field | Type | Required | Default | Constraints | Example |
|---|---|---|---|---|---|
content_type_id The content type the new entry belongs to. | string | Yes | — | — | — |
fields Field values as JSON, keyed by field id and then by locale, such as {"title": {"en-US": "Hello"}}. | object | Yes | — | — | {"title":{"en-US":"Hello"}} |
entry_id Create the entry under this id instead of a generated one. | string | No | — | — | — |
metadata Contentful metadata as JSON, such as {"tags": [{"sys": {"type": "Link", "linkType": "Tag", "id": "news"}}]}. | object | No | — | — | {"tags":[{"sys":{"id":"news","linkType":"Tag","type":"Link"}}]} |
space_id The space to act on. Leave blank to use the connection's space. | string | No | — | — | — |
environment_id The environment to act on. Leave blank to use the connection's environment, or 'master'. | string | No | — | — | — |
Example configuration
Every value below is the contract’s own example or default — nothing invented.
{
"fields": {
"title": {
"en-US": "Hello"
}
},
"metadata": {
"tags": [
{
"sys": {
"id": "news",
"linkType": "Tag",
"type": "Link"
}
}
]
}
}Output
One shape.
result
| Field | Type | Example |
|---|---|---|
sys.id The entry id. | string | — |
sys.type The entity type, which is 'Entry'. | string | — |
sys.version The entry's version after this call. | number | — |
sys.contentType.sys.id The id of the entry's content type. | string | — |
sys.createdAt When the entry was created, as an ISO 8601 timestamp. | string | — |
sys.updatedAt When the entry last changed, as an ISO 8601 timestamp. | string | — |
fields The entry's field values, keyed by field id and then by locale. | object | — |
{
"fields": {},
"sys": {
"contentType": {
"sys": {
"id": ""
}
},
"createdAt": "",
"id": "",
"type": "",
"updatedAt": "",
"version": 0
}
}Notes
- A created entry is a draft — publish it with contentful.publish_entry.
See Create Entry run in a workflow.
In a technical demo we add the Contentful connection, drop the node on the canvas and let Workflow Health pre-flight it before the first real run.