Trigger Macstac

Trigger a macstac with parameters

Trigger Macstac

AI-generated

Overview

This node triggers a "macstac" event based on a selected template and assembler, passing custom parameters and a trigger UUID. It is useful for workflows that need to initiate or update external processes or data flows defined by templates in a backend system, especially when those processes require dynamic input parameters.

Typical use cases include:

  • Triggering automated workflows or notifications based on predefined templates.
  • Passing custom parameters dynamically to influence the triggered process.
  • Listening for updates on the triggered event and capturing resulting data changes.

For example, you might select a marketing campaign template, specify an assembler (a processing unit), provide parameters like user segments or message content, and then trigger the campaign with a unique identifier. The node waits for confirmation of the trigger update before continuing.

Properties

Name Meaning
Choose Template Name or ID Select a template from a list loaded dynamically or specify its ID via expression. Templates define the type of trigger.
Choose Assembler Name or ID Select an assembler from a dynamically loaded list or specify its ID via expression. Assemblers represent processing units.
Trigger UUID A string representing the unique identifier for this trigger instance.
Parameters A collection of key-value pairs where each key is a parameter name or ID (loaded dynamically) and the value is a string.

Output

The node outputs an array of JSON objects, each containing a data field. This data field holds the updated information received from the backend after the trigger event is processed. Specifically, it listens for updates on a database table related to the trigger and returns the new data payload once available.

No binary data output is produced by this node.

Example output structure:

[
  {
    "json": {
      "data": {
        // Updated trigger-related data from backend
      }
    }
  }
]

Dependencies

  • Requires connection to a Supabase backend service using credentials that provide:
    • A URL endpoint.
    • A public anonymous API key.
  • Uses Supabase client library to query tables: template, template--parameters, parameter, assembler, and listen to real-time changes on stack_trigger.
  • Requires an API key credential configured in n8n for authentication with the Supabase backend.

Troubleshooting

  • Common issues:

    • Failure to load templates, assemblers, or parameters due to incorrect or missing API credentials.
    • No updates received if the trigger event does not cause a change in the monitored table.
    • Parameter names or IDs not matching those expected by the backend, causing the trigger to fail silently or produce errors.
  • Error messages:

    • Errors logged from Supabase queries (e.g., permission denied, network errors) will appear in the console logs.
    • If no data is returned after triggering, verify that the template ID, assembler ID, and trigger UUID are correct and that the backend is properly configured to handle the trigger.
  • Resolutions:

    • Ensure API credentials are valid and have appropriate permissions.
    • Confirm that the template and assembler exist and are accessible.
    • Verify parameter names and values match backend expectations.
    • Check network connectivity to the Supabase service.

Links and References

Discussion