Limit unnecessary executions by using trigger "filters"?

Describe the problem/error/question

I’m using n8n cloud trial and to start, I’m hoping to automate some standard business practices. Things like, if a record is created in Salesforce, create a task in Asana. Or, if an Asana task is completed, do something else.

However, I’m running into some limitations with the standard nodes for these tools. Specifically, I’m not sure of how (or if it’s possible) to limit the number of executions.

For example, the Salesforce node has a trigger “standard object updated”. We could have hundreds of Opportunities updated a day, but I only want n8n to execute on a small subset of those, based on some values on a field, record type, etc. Currently, this would ‘cost’ hundreds of executions even though only a few are actually doing anything beyond the trigger.

Is there anyway to add parameters or filters to the standard nodes, or alternatively to a webhook or other node that can cut down on executions?

Or, any advice on another way to handle these scenarios to cut down on executions?

Thanks in advance!

Information on your n8n setup

  • 1.86.1
  • n8n cloud
  • windows

One option might be to switch to a polling model where you control how often you call to get updated opportunities using a schedule trigger (e.g. every 30 minutes) and then process multiple items in one execution. Without a salesforce account to experiment, I don’t know what conditions you would have available, but the get many opportunities salesforce node has a Conditions option that I think matches up to these filters.

2 Likes

Thanks for the suggestion @hubschrauber, I appreciate it. We’re looking for a more real time solution but I can see some scenarios where a polling model will work.

After more searching, and speaking specifically about Salesforce, I think the best option to control triggers in the way I need is to forego the Salesforce trigger node and use the webhook node. Then, use Salesforce Outbound Messages or HTTP callout to trigger the webhook based on the constraints. Thanks to these two posts that were really helpful in learning about those options.

Hopefully at some point the n8n team will build in the ability to add constraints/filters to the out of the box trigger nodes (for all apps, not just Salesforce) for more control.

For my organization I’d rather pay for the cloud version but limitations like this make me want to look into self-hosting so I wouldn’t have to worry about executions.

Not sure if it is the case for this specific api. But sometimes setting filters simply isnt possible or easily done when developing such a node.
Every api is different, so having the same features for all (trigger)nodes sadly isnt possible.

Soon we will have community nodes on cloud though, so it could possibly be a nice one to create for that, if the api allows for this to be made.

2 Likes

Certainly when the usage is measured by an execution limit/quota, it would be very helpful to be able to preemptively select which trigger events “count” by preventing some of them from starting an execution.

It would be nice if there were also a generic “Polling HTTP Request” trigger node that could, on some prescribed interval, execute a request and initiate a workflow execution only when a set of conditions (e.g. matched values in the response) were met. As far as I can tell, no-one has submitted a feature request for that yet.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.