Twitter node : does not post with element from earlier in workflow

I have Twitter node set up and working with OAuth etc.
It works if I enter static text into the [TEXT] parameter.
But if I add an expression with data from an earlier node (RSS Feed in my case), it consistently fails with invalid credentials. But they are not invalid. It works with static text.
The expression dialogue correctly evaluates the earlier node e.g. {{$json["contentSnippet"]}}
And the detailed error shows correctly formatted status parameter.
I’ve also tried {{$json["contentSnippet"].slice(0,140)}}
Any ideas on what might be going wrong ?

"message": "Request failed with status code 401",
"name": "Error",
"stack": "Error: Request failed with status code 401 at createError (/usr/local/lib/node_modules/n8n/node_modules/axios/lib/core/createError.js:16:15) at settle (/usr/local/lib/node_modules/n8n/node_modules/axios/lib/core/settle.js:17:12) at IncomingMessage.handleStreamEnd (/usr/local/lib/node_modules/n8n/node_modules/axios/lib/adapters/http.js:269:11) at IncomingMessage.emit (events.js:327:22) at endReadableNT (internal/streams/readable.js:1327:12) at processTicksAndRejections (internal/process/task_queues.js:80:21)",

But this only appears when the tweet text parameter is an expression with value from another node.
Static text entered manually gets posted.
Something screwy.
Can the inpur expressions be “typed” as in “cast” in some way to be treated as manual text ??

It seems to be a bug introduced in the latest version of n8n 0.139.1. Please downgrade to 0.138 or set the env variable N8N_USE_DEPRECATED_REQUEST_LIB=true

Thank you @RicardoE105
Noted and will do.

We upgraded n8n on Sunday and had to go back with no idea what so ever of what was the problem. After many hours of investigation (though it was a security problem because with postman works), we saw in apache something called “axios”. A google search of n8n and axios took me here.

Just wanted to say that :slight_smile:
Thank you for making n8n!!

Welcome to the community @mast_ats

Good to hear that you are enjoying n8n. Have fun.


I belive this issue is probably related to the way n8n is serializing special characters. I had the same issue when the tweet text contained the : character.

A fix is on the way on this PR: Fixed url params serializing for OAuth1 requests by krynble · Pull Request #2381 · n8n-io/n8n · GitHub

Should be released in the next update and you can disable the deprecated flag then.


Got released with [email protected]