This is the current return block of the domo function for Extract Dataflow Logic:
return {
dataFlowID,
dataFlowName,
parentObjects,
enrichedActions,
triggerSettings: metadata?.triggerSettings
};
}
When I pass a dataflow id that doesn't have a trigger I get an error in my workflow
Function output results had the following problems: ["There is not a matching field for result.triggerSettings in the response. Remember that fields are case sensitive. Available fields: [result, result.dataFlowID, result.dataFlowName, result.parentObjects, result.enrichedActions]"]
The error you're seeing is a classic case of the Domo Workflow Engine being a bit of a "strict parent." Because metadata?.triggerSettings evaluates to undefined when a trigger doesn't exist, the key triggerSettings is omitted from the resulting object entirely.
Domo's execution engine expects the output schema to be consistent. If your function definition says it returns triggerSettings, but that key is missing from the JSON, the workflow trips a validation error.
the code engine needs to be updated so that it is providing a default value of null when there is no trigger for a given dataflow