Actions5
- Agent Memory Actions
- Workflow Execution Actions
Overview
This node, named "Supabase Memory," provides functionality to store, retrieve, and update memory related to AI tool agents and workflow executions using a Supabase backend. Specifically for the Workflow Execution resource with the Store operation, it allows saving detailed information about a workflow execution session into a Supabase database.
Typical use cases include:
- Persisting the state and metadata of an AI-driven workflow execution for later analysis or continuation.
- Storing outputs from planning agents, execution traces, and final results of workflows.
- Tracking the status of workflow executions (e.g., in progress, completed, failed).
- Associating workflow executions with user sessions and optional user IDs.
Practical example:
- An AI orchestration system runs a complex workflow planned by an AI agent. This node stores the entire execution context, including the original user query, planner output, execution trace, and final output, along with status updates. This enables auditability, debugging, and resuming workflows if needed.
Properties
| Name | Meaning |
|---|---|
| Session ID | Identifier for the session to store/retrieve memory. Leave empty to generate a new UUID when storing. Required for retrieval. |
| Planned Workflow ID | Numeric ID of the planned workflow associated with this execution. Use 0 if none. |
| Original User Query | The initial query string provided by the user that triggered the workflow execution. |
| Planner Output | JSON object containing the output from the planner agent responsible for planning the workflow. |
| Execution Trace | JSON object representing the detailed trace/log of the workflow execution steps. |
| Status | Current status of the workflow execution. Common values: "in_progress", "completed", "failed". |
| Final Output | JSON object containing the final output/result of the workflow execution. |
| Error Message | String describing any error encountered during the workflow execution, if applicable. |
| User ID | Optional string identifying the user associated with this workflow execution. |
Output
The node outputs a JSON object per input item with the following structure:
sessionId: The session identifier used or generated for this workflow execution.- Other fields correspond to the stored data returned from the Supabase client, which typically includes confirmation or details of the stored workflow execution record.
Example output JSON structure:
{
"sessionId": "generated-or-provided-session-id",
"plannedWorkflowId": 123,
"originalUserQuery": "How do I automate my tasks?",
"plannerOutput": { /* planner agent output JSON */ },
"executionTrace": { /* execution trace JSON */ },
"status": "in_progress",
"finalOutput": { /* final output JSON */ },
"errorMessage": "",
"userId": "user-456"
}
No binary data is output by this node.
Dependencies
- Requires a Supabase backend configured with appropriate tables to store agent memory and workflow execution data.
- Needs credentials providing:
- Supabase URL
- Supabase API key
- These credentials must be set up in n8n as an API key credential for Supabase access.
Troubleshooting
- Missing Session ID on Retrieve: When performing a retrieve operation, the node requires a non-empty Session ID. Omitting this will cause an error.
- Invalid JSON Inputs: Properties like Planner Output, Execution Trace, and Final Output expect valid JSON strings. Malformed JSON will cause parsing errors.
- Supabase Connection Issues: Ensure the Supabase URL and API key are correct and have sufficient permissions to read/write the relevant tables.
- Status Updates: When updating status, ensure the workflow execution ID exists; otherwise, the update will fail.
- Error Messages: If the workflow execution failed, provide a meaningful error message to aid debugging.