I’m building an agent with a “Send Email” block that’s currently configured to use my personal email account. This setup works fine for private use, but I’d like to make the agent public and I’m unsure how the “Send Email” block behaves in that scenario.
My concern is that I definitely don’t want emails sent to my own account when other users run the agent.
One idea I considered was configuring the block to ask for the email account dynamically, but as far as I can tell, this would require the user to select their email account every single run. Ideally, I’d like a way for each user to set their email account once (almost like a user-level variable) and then have it persist for their subsequent runs.
Is there a way to set up the “Send Email” block so that each user configures their email account once and it’s remembered for future use?
Great question. Can you share a bit about how your users interact with the Agent?
If the Agent is email-triggered and the Account Setting in the Send Email block is set to Trigger Email, or if you’ve shared a Public Access link, they’ll receive the emails from noreply@mindstudio.ai directly to their own email address. A copy won’t be sent to your address.
When other users run your Agent, their email address will auto-populate in the field, but they’ll still need to click Approve:
To expand on my use case: the agent runs on-demand. It collects a couple of user inputs, generates an output, and then sends that output via email.
To test this, I created another simple agent with a single Send Email block, made it public, and set Cost Responsibility to Agent Owner. I then created a second MindStudio account in a separate browser and ran the test agent using its public link.
Here’s what I observed:
If I use default email connection or a specific email connection in the Send Email block, the output is sent to those accounts (the ones configured in the block), and not to the email address of the user who ran the agent.
Does this mean the only way to ensure each user receives the email at their own address is to set the Account property of the Send Email block to Dynamic (Ask at Runtime)? If so, that feels a bit impractical since it means that the email needs to be confirmed for every single run.
What you’ve described is the default behavior of the Send Email block. You’ll need to set the Account to Dynamic so users receive the email at their own address.
On the part about confirming the email for every run, could you clarify what you mean? Are you referring to the Agent Checkpoint window that pops up? If so, users do not need to re-verify their email address each time, but rather click Approve for the email to be sent.
Does that match what you are seeing? I would also appreciate it if you could share more about how you would like this to work.
Hi @Alex_MindStudio, thanks for the update and clarification. Yes, I was referring to the Agent Checkpoint window when the account is set to Dynamic. From my perspective, that interruption feels unnecessary. The flow I’d like is: the agent collects the required inputs, processes them, and sends the email seamlessly, without requiring the extra confirmation step.
Here’s an idea: currently, one of the options in the Send Email block is “default email connection”, but that refers to the default connection of the agent owner. What if there were an additional option; something like “agent runner’s default email connection” that automatically uses the default email account of the person running the agent?
This would let public agents send emails directly to the runner without extra prompts, while still keeping the owner’s account isolated. And if I, as the agent owner, run the agent myself, it would seamlessly use my own default connection as well.