Customizing Agent behavior + trigger on email not working

I started playing with Agent builder and the Email Template in particular.

I’ve setup the gmail connection and noticed that whenever it uses the gmail_send_email tool it always asks for user input (human in the loop).

Through prompting I told the agent that sending mails via the gmail_send_email tool to a particular recipient can always be done immediately without drafts / human in the loop, but still it always asks for permission.

There is an interrupt_config (as indicated in the UI)

  "interrupt_config": {
    "https://tools.langchain.com::gmail_send_email::Agent Builder": true,
    "https://tools.langchain.com::google_calendar_create_event::Agent Builder": true
  }

But can this be made contextual ? (no review required is recipient is X)

Another thing I noticed is that the email trigger doesn’t seem to work. With this flow I expected the agent to be triggered when an email arrived but this doesn’t seem to be the case.

When I use the cron trigger the agent does get triggered. Not sure why it doesn’t get triggered when the email arrives. Gmail connection is setup correctly. Is there any way to debug these types of issues ?

Hi ddewaele,

It sounds like the issue is happening because the gmail_send_email tool is still waiting for explicit user confirmation, even with the interrupt_config set. One workaround I’ve found helpful in similar cases is using advanced automation tools to handle triggers and context-specific actions. These types of tools can help you simulate conditions where certain actions (like sending to a specific recipient) bypass the human-in-the-loop requirement.

For debugging email-trigger issues, you might also want to log the incoming emails and inspect the trigger conditions step by step to ensure the agent is receiving the correct event payload.