Quick overview
This workflow runs manually to fetch inbox tasks from Nirvana (via its MCP API), uses OpenAI to rewrite each task title and clean up the notes into a consistent GTD format, and updates the tasks back in Nirvana with the revised name, note, and a "work" tag.
How it works
- Starts when you click “Execute workflow” in n8n.
- Retrieves up to 10 tasks from the Nirvana inbox using the Nirvana MCP API and includes each task’s notes.
- Processes tasks one by one and sends each task name and note to OpenAI with instructions to generate a structured suggested name and a cleaned note.
- Validates and auto-fixes the AI response to match the required JSON structure (current_name, suggested_name, cleaned_note).
- Maps the structured output into Nirvana’s task update fields (id, name, note).
- Updates each task in Nirvana via the MCP API, setting the new name and note, adding the "work" tag, and recording a progress message.
Setup
- Add an OpenAI API credential and select the model in the OpenAI chat model configuration.
- Generate a Nirvana MCP bearer token (https://mcp.nirvanahq.com/tokens) and set up an HTTP Bearer Auth credential for the Nirvana MCP Get and Update steps.
- Confirm the Nirvana MCP endpoint URL (https://mcp.nirvanahq.com/mcp) and adjust the get_tasks parameters (limit, state, include_notes, etc.) to match what you want to process.
- Optionally edit the structured output schema and the OpenAI instructions if you want different naming rules, note-cleaning behavior, or tags applied during updates.