In n8n when the instagram graph api returns http error code 400, n8n still considers it a success.
This is wrong, it should have went to the error branch.
See screenshot below.
It should not ignore the “Response Code” by default.
Fyi: the error code 400 is because I need to add a wait block of 60 seconds in between posting the image to instagram and then posting the post itself.
Ideally n8n would handle this itself by GET /{creation_id}?fields=status_code request, with verification of output of FINISHED.
Raise this issue on GitHub from here. Temporarily, add an IF statement right after this node with a logic similar to the quote below until the internal team investigates this.
@K_Rens Since the container is already created and uploaded to Meta API this node should succeed after a couple of tries. However you can use a Switch node instead, and continue the workflow depending on the error message; e.g. if the error message is about permissions, stop and error instead of looping.
Check out this community node for Instagram that I made, it kind of makes things easier.