Merge Node for Binary Data

Hi,

What I am trying to achieve: I have this workflow where a loop runs over a number of scenes. For each scene, an image is created, sent out to my telegram for approval (if declined, it recreates the image). Once approved, the workflow proceeds to save the file.

Problems:

  1. In case of image declines and subsequent rounds of image creation, all are sent to the merge node resulting in only the 1st image (declined one) saved instead of subsequently generated one (approved one).
  2. On the subsquent loop cycle, the merge doesn’t refresh and simply add more images to the queue.

Information on your n8n setup

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

Hey @Asim_Siddiqui, this happens because you’re sending the file to the Merge node before your approval logic, and it waits for a second input to arrive. You don’t need the Merge node there. If approved, just take the file from the Convert to File node to the Store Image node —if not, it won’t go down this path anyway.

Hi Ruslan, Can you explain it a bit more please? Thanks.

Hey@Asim_Siddiqui, there is a issue in your workflow. You should just remove the Merge1 node , there is no need to add a merge node as you’ve got the approved photos by Swich1 node.

Hi Alex,

If I remove the Merge node, then I get the following error on the GCS node.

can you sent you photos by Approver ?

Hi Alex, I dont think telegram has that option to send back a picture…

could you sent me this part of subworkflow to me, I’ll figure out the solution

I actually changed the response_type of the openai API to url and replaced the Move Binary node with HTTP Get node… that solved my problem. Thanks.

2 Likes

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