Skip to content
Notis

Measure email response time with Python

Get a simple response-time calculation from sent email activity and the timestamp context you provide.

Trigger

Email Sent

Triggers when a Gmail message is sent by the authenticated user. It polls the 'SENT' label and emits metadata including sender, recipients, subject, timestamp, and thread ID.

Action

Execute Code

Execute python code in a sandbox and return any result, stdout, stderr, and error. use /home/user folder to write/read files. try to not use plt.show() as the code is executed remotely. use files for image/chart output instead.

Why this helps

Estimating how quickly you reply from scattered message history requires manual searching and arithmetic.

  • Calculate elapsed time from timestamps available to the run.
  • Use sent-message events as a prompt to analyze reply timing.
  • Expose missing timestamp context instead of assuming it.

Setup

Build it in a few focused steps.

  • 1Connect Gmail and Codeinterpreter once in the Notis portal.
  • 2Create an automation and describe the response-time calculation.
  • 3In one instruction, specify the source of the original received timestamp or say how to report it as missing.
  • 4Choose the Email Sent trigger and a destination for run reports.
  • 5Test with one real sent email and verify the timestamp inputs and result.

Questions about this workflow

Does the sent event include when the original email arrived?

The listed event includes sender, recipients, subject, timestamp, and thread ID. It does not specify an original received timestamp, so that context must be available separately or reported as missing.

Can it calculate a response time without the original timestamp?

No. The calculation requires both the sent timestamp and the original received timestamp.

When this happens · Trigger

Do this · Action

Supported Triggers and Actions

Notis builds workflows that link Gmail to Codeinterpreter. A trigger fires from one place; an action lands in another.

Gmail triggers

Codeinterpreter actions

Recurring trigger

Notis starts this workflow on a schedule, such as daily, weekly, or during business hours.

TriggerScheduled

Create Sandbox

Create a sandbox to execute python code in a jupyter notebook cell. this is useful for agents to communicate, execute code, see output, read files, write files, etc. it's like you own personal computer, but in the cloud. use /home/user folder to write/read files.

ActionInstant

Webhook trigger

Notis starts this workflow when an external tool or custom backend sends an HTTP request.

TriggerInstant

Execute Code

Execute python code in a sandbox and return any result, stdout, stderr, and error. use /home/user folder to write/read files. try to not use plt.show() as the code is executed remotely. use files for image/chart output instead.

ActionInstant

Email Sent

Triggers when a Gmail message is sent by the authenticated user. It polls the 'SENT' label and emits metadata including sender, recipients, subject, timestamp, and thread ID.

TriggerPolling

Get File

Get a file from the sandbox and returns the file. the files should be read from /home/user folder.

ActionInstant

New Gmail Message Received Trigger

Triggers when a new message is received in Gmail.

TriggerPolling

Run Terminal Command

Run a command in the terminal and returns the stdout, stderr, and error code. use /home/user folder to write/read files.

ActionInstant

Upload File

Upload a file to the sandbox environment. the files should be uploaded to the /home/user folder.

ActionInstant

Connect any two apps with Notis in the middle.

Gmail and Codeinterpreter, or any other combination from 1,000+ integrations.

When this happens · Trigger

Do this · Action

Save your first hour today.

7-day trial of any paid plan, with 20$ of usage included.
No card. Works with personal or business Codeinterpreter.