Directus is an open-source headless CMS with a rich API that lets you manage content dynamically and distribute it across various channels. Harness Directus API on Pipedream to automate content operations, streamline workflows, and integrate with countless other apps. With real-time capabilities, you can trigger actions on content changes, automate publishing, sync with external databases, and more. Pipedream's serverless platform provides a powerful, flexible way to build custom automations using Directus, without writing complex infrastructural code.
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
directus: {
type: "app",
app: "directus",
}
},
async run({steps, $}) {
return await axios($, {
url: `${this.directus.$auth.api_host}/users/me`,
headers: {
Authorization: `Bearer ${this.directus.$auth.access_token}`,
},
})
},
})
Content Sync Across Platforms: Automate content synchronization between Directus and other Content Management Systems like WordPress. When a new item is added or updated in Directus, use Pipedream to push those changes to your WordPress site in real-time, keeping all your content platforms up to date.
Automated Backup Workflow: Set up a workflow that periodically backs up your Directus database to cloud storage services like Google Drive or Dropbox. This ensures you have regular snapshots of your content, safeguarding against data loss and giving you peace of mind.
Dynamic Email Campaigns: Leverage Directus' content updates to trigger personalized email campaigns with an email platform like SendGrid. When a piece of content is published in Directus, Pipedream can kick off an email blast to subscribers with the new content, keeping your audience engaged and informed.
Directus uses API keys for authentication. When you connect your Directus account, Pipedream securely stores the keys so you can easily authenticate to Directus APIs in both code and no-code steps.
For api_host
, use your API host url such as https://mywebsite.com
For access_token
, each user can have one static token that will never expire. This is useful for server-to-server communication. This token is saved to the database (directus_users.token
) in plain-text and can be retrieved through the /auth/login
endpoint. See docs.