Install
Read and manage Contentful entries, assets, content types, locales, tags, environments, and webhooks with the Delivery, Preview, and Management APIs, and start a workflow on a content event.
- Open System, then Nodes.
- Find Contentful and click Install.
- Use the new nodes at once. You do not restart.
How it works
Contentful (contentful.api) is an action node in the Contentful package (@zerodot/contentful): Read and manage content in Contentful with the Delivery, Preview, and Management APIs.
Use the API field to select the API:
- Delivery: reads published content (Content Delivery API). It needs a delivery credential.
- Preview: reads draft and published content (Content Preview API). It needs a delivery credential with a preview token.
- Management: reads and changes content and settings (Content Management API). It needs a management credential.
All resources except Space, Webhook, and Environment, Get Many use the Environment ID (default master). The Space ID of the node replaces the space ID of the credential.
Delivery and Preview (read only):
- Entry: get, get many
- Asset: get, get many
- Content Type: get, get many
- Locale: get many
- Space: get
- Tag: get, get many
- Sync: initial sync, next sync
Management:
- Entry: create, get, get many, update, delete, publish, unpublish, archive, unarchive
- Asset: create, get, get many, update, delete, process, publish, unpublish, archive, unarchive
- Upload: create (from a binary property of the input)
- Content Type: create, get, get many, update, delete, activate, deactivate
- Environment: create, get, get many, delete
- Locale: create, get, get many, update, delete
- Tag: create, get, get many, update, delete
- Webhook: create, get, get many, update, delete
- Space: get, get many
Lists have Return All (at most 5000 items) and Limit. The node pages with skip and limit (at most 1000 items in a page). The list gives the items. It does not give includes.
Search parameters:
- Entry, Get Many has Content Type ID, Select, Include, Locale, Order, Links To Entry, Links To Asset, Full Text Search, and Skip.
- Search Parameters is a list of name and value pairs for the other parameters of the API. Examples:
fields.slug[match],sys.createdAt[gte],metadata.tags.sys.id[in]. For a field parameter, set the Content Type ID too. - Asset, Get Many has Select, Locale, Order, File Type Group, Full Text Search, and Skip.
- Content Type, Get Many and Tag, Get Many have Select, Order, and Skip.
Notes:
- Update operations send the full item. Contentful removes the fields that you do not send. Get the item first when you want to keep its other fields.
- Version: a change needs the current version in the header
X-Contentful-Version. If you leave Version empty, the node gets the current version first and sends it. Set it to let Contentful refuse the change when someone changed the item in the meantime (HTTP 409). - Tag, Create sets the visibility (private by default). Contentful cannot change it later, so Update does not send it.
- Entry, Create sends the header
X-Contentful-Content-Type. Set an Entry ID to make the entry with that ID. If you leave it empty, Contentful makes an ID. - Fields (entry) is a JSON object. Each key is a field ID and each value has locale codes as keys:
{"title": {"en-US": "Hello"}}. - Asset, Create uses an Upload ID (from Upload, Create) or a File URL. Then use Asset, Process to make Contentful process the file. Publish the asset after that.
- Upload, Create reads the Binary Property of the input and sends the bytes to
upload.contentful.com(in the space and the environment). An upload ends after 24 hours. - Content Type, Create and Update use a JSON list in Fields. A content type must be activated before entries can use it.
- Sync follows all pages. Initial Sync gives all content. Next Sync needs the
syncTokenof an earlier sync. The output hasitems,syncToken, andhasMore. IfhasMoreis true, the sync has more than 5000 items, and thesyncTokencontinues it with Next Sync. - A rate limit (HTTP 429) gives the time to wait from the header
X-Contentful-RateLimit-Reset. The node does not try again by itself. - When Contentful gives an error, the node fails with the message, the details, the error code, the request ID, and a short help text.
- This node does not do: GraphQL, releases, scheduled actions, tasks, comments, workflows, app definitions, roles, users, API keys, and webhook call logs.
Logins it can use
Contentful Delivery API (contentful.deliveryApi): spaceId, deliveryToken (Content Delivery API access token), the optional previewToken (Content Preview API access token), and the data region (US or EU). Both tokens are secret. Find them in Settings > API keys. The Test button reads the space with the delivery token.
Contentful Management API (contentful.managementApi): accessToken (a personal access token from Settings > CMA tokens), the optional default spaceId, the data region, and the optional webhookSigningSecret for the trigger. The token and the secret are secret. The Test button reads the space, or the list of spaces if the credential has no space ID.
Hosts: US cdn.contentful.com, preview.contentful.com, api.contentful.com, upload.contentful.com. EU cdn.eu.contentful.com, preview.eu.contentful.com, api.eu.contentful.com, upload.eu.contentful.com.
Guides and related hubs
Add Contentful from System > Nodes without restarting.
All CMS nodesAutomate content publishing and updates across Ghost, WordPress, Contentful, Strapi, and headless CMS platforms.
Use credentialsAES-256-GCM encrypted API keys and OAuth2 connections.
Compare alternativesCompare zerodot with n8n, Zapier, Windmill, and Activepieces.