How to use «Match Term» Option in Trigger-Node?

Hi,
I would like to filter Google Calendar Trigger by some Value-Stuff.
My goal with: I do some JS-Code in Expression-field, so the GC-Trigger (of any minutes) only fires when some rules matches.

Example

Like:

if (item.json.summary.indexOf("XYZ")) !== -1) 
{
    return true;
}

Problem

The help-popup:
«Free text search terms to filter events that match these terms in any field, except for extended properties» does not help a lot to find the right solution without a lot of try and error.
Unfortunately I can’t find Docu or some topics in Forum nore with Google to grasp the impact possibilities and implementation solutions of «Match Term» Option.

Questions

  • Do I have only the possiblity to write a “hardcoded” textline? What are the options for e.G. dynamic stuff, spaces, an area of numbers or length or regex/matching?

  • Do you know some Documentation/Tutorial/Link for the Option «Match Term»?

  • What has the expression to get back? (boolean or also a json-object, or …?)

  • to prevent execution triggers through this option, or is this for something else entirely?

Would be great to get some help or hint in the right direction

Hi @mad99, the value of the Match Term input field would simply be passed on to the Google Calendar API in the q field.

The description is coming directly from Google’s API documentation. It does not list any additional options to further refine the search. When entering a value, Google’s API would simply check if any of the fields contain the value and only return events that do.

So if you need to perform any additional checks (like verifying whether an event description matches a regular expression), you would need to perform the filtering in subsequent steps for example through the IF node.

1 Like

Hey @MutedJam,
Thank you for your effort, also to link the Google Calendar node and GoogleEvents Calendar API sourcecode.

Even though there don’t seem to be any desired options now, your feedback helps me to be able to see a little deeper into the operations and structure of n8n.

Yes, I already worked with the function-node a lot for tease out the individual details and string sections from the GC-Trigger and hand over well-formated to the mautic-node.
But the IF-node seams to be also a nice solution.

Thanks for this hint in another nice approach direction (IF-node) and all your work/help.

1 Like

Glad to hear this helps, thanks so much for confirming! If you run into any trouble with using the IF node, please do let me know :slight_smile: