Trying to hook up the Microsoft Teams node as part of an error node
What is the error message (if any)?
After following the guide and filling in all the details, after entering my Microsoft credentials to verify the connection, I get the error Cannot GET /rest/oauth2-credential/callback . This was working a while ago but credentials expired and when attempting to renew them, this is the error I am receiving. It is attempting to open that path on the webhooks url that has been configured with the WEBHOOK_URL env variable
Information on your n8n setup
v0.160.0
DB: Postgres
n8n running in docker, on a kubernetes cluster. We have 1 main container, 1 webhook container, and 2 worker containers
Hi @IbnJubayr, I am sorry to hear you’re having trouble here. I just tried authorizing MS Teams on [email protected] without running into the problem you have described:
Is it meant to go to the main container? Because it certainly isn’t going there - the OAuth Redirect URL is appearing with the webhook url that has been configured in the WEBHOOK_URL environment variable, see below. This field is also read only
I had another look at the docs and noticed that it says to send anything for /webhook/ to the webhook workers and anything else needs to go to the main instance to handle.
Are you able to configure your load balancer / proxy to route the /rest/ requests to the main instance?
Thanks - I will check if we have a load balancer configured, but I suspect we don’t as we have two different domains for the main process and the webhooks e.g. workflows.mydomain.io and webhooks.mydomain.io and the docs suggest a load balancer for when the domains are the same
What @Jon mentioned is correct - the OAuth process should be redirected to the main n8n instance.
The webhook processes are responsible for HTTP calls related to workflow execution only. The authentication part is handled by the main process.
The scenario that you’re using, with 2 different subdomains for main / webhook processes is currently not supported by us. Our recommendation is to actually use the same domain but switch traffict:
/webhook/ → should be redirected to the webhook processes * → should be redirected to the main n8n process
Hey @IbnJubayr there are plans to it; a recent release created the new N8N_EDITOR_BASE_URL environment variable but it still not functional. This should be supported in the near future.
Yes, it should work fine, the problem is that for this to work you have your n8n’s main instance running under workflows.yourdomain.io so if n8n needs to register a webhook on another service (let’s say Slack), it will register the workflows.yourdomain.io/webhook url instead of webhooks.yourdomain.io/webhook causing split traffic and unintended behavior by sending some webhook calls directly to the workflows instance.