Automate Email Notifications & Sending / Receiving Webhooks for Internal Apps with Directus Flows

Поділитися
Вставка
  • Опубліковано 9 вер 2024
  • Directus makes creating polished and scalable internal tools really fast and easy. This video covers how to use Directus Flows to enhance and add new functionality to your internal tools and apps.
    Flows allow you to automate simple tasks or complex processes with event-based triggers, then drag and drop conditions and operations to create automated workflows. You can watch your data flow through your custom logic with detailed tracking logs and triggering other flows along the way.
    Hop into our GitHub repo: github.com/dir...
    Or Get Started on Directus Cloud: directus.cloud/
    WEBSITE: directus.io
    DOCS: docs.directus.io
    GITHUB: github.com/dir...
    TWITTER: / directus
    COMMUNITY: directus.chat
    NPM: www.npmjs.com/...
    DOCKER: hub.docker.com....
    NEWSLETTER: directus.io/#n...
    -- Timestamps --
    00:42 Updating data when specific events occur
    06:11 Sending email notifications to users
    12:36 Catching webhooks from 3rd party systems
    16:02 Sending requests / webhooks to 3rd party systems

КОМЕНТАРІ • 42

  • @gboyraz
    @gboyraz 9 місяців тому +7

    An incredible product. Congratulations to whoever thought up and developed the product! 🎉

  • @socialwebwiki
    @socialwebwiki 8 місяців тому +1

    Tool is great. Tutorial is great. Really one of the best tutorials I have seen.

  • @protoart3307
    @protoart3307 Рік тому +4

    really cool maybe add templates to create common apps

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

      What kind of templates would you like to see?

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

    Great tutorial.. Enjoying how well complicated things are being explained. I wonder if you could make a tutorial on registration via phone number with Twillio integration and OTP sms verification.

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

      Sounds like a fun use case. Thanks for the suggestion.

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

      Sir how to update a db field using webhook from postman api please help me

  • @abdulla1884
    @abdulla1884 Рік тому +2

    great tutorial, thank you, can you show us how to send bulk email to inform users who are able to see the updated record?

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

      We don't have a video on this currently. But we do have a Recipe on our Docs > Cookbook for looping with Flows.
      docs.directus.io/cookbook/flows/flows-for-loop.html

    • @abdulla1884
      @abdulla1884 Рік тому +3

      @@DirectusVideos The cookbook & many parts of the documentation aren't clear enough and are hard to understand from first reading, I suggest having tutorials step by step with screenshots. thank you

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

      @@abdulla1884 Thanks for your feedback.
      We've got you - improving the quality of our documentation and adding more specific "use-case" focused content is a top priority for us moving forward!

  • @tommyy5154
    @tommyy5154 Рік тому +2

    Great video, Bryant.
    Could you explain why you made task and deal status many2one setup instead of drop down? Any pros and cons doing so?

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

      Great question! There's definitely tradeoffs any time you add a new collection to your data model. The con is obviously a little more added complexity.
      In this case - the benefit of adding them as a separate M2O collection was allowing the end user of the app the ability to change and add more statuses for deals / tasks.
      I wouldn't want to give data model access to end users and nor would I want to have to manually go in and update it the dropdown field myself anytime they wanted to add a new deal status.
      Also if they decided to delete a particular status or rename it - the relationships in Directus save me from having to migrate previous values to the new ones like I would have to do in the case of using a single dropdown field.
      Hope that helps explain!
      -- Bryant

  • @ihordev2397
    @ihordev2397 Рік тому +2

    @DirectusVideos is it possible to make conditions in email templates? For example, if variable is available - add some text row

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

      Yes! I actually held off responding to this comment so I could send you this - fresh off the press: docs.directus.io/guides/extensions/email-template -Kev

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

    Hi Bryant! Thanks for the explainor!
    At 05:05 you create an update data operation. But you only wanted to update the recently created item. How does directus know you want to update that exact item? And what if you want to update a different item?
    You can only set the collection but not the current item

  • @YYoudi
    @YYoudi Рік тому +2

    I dont know if what I'm saying makes sense but maybe when you are typing the mustache things, isn't it possible to hate some suggestion in a dropdown menu while tapping or with a small notification like an IDE ? or autocompletion ?

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

      Great idea. Mind to add it our feature requests, if there's not already one for it?
      github.com/directus/directus/discussions/categories/feature-requests

  • @abbasloda1
    @abbasloda1 Рік тому +2

    Great tutorial, is it possible to send an invoice file when sending the mail ?

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

      We don't support file attachments with the Send Email operation but you could certainly send a link to a file in the email.

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

    What if i i want to query all records except {{$trigger.keys}} , what do i write in the IDs field in the flow ?

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

      You could use a filter rule with a “not” operator

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

    Hi, How can I send back error messages with http error code via the webhook trigger? Thanks

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

    Hello, I'm working on a workflow similar to what you did with the email. But instead of an assigned person, the trigger will be a change in the status. So when the status change to the desired one, the WF will read the assigned_person to the item ans send an email. Unfortunately when it reads the data of the person, it stops with a forbidden 403 message. Any idea on why this can happen?

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

      Maybe the following logs can help you:
      -Parameters:
      {
      "key": 95,
      "collection": "mission_order",
      "emitEvents": true,
      "permissions": "$full"
      }
      Useful Data:
      {
      "code": "FORBIDDEN",
      "status": 403,
      "extensions": {}
      }

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

      Great question for our community members in our Directus Discord community.
      directus.chat

  • @Indrajith423
    @Indrajith423 8 місяців тому

    Hello Sir, I need to know how to configure .env file to send Emails.

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

      Check out the documentation here.
      docs.directus.io/self-hosted/config-options.html#email

  • @jawadbinsarfraz832
    @jawadbinsarfraz832 11 місяців тому

    Is it possible to send an email with a confirmation link when new user register themselves? And when user click that link it confirms its registration or something like this.

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

      The invite user flow is basically this - they have to accept the invite (which you can frame as “confirming an email)

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

    17.50 i want to learn webhook to create custom api to perforrm crud operation

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

      i want to update collection using customized (Own) api / url how to perform this

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

      You'll want to build a custom endpoint extension for that. -Kev

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

    What is keys in flow

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

      Each operation has a key, kinda like an ID, that you can use when referring to it in the data flow.

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

    How to create a field Assigned_to in task collection

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

      Just pop over to your data model settings, and in the task collection add the field as a many to one.

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

    Please make an app to request a company car, i´m over 24 hours trying to make it and too many errors and questions without answers on discord

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

      There should be no exception of a timely (or any) response in our community server - it's a group of users who try and help each other as and when it's possible.

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

    Hello sir, in Send Email. I click on the {} icon to insert {{get_user.email}} but after I saved, the {{get_user.email}} is clear

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

      If you're referring to the To field or any of the email address fields, make sure you press Enter after you type the email.