Workflow Configuration

Jbrorby
Jbrorby Contributor

We just got workflows enabled in our instance and I'm trying to test it out. I've found a lot of videos about workflows and what they are, but not much on how to configure them.

What I was going to test out was a use case example I heard in one of the videos: look for users who haven't logged into Domo in X amount of days and send them emails that their accounts will be deleted. I have not gotten very far, though.

First, I created a dataset view using a couple of the domostats datasets to get user ids, their last login time, and their emails. My first struggle is getting the workflow to query this dataset and return the users who haven't logged in for 6 months. In the workflow, I selected a "code function" step, selected the function "queryWithSQL" from the domo datset function, selected my dataset input, but then the custom SQL is where I'm struggling.

I've tried different variations of:

"select email from vw_user_last_login (my dataset) where email is not null and last_login_time ⇐ DATE_ADD(CURRENT_TIMESTAMP, INTERVAL -183 days) "

I always get the red line/incorrect syntax line under the name of my dataset and column names, so I'm sure I'm doing something wrong. I've tried aliasing, using tics, and using the dataset id instead of the name.

Tagged:

Answers

  • DanHendriksen
    DanHendriksen Domo Employee

    jbroby, sorry you’re having issues. I’d encourage you to check out the “Getting Started with Workflows” training at learndomo.domo.com. We go through a very similar use case.

    To help validate your query, I’d try ditching the where clause. I’m guessing it’s something to do with your arrow function (if that’s really part of your query). If that works, build from there.

    I’ve done lots of where clauses with dates but always done a date_sub

  • Jbrorby
    Jbrorby Contributor

    That was a really good training session

  • Jbrorby
    Jbrorby Contributor

    I'm thinking I probably have a later or modified version of the workflows in this training session. In "Building Workflows Par 7," when we get to the point of adding a queue, I can't seem to find that icon on the left or anywhere else.

  • Jbrorby
    Jbrorby Contributor

    Nevermind, I just had to back out of the workflow to the main menu

  • DanHendriksen
    DanHendriksen Domo Employee

    Sorry about the confusion, @Jbrorby . Yes, we rolled out one of two UI/UX adjustments and only 1 has gone into effect. I hurried and put the training out knowing the changes were coming, with the idea being I could get feedback to incorporate into the recut which will happen soon once the second change drops.

    In this in between time, some things don't line up perfectly (like that) and I apologize. I'm glad you enjoyed the training.