Notebook Trigger

Trying to use the Notebook trigger to start a workflow.
I can see in the Notebook Execution log that it successfully completes, but by workflow does not seemt to trigger.
I have a virtual button in that same workflow starting the Notebook execution.
Is that maybe the problem?

Hi @Lars_Andersson,

Having both the Notebook Trigger and a Virtual Button should not cause a problem when firing the Notebook Trigger. Could you provide the workflow id or name so I can take a look at it?

Thanks!
Julia

/5d4c400f3e0b5c00065d6f6b/develop

Any chance of someone looking at this today?

Hi Lars,

I looked at your workflow and I’m curious if you got the email you were trying to send your self with the results? I also noticed that your workflow was attempting to reply to the download endpoint once the notebook completed. You will not be able to kick off a notebook and then reply with the results with in one endpoint request. The time it takes to execute a notebook will almost certainly timeout your request.

My suggestion would be that when you kick off the notebook, you reply to the endpoint with a success message that the notebook has been started and an email will be sent when you the notebook is completed. Then once the notebook completion has triggered I would just reply to that email, and remove the reply to the endpoint node.

I also noticed that when you are sending an email you are placing the error result on the payload path. I would suggest that if the email fails to send you can capture this as an event. That way you can look back at those failures, but you still know that the workflow is triggering.

Best,
Erin

No, I did not get the email.
I will try your suggestions now.

It appears to only be working when I click the virtual button in the flow.
Not when I visit the /download endpoint.
But maybe it’s a Sendgrid limitations for how often I can send.
Let me check on that.

@Lars_Andersson,

Just as a sanity check, can you create a workflow with just the Notebook Trigger and a Debug Node and see if that fires properly?

Also, when you say “It appears to only be working”, what do you expect? My suspicion is that the email being sent and the workflow triggering might be two different issues. So, if you’re expecting an email to know if “it’s working” it could me the workflow is firing, just no email.

It appears to have been a sendgrid issue.
I just now received all requested reports from this morning.

2 Likes

I think I figured out what was happening.
I switched to using the {{experience.user.email}} in the HTTP node for Sendgrid.
When I had the email address hard coded it worked.
Does the {{experience.user.email}} variable not carry and is available in the “Notebook completed trigger” ?
I solved it by writing that variable to a workflow Storage value and called it back when the notebook was done. Or is there a better way of doing that?

Right now, what you did seems like the best solution. You may want to think about some sort of unique identifier to store along with the user’s email. This way, if two people request a download at once, they don’t over lap.

However, we talked about this internally and there are some things we can do here on the platform side to make this easier. I’m adding this post to those tickets and we will follow up if/when these new features are released.