Need help with Human-in-the-Loop issues


I’m facing two Human-in-the-Loop issues:

:one: A text is generated by an AI agent and sent via Outlook for approval. If rejected, no new version is triggered. How can I fix this?

:two: An AI image is sent via Telegram for approval. If rejected, the next image doesn’t use the same prompt but generates something completely unrelated. How can I ensure the same prompt is reused?

Thanks a lot in advance!

Hey !

For your first problem, the problem is linked to the memory, as it is getting it from the connected chat but when you loop your the item passed to the AI agent is no longer the chat session.

You can test it here, it works well without memory :

If you want to have some kind of memory, you will have to modify the “simple memory” from “Connected chat trigger” to “Define below” and manage the memory yourself.

For your second problem, i don’t think I understand well, you want the next image to be generated without the same prompt but ensure the same prompt is reused, which is kind of contradictory.
Maybe you want the ai to generate a custom prompt totally different than the previous ones ? You would have to store the previous prompts used in a database (or within the workflow) and give the database to the AI prompt in each loop.

Hope this helps ! :slight_smile:

Hey! :blush:

Thanks




for your support!

Problem 1: I removed the memory – things are running smoother now, but the output still isn’t being used as new input by the AI agent. Any tips?

Problem 2: I’m trying to pass the previous prompt into the “Image Prompt” node through a loop (see “New”), but the images stay off-topic.

Is there an easy way (like “Simple Memory”) to store and reuse the original prompt from a database?

Also curious: where should the loop ideally return to? And which settings in the “Image Prompt” node are needed so it picks up and uses the new input correctly? (Tried using schema – no luck).

Appreciate any advice!

Hey !

Problem 1 : I’m sorry I mislead you first time but you can actually use the memory with your agent, you just need to set an ID of your choice (and not the one from chat)

For the second problem, I guess it would work so with simple memory and ask the agent to use a different prompt from ones mentioned in conversation !

Hope this helps ! :slight_smile:

Hey! :blush:
It’s working – yay! But still with a small hiccup: after the first IF loop, the agent sends two emails with different texts, even though it should only run once.

Any idea why? Also: is the custom Simple Memory Key used somewhere else, or is it just created to exist?



  1. I replaced the “message a model” node with a KI agent using Simple Memory. After the IF loop, the user input is optimized and sent as a new prompt for image generation.

But the AI agent doesn’t pick up the second task. Any idea what could be missing?

@lugnicca Just wanted to quickly check in :slightly_smiling_face: Do you have one last tip for me? Would really appreciate it!

Hey, didn’t have much time to respond sorry !

For the multiple mail sent, maybe because your AI agent multiple items to the microsoft outlook node ? Maybe limit to 1 unique email for the run ?

For the simple memory, it is used only by the AI agent to have context of the conversation.

For your second problem, I don’t really know what it could be without the pined datas !

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