Return image to manychat and center text in edit image

Hey guys, I’m developing a flow in manychat and I would like to create the dynamic image in N8N. Currently I use niftyimages.com example: https://img1.niftyimages.com/ytrh/527r/c3gi?image=https://manychat.com/ava/1152717/47886858/26bbdc1dd44988d852e3e93878f11a16&name=leti_piazzetta

But I did the same flow in N8N and manychat says it is an incorrect format, what do I need to specify to return an image in the correct format?

Example: https://n8n2webhookautomagicbots.automagicbots.com.br/webhook/ingresso?name=leti_piazzetta&image=https://manychat.com/ava/1152717/47886858/26bbdc1dd44988d852e3e93878f11a16

This is the error that appears in manychat

And this is my flow in N8N

Another question is, is there any way to horizontally center the text with the Edit Image node?

It looks like your topic is missing some important information. Could you provide the following if applicable.

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

I tried to add content-type: image/png but it didn’t work

Update, I opened a ticket with ManyChat support and they said the problem is that the image is not being returned as an image and the Meta API is not recognizing it, can anyone think of any other way to make it work?

Hey @htnrodrigues , if you know the size of the image (which seems to be the case as you set it manually) then you could aproximate centering the text. The Edit Image node is configired with Font Size and X / Y Positions.

Centring vertically is more or less straightforward (as you probably guessed already). Centring horizontally is tricky unless you use monotype font (Andale_Mono, for example) where the width of any letter is the same. Knowing how many pixels the letter takes up and how many letters in the text you can calculate the relative Position X.

Hey @ihortom,

I tried to compress the image, convert it to jpg but I still get the same error, I managed to get it to 50kb and it still didn’t send.

The horizontal calculation question, chatgpt helped me calculate the expression, thanks for the tip, I just haven’t been able to solve this manychat question yet, but I’ll keep trying