I have a flow in n8n that pulls from GitLab using an API token, set up as a Predefined Credential. The token is renewed weekly, so I need to update it in n8n’s credentials.
The issue is that there’s no option to simply update the credentials using an API call; I can only create or delete them.
I tried deleting the credential and re-creating it with the exact same name. However, my scheduled flow then gives this error:
Credential with ID "L7Vr2RxKSfIEYL1o" does not exist for type "gitlabApi".
Does anyone know of a workaround or a better way to handle this issue?
credentials rely on ids, not names. if you recreate the credential, you need to also update all workflow which are using it to point to the new id of the freshly created credential.
Even though this will work, it is a hassle to loop over all the workflows to see which all workflows use old credentials and update the new “id” in that workflow.
Updating the credentials should be made available. Don’t understand why “update credentials” is not possible with API but possible with webUI.