ChatGPT character limit for tweets

I’m using a flow to automatically have ChatGPT create a tweet, and then actually sending it.
This worked fine for a few weeks, but then it started failing, without any error from X-side. Upon some testing and debugging, it appears that ChatGPT is creating its tweets too long, around 400 characters.
I’m currently using this prompt:
Compose an engaging 235 character tweet that appeals to my audience. Craft it as a 235 character max short story with a clear call to action for audience engagement. Ensure the tweet does not exceed the 235 character maximum allowed by Twitter, and don’t put your output in double or single quotes!
In the “Roles”, I have put it like this:
“content”: “You are a helpful twitter assistant, using the tone of voice of Gary V, and creating output of maximum 235 characters!”

Yet, still it keeps outputting +300 characters (mostly around 400).

Any suggestions on how to tame ChatGPT in it’s unbound enthousiasm?

@Bjorn_Beheydt you could use the tokenizer on OpenAi

If you put your prompt in and see how many tokens it uses. And then add in a tweet at the approximate length that you want it to be.

Take the total number of Tokens. And in your ChatGPT piece, set the max tokens to around that amount. Then it should give you output closer to what you are looking for.

You have to include the prompt in there as well though as it counts towards the token use.

You may need to do a few test runs and tweak it a little.

Hope this helps.

Kind regards,


Forgot to add that the reason it probably changed for you recently is likely because the new update for the ChatGPT piece enforces a token limit now, and sets one by default.


Hello @Bjorn_Beheydt and thank you @GunnerJnr for your suggestion, let us know if you need further help @Bjorn_Beheydt

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