Bug: Mattermost node - Unable to post message

Describe the problem/error/question

Can’t send a message via the Mattermost node.

Although, can send a message, with the Mattermost Credentials and to the same channel, via the HTTP node.

What is the error message (if any)?

Error Stack:

NodeApiError: The resource you are requesting could not be found
    at Object.httpRequestWithAuthentication (/usr/local/lib/node_modules/n8n/node_modules/n8n-core/src/NodeExecuteFunctions.ts:1417:9)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at Object.post (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/nodes/Mattermost/v1/actions/message/post/execute.ts:85:23)
    at Object.router (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/nodes/Mattermost/v1/actions/router.ts:34:20)
    at Workflow.runNode (/usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/src/Workflow.ts:1270:19)
    at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/src/WorkflowExecute.ts:949:29

Please share your workflow

Share the output returned by the last node

Information on your n8n setup

  • n8n version: 0.219.1
  • Database (default: SQLite): Postgres
  • n8n EXECUTIONS_PROCESS setting (default: own, main): main
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Docker
  • Operating system: Ubuntu

Hi there, @shrey-42 !

I just had a look into this for you, and I successfully was able to post a message to Mattermost through the node. Can you double check where you’ve entered your Mattermost credentials, and see if there’s a trailing slash at the end of your URL? I wasn’t able to successfully post through n8n if the trailing slash was there, but once removed, it worked!

For example, your URL should end with mattermost.com and not mattermost.com/.

Let me know if that fixes this up for you!

Hi @EmeraldHerald, no trailing slashes here.

My Base URL is like this: https://my-domain/api/v4

Hi @shrey-42 , can you try using https://my-domain without any paths attached to it and see if it fixes up the issue?

1 Like

Ah, it does work that way.

I think earlier i did try with just the domain, but with a trailing slash as well.

1 Like

Glad to hear you got it working, @shrey-42 ! I’ve also let our developers know that it might be best to give people a heads up to removing that trailing slash in future for the Mattermost node.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

New version [email protected] got released which includes the GitHub PR 6097.

1 Like