Dynamically Scheduling Another Workflow

Options

This is my first time trying to have one workflow dynamically schedule another and I must be doing something wrong.

What I want to happen: On our main customer workflow, it is triggered by the specialist changing the Stage status. When they change to a specific stage, an email is triggered to the customer via our SendGrid integration and pulls info from that line of our intake sheet to customize the email. After that email is fired, I also want Bridge to schedule a Customer Pulse Check workflow I have built to send an email from our leadership team 10 days later that checks on how the customer is feeling so far.

I seem to have built the scheduling dynamic correctly because I can see the workflow getting scheduled in the triggers, but I must not be passing the correct information into the Pulse Check Workflow because it errors every time.


I have it doing a Get Row with the row_ID state value I created in the first workflow, but maybe this is not the right thing to do?

Here's the error:


Can anyone give me a hint of what I am doing wrong?

Best Answer

  • Genevieve P.
    Genevieve P. Employee Admin
    Answer βœ“
    Options

    Hey @Laura Weiler

    My apologies for leading you down a few rabbit holes! I have to admit this was my first time playing with the "Create Workflow Schedule" module so we're learning together πŸ˜…

    But I've figured it out:

    The "Key" in the module should refer to a State Name in your Second Workflow.

    So if I put "row_ID" as a Key, then I would need to have a State called "row_ID"


    Then in the Run Log the data will appear underneath that State. You can reference that information and the reference is what goes into your Get Row module. That should do it!

    Cheers,

    Genevieve

Answers

  • Genevieve P.
    Genevieve P. Employee Admin
    Options

    Hey @Laura Weiler

    If you're creating a second, separate workflow, you won't be able to use Run Log references from the first workflow. You'll need to Get the Row in your second workflow as well to identify the Row_ID.

    Let us know if you need help with this!

    Cheers,

    Genevieve

  • Laura Weiler
    Laura Weiler ✭✭✭
    Options

    @Genevieve P. Thanks! I tried to update it to do the normal Get Rows that I have done in other workflows but I still am getting errors. What should I be putting here if I want it to run the Pulse Check Workflow for the same row of the sheet that scheduled it?


  • Genevieve P.
    Genevieve P. Employee Admin
    Options

    Hi @Laura Weiler

    My apologies! I completely misunderstood the set-up. You're correct, you should be able to pass the Row ID through the Schedule Workflow Module like you have set up, under the State Values header:

    This should then pass the value in through the Trigger section of the run log of the second workflow:

    Can you expand this arrow to see if the value is there? The title should be "Run_ID" and the value that you've sent through next to it. It's this data reference that you'll want to add under the "Row ID" section of your Get Row module.

    Let me know if the value passed through and if you were able to find it!

    Cheers,

    Genevieve

  • Laura Weiler
    Laura Weiler ✭✭✭
    Options

    @Genevieve P. I still can't get it to work! Here's screenshots of everything I have setup currently and the latest error:

    Scheduling Module in Workflow 1:

    Full text of Value #1: {{states.startstate.smartsheet.get_row.row.id}}

    Get Row Module in Pulse Check Workflow:


    Error message from my test run yesterday:


    Help me please! πŸ˜…

  • Genevieve P.
    Genevieve P. Employee Admin
    Answer βœ“
    Options

    Hey @Laura Weiler

    My apologies for leading you down a few rabbit holes! I have to admit this was my first time playing with the "Create Workflow Schedule" module so we're learning together πŸ˜…

    But I've figured it out:

    The "Key" in the module should refer to a State Name in your Second Workflow.

    So if I put "row_ID" as a Key, then I would need to have a State called "row_ID"


    Then in the Run Log the data will appear underneath that State. You can reference that information and the reference is what goes into your Get Row module. That should do it!

    Cheers,

    Genevieve

  • Laura Weiler
    Laura Weiler ✭✭✭
    Options

    @Genevieve P. THANK YOU!!!! I could cry. I have been trying this for so long and I just got it to work! 😍 Appreciate you so much!!

  • Genevieve P.
    Genevieve P. Employee Admin
    Options

    @Laura Weiler This was all you! Thank you for sticking with it and following-up with me, I'm so glad to hear it works now. πŸ™‚

  • akhalid
    akhalid ✭✭✭
    Options

    @Laura Weiler I also want to thank you for persisting in getting things right. I was trying to dynamically schedule another workflow and was stuck with the same symptoms as your. Since you persisted and got it to work, that gave me the confidence that the solution is here in this article and I just have to see it.

    Going back and forth between the Creating a Dynamic Schedule article and this post, I must say that the devil is in the details. Why Smartsheet has implemented passing parameters so differently from "passing parameters to a child workflow" is beyond my comprehension.

    I will make it bold here so anyone else tripping on this one can find a quick solution.

    From the above linked article (and annotated here by me), "If there is information the other workflow (i.e. the workflow that you want to schedule) needs to reference, such as a sheet ID, row ID, or some other values, this is achieved by adding a state for each value in the workflow to be scheduled"

    So if you are calling a "Child workflow" (lets call it THE_CHILD), you pass a key/value pair. Whatever name you specify in the "key" in the parent workflow is how you reference it under the Trigger in the Child workflow, like this. The "key" was "sheet_id" as specified in the parent workflow.

    When dynamically scheduling the same workflow, the name of the key needs to match a state in the THE_CHILD workflow. Here, I specifically had to add a state called "sheet_id". Then reference this in my Get_Sheet step.


    Hope this clarifies for future users.

    Regards,

    AK