Lesson 8 - Automate With Flows - Onboarding

Поділитися
Вставка
  • Опубліковано 9 вер 2024
  • Automation is the secret sauce to a smooth, efficient project. In this lesson, we'll explore how to automate tasks and processes within Directus using Flows. Say goodbye to manual work and hello to increased productivity! 🤖💼
    BONUS: Want more automation inspiration? Watch this #I-Made-This episode ( • Building a Platform to... ) where Bryant, Pedro, and John discuss the actual flows powering Bryant’s training and community platform.
    TODO:
    1. Identify tasks and processes in your project that can be automated.
    2. Set up Flows in Directus to automate these tasks.
    3. Test your Flows to ensure they're working as expected.
    4. Share your automation ideas in the group discussion for this lesson. Let's help each other save time and improve our workflow! 🧪🔧
    PS: You can grab the script used in this lesson here (gist.github.co....

КОМЕНТАРІ • 18

  • @gonzaloescudero64
    @gonzaloescudero64 5 місяців тому +1

    I want to access an environment variable on an operation but "{{ $env. }}" gives me null data. I already included the variable on the docker-compose.yml file and also included it on FLOWS_ENV_ALLOW_LIST. Is there something I'm doing wrong?

  • @fahadus
    @fahadus 9 місяців тому +1

    Testing out flows on a live database is a terrible way to debug code. This is a brilliant feature, but as it stands with it's non-existant documentation and live wire workflow, this is pretty much still in alpha phase.

  • @burner918
    @burner918 9 місяців тому

    How do your chain a variable from a previous operation that isn't an internal directus key like trigger? So if I had a Read Operation with the name "Get User Name" (key = get_user_name), does this mean that in subsequent operations, to chain to this value, I would use {{get_user_name.id}}, {{get_user_name.firstname}}, {{get_user_name.lastname}}? Or do I need to insert 'payload' between 'get_user_name' and 'id'?

    • @DirectusVideos
      @DirectusVideos  9 місяців тому +1

      You got it - you can refer to any data in the chain by the key it was returned from.

    • @burner918
      @burner918 9 місяців тому

      @@DirectusVideos awesome. Thank you.

  • @Divin3so
    @Divin3so 4 місяці тому

    Link to script is broken ;(

  • @vaijeet
    @vaijeet 5 місяців тому

    In run script i am using new Date(dateString) function but it is not working. Are these not supported?

    • @DirectusVideos
      @DirectusVideos  5 місяців тому

      Date is a standard built in JS object which means it should work in the Run Script operation

    • @vaijeet
      @vaijeet 5 місяців тому

      @@DirectusVideos that was my expectations too but it is not working. Basically I tried simple thing like new Date('2023-05-15'). But it is returning an empty object.

  • @malipetek
    @malipetek Рік тому

    Are we going to have module syntax in "run script" action in the future?

    • @DirectusVideos
      @DirectusVideos  Рік тому

      Can you provide an example of what you mean? Are you talking about ES6 vs CommonJS?

    • @malipetek
      @malipetek Рік тому

      @@DirectusVideos Yes I mean using ES6, export default ... instead of module.exports = ...

  • @harrishpaul7374
    @harrishpaul7374 Рік тому

    how to trigger a another flow

    • @DirectusVideos
      @DirectusVideos  Рік тому +1

      There's an operation which does just this :)

  • @harrishpaul7374
    @harrishpaul7374 Рік тому

    {
    "name": "Error",
    "message": "spawn /usr/sbin/sendmail ENOENT"
    }
    error in email payload

    • @DirectusVideos
      @DirectusVideos  Рік тому +1

      Sorry you've hit an error! Unfortunately, UA-cam is not a great platform for providing support or troubleshooting.
      I'd recommend joining our Discord community (directus.chat) - where you can provide some additional context context and other super friendly community members could be able to help you sort this out.

    • @harrishpaul7374
      @harrishpaul7374 Рік тому

      How to join

    • @harrishpaul7374
      @harrishpaul7374 Рік тому

      joined discord