Repository navigation
Bunch of questions related to projects and n8n API #296
Replies: 2 comments 4 replies
|
Answer:
|
|
Hi @Toto8400, @itxashancode thanks for answering. some precisions thought : Q1: ✅ Yes, this is expected behavior. The extension uses the same API key which grants access to all projects the user has permission to see, including personal ones and shared team projects. Q2 & Q3: 🔍 Confirmed feature gap. When workflows are created via the API, the projectId is currently stripped from the payload before pushing which removes projectId, projectName, homeProject, isArchived). This means new workflows are created without explicit project assignment, and n8n defaults them to the creating user's personal space. Fix coming: We'll look into this and open a PR to auto-inject the configured projectId from the extension settings into new workflow files before push. The CLI should respect the configured default project. Q4: ✅ The scopes mentioned by @itxashancode are reasonable. but I would add write to credentials. The minimal required scopes are: Q5: ❌ This is not expected behavior. Since the API key is already configured in the extension settings, Claude Code should not be asking for it. This suggests the Agent might not be properly reading the n8n configuration from the workspace. We'll investigate why it's bypassing the configured credentials and asking for them again. |

Answer:
Q1: Yes, extension lists all projects you have access to, including personal ones, because it uses same API key; expected.
Q2: To make CC create workflows in shared project, you need to set the default project in the extension settings (n8n-as-code.defaultProjectId) or use the CLI flag --project when pushing; otherwise it falls back to user's personal space.
Q3: You can specify folder via the workflow's metadata: set "folderId" in the workflow JSON before pushing, or use the extension command "n8n-as-code: Move Workflow to Folder" after creation; CC can be prompted to include that field.
Q4: Minimal scopes: workflow.read, workflow.write, project.read, project.write (if you…