Workflows and self hosted have different behaviour when run by trigger and run manually

I have a slack message poster that will send some data. But when the workflow runs by itself it post the first message from retool app. When I then log in to the workflow, and push the play button on the box with all earlier boxes, it posts the second messages. So no changes but posts different messages

Here is the logic which seemingly works when i manually trigger it.

Notes
Yes I have deployed latest, multiple times.
I have considered using slack attributes, but as it works when I develop and test, I see no reason to not have it work in prod

Hey @snorreentur, have you tried using a global error handler to check this behaviour or any logging for the regexSearchScores.data? I'm guessing this is changing the kind of data format regexSearchScores.data puts out if that is by trigger, i.e. becoming an object rather than an array of object.

Just a side note question: Slack already indicated that incoming webhooks (the native slack resource in retool uses) is not being updated and potentially be removed. Why aren't you using Slack App and create an API resource for this? I reckon there's not much retool can do if it is a resource related issue.

I've already transferred all my slack resource to Slack Apps (Retool API resource) so my input here might be limited.

Thanks for your attempt at replying! I will try to build more info in this message.

First, you are saying that the native resource tool is becoming obsolete, that sucks. I have created a slack app and connected to the slack resource through an open API spec, so it feels like I am on the right path?

I have not tried any global error handling no, or logging, will do that. How do you do a global error handling in a workflow? It just feels strange that the trigger should differentiate what the object should be.

But what really confuses me is that I cannot replicate it when doing manual invocation, its only when the workflow starts by itself, that is why im confused :smiley:

Hey @snorreentur, you can click the enable global error handler on any block that you have, see screenshot below:

Yep, I feel your frustration but one thing to identify the cause of it is identifying what exactly is being passed on when it is triggered automatically. One thing to do there would be adding a code transformer to make sure you are passing the right format of data. If you can identify what is inside the [Object object], we probably have a better understanding on how to deal with it.

Thanks for the assistance in thinking about this, always good to pingpong :smiley: I did not want to dig too much into this, so I tested a variant where i just formated the the text that is suppose to be showed, which slack did before, in a jsblock right before. Meaning it just passed along strings and not objects it had to try to do something about. That did solve the case. Seems like the slack resources is not too happy about doing to complex object parsing inside its own message.

But I will keep using an global error handling, great to have learned that.

If you post the same I will give you the solution of the questions as it was you who helped med along :smiley:

@snorreentur glad you were able to solve it. and good catch on that, I actually would do any data transformation on a code block before passing it to an API resource. That way you have control and knowledge on what the data is being passed. :slight_smile: