Craft CMS

Integrate your Workflow with Craft CMS

The Craft CMS Integration step allows you to connect your AirOps workflows with your Craft CMS instance. This native integration provides comprehensive entry and asset management capabilities directly from your workflows.

Overview

Craft CMS is a flexible, user-friendly content management system built for creating custom digital experiences. By connecting Craft CMS to AirOps, you can automate content creation, publishing, and asset management across your Craft projects.

Authentication

Before using the Craft CMS integration in your workflows, you must first connect your Craft CMS account in the AirOps Settings:

  1. Navigate to Settings > Integrations

  2. Find the Craft CMS section and click "Configure"

  3. Enter your GraphQL Token — a token with write permissions generated in your Craft CMS control panel under GraphQL > Tokens

  4. Enter your Site URL — the base URL of your Craft CMS instance (e.g. https://example.com)

  5. Optionally enter a Default Author ID — the numeric ID of the Craft CMS user to assign as the author of entries by default. Individual actions can override this value

circle-info

Your GraphQL token must have permissions to read and write entries and assets in the sections you intend to use.

Available Actions

Entry Management

  • Create Entry -- add a new entry to a Craft CMS section

  • Update Entry -- modify an existing entry's fields, status, or metadata

  • Get Entry -- retrieve a single entry by ID or slug

  • List Entries -- fetch multiple entries from a section with optional filters

  • Delete Entry -- permanently remove an entry

Asset Management

  • Get Asset -- retrieve a single asset by ID

  • List Assets -- fetch assets from a volume with optional filters

  • Attach Asset to Entry -- associate existing assets with an entry's asset field

  • Delete Asset -- permanently remove an asset from a volume

Action Parameters

Create Entry

  1. Section (required) -- the section handle the entry belongs to (e.g. blog, news)

  2. Entry Type -- the entry type handle (e.g. default, article). Defaults to default

  3. Title -- the entry title

  4. Slug -- the URL slug for the entry

  5. Status -- entry status: live or disabled

  6. Post Date -- the date the entry should be published (ISO 8601 format)

  7. Expiry Date -- the date the entry should expire (ISO 8601 format)

  8. Custom Fields -- a JSON object of custom field values, keyed by field handle

  9. Author ID -- the numeric ID of the entry author. Overrides the Default Author ID set in credentials

Update Entry

  1. Entry ID (required) -- the numeric ID of the entry to update

  2. Section -- the section handle the entry belongs to

  3. Entry Type -- the entry type handle

  4. Title -- the entry title

  5. Slug -- the URL slug for the entry

  6. Status -- entry status: live or disabled

  7. Post Date -- the date the entry should be published

  8. Expiry Date -- the date the entry should expire

  9. Custom Fields -- a JSON object of custom field values, keyed by field handle

  10. Author ID -- the numeric ID of the entry author. Overrides the Default Author ID set in credentials

Get Entry

  1. Lookup By (required) -- how to identify the entry: id or slug

  2. Lookup Value (required) -- the ID or slug value to search for

  3. Entry Type -- the entry type handle, used to build custom field fragments

  4. Fields -- comma-separated list of custom field handles to include in the response (e.g. heroImage,body)

List Entries

  1. Section -- the section handle to filter by

  2. Entry Type -- the entry type handle, used to build custom field fragments

  3. Fields -- comma-separated list of custom field handles to include in the response

  4. Search -- a search query string to filter entries

  5. Limit -- the maximum number of entries to return

  6. Offset -- the number of entries to skip (for pagination)

Delete Entry

  1. Entry ID (required) -- the numeric ID of the entry to delete

Get Asset

  1. Asset ID (required) -- the numeric ID of the asset to retrieve

List Assets

  1. Volume -- the volume handle to filter assets by (e.g. images, documents)

  2. Search -- a search query string to filter assets

  3. Limit -- the maximum number of assets to return

Attach Asset to Entry

  1. Entry ID (required) -- the numeric ID of the entry to attach assets to

  2. Section (required) -- the section handle the entry belongs to

  3. Entry Type -- the entry type handle

  4. Field Handle (required) -- the handle of the Assets field on the entry (e.g. heroImage, images)

  5. Asset IDs (required) -- comma-separated list of asset IDs to attach (e.g. 123,456). Replaces any existing assets in the field

  6. Author ID -- the numeric ID of the entry author. Overrides the Default Author ID set in credentials

Delete Asset

  1. Asset ID (required) -- the numeric ID of the asset to delete

Common Use Cases

  • Automatically creating and publishing blog entries from AI-generated content

  • Updating entry statuses in bulk based on workflow conditions

  • Attaching generated or uploaded images to entries as hero assets

  • Fetching entries by slug to enrich or rewrite existing content

  • Building content pipelines that create entries in draft and publish after review

  • Cleaning up expired or obsolete entries and assets programmatically

circle-info

Note: Craft CMS integration requires a GraphQL token with appropriate permissions. Ensure your token grants access to the sections and volumes you intend to use.

Last updated

Was this helpful?