AI Marketing Automation

How to trigger a ChatGPT task when a request arrives

 ·  10 min read

A coral intake ticket lies next to a dark tablet on a repair desk.
In this article

ChatGPT Work can start a task when a new message arrives in a supported Gmail account or Slack channel. Connect the app and tell Work which messages count and what to prepare. For a first test, have it draft a response inside Work. If you need a record that appears once and waits for a person to approve it, test those rules separately before you let anything leave the queue.

Say you run a maintenance shop and people email you for inspections. Someone asks for an appointment. You need enough information to put the request in front of dispatch, and dispatch still has to check availability. I’d start by having the task pull out the request and draft the next question. One test email is enough to see where it helps and where a person still needs to look.

Choose a time or an incoming message

An analog timer sits beside a metal mail slot with an envelope sliding through.

Use a scheduled check if your team handles requests together at set times. Ask for a list of unassigned requests after the last confirmed check. Somebody opening the office can work down the list. If a run is missed, that same cutoff lets the next check pick up where the previous one left off. This is how I’d start if quotes routinely wait until the next morning anyway. The morning operations brief walkthrough shows how to handle a gap between two checks.

Use an app event if the team needs to look at certain requests between those checks. One example is a new email asking about a pump inspection that needs dispatch to check a calendar. You can prepare a response as soon as the matching message reaches the test inbox. This feeds a person who can act on it. Make sure somebody actually checks the result during that window, or an early draft may sit as long as an ordinary email.

An event-driven task and a timed check can both find the same request. Keep one path for the first test. If you later keep a daily check as a fallback, point both paths at the same record of requests. Otherwise a request noticed at 9 a.m. can reappear in the afternoon as if no one saw it. Our guide to hosted and local AI tasks covers where each task actually runs.

Set up a test trigger in ChatGPT Work

OpenAI documents event-triggered tasks in Work for supported Gmail, Slack and GitHub events on eligible accounts. Free and Go do not have this feature, and some managed workspaces need an administrator to enable it. Use Work in ChatGPT on the web to set the trigger. OpenAI documents creation and editing on supported mobile apps as well. The desktop app can display existing event tasks.

Choose a Gmail account that contains only test messages. In ChatGPT, go to Settings, then Apps, and check whether that Gmail account is connected. Open Work and describe the trigger and the output in a conversation. Review the proposed Trigger, Condition and Prompt, and complete any authorization the test requires. Confirm the connected account and rule before you make the task active. Open Scheduled to check the task state later.

For the first test, use a known sender and a subject that your ordinary mail never uses. Try TRIAGE TEST REQ-104. In the message body, ask when a pump inspection is available. Leave out the site address so you can catch any draft that invents one. Use a second message with a different subject to check the filter. A duplicate and a message that never matched are two different cases. Check which one you are testing before you change the rule.

When a new message matches the test sender and the subject contains TRIAGE TEST, capture any request ID in the subject and summarize what the sender needs. Draft one question if dispatch needs more information. Use only the facts in the message. If there is no stable request ID, flag it for manual review. Put the draft in the task result. Read only. Leave sending, assignment and updates to the reviewer.

Check that you can find the first result in Work. Compare it with the original message. It should quote the request ID, state that the sender wants availability for an inspection and leave the time open for dispatch. Check Scheduled for a paused task or an action waiting for approval if no result appears. Inspect the account and filter before you try another connector. On a second test pass, check the unmatched message too. If it generates an item, tighten the subject rule and rerun the pair. The task setup and app actions available to you depend on the connected account and its permissions.

Test what a repeat does to the queue

Two cream intake tickets share a coral mark, with one matching ticket in a holding tray.

Decide what counts as one request before you test for a duplicate. In this example the request ID is REQ-104. It can come from a form or be assigned by the system that first logged it. The event ID identifies a delivery. A replay can carry the same event ID, and a second delivery about the same request can have another event ID. A record of open requests needs to recognize both when they refer to the same job.

We ran a local test with a small SQLite queue and synthetic request REQ-104. The first delivery created one pending item. Replaying the same input returned duplicate. A new event ID carrying REQ-104 also returned duplicate. The queue still held one item. Before the reviewer approved it, a query for approved items returned none. After approval, it returned only REQ-104.

Local test input Observed result
First delivery of REQ-104 One pending item
Same input delivered again Duplicate, one pending item
Reviewer checks approved items before approval No approved items
Reviewer approves REQ-104 One approved item
New event ID with the same request ID Duplicate, still one item

The test ran locally. ChatGPT Work did not receive an app event in that test. Your team can reproduce the checks in its own isolated queue before connecting an inbox. Read the number of rows after each attempt. If you see two items, inspect the key the queue used. A prompt asking Work to skip duplicates is useful guidance for the draft. A destination that enforces a unique key is the part that prevents a second record.

Use the source and request ID as that key if different systems can issue the same ID. Keep the original request visible when a later event adds details. That change can update the existing request or go to a reviewer. Decide which behavior fits your process and test it with one changed message. If nobody can explain why two apparently similar messages belong together, leave them for review. A reused subject or matching sender is weak evidence. The CRM data cleanup guide covers how to reuse IDs when records already exist.

If you want to run the same check without code, start with a table in a test database that can enforce a unique key. Give it columns for source, request ID, draft and review status. Set the first two columns together as the unique key. Insert the first row as pending. Attempt the same insert again and check that the database refuses it or ignores the conflict. Sort by status and look at the row count. A spreadsheet can help you rehearse the review, but a warning cell alone cannot stop two imports from writing at the same time.

Try a different kind of repeat after that. Put a corrected site address in a fresh test message that uses the same request ID. Check whether the original draft is now out of date. If someone already approved that draft, send the change back for another review before any reply goes out. Keep the older version where a reviewer can see what changed. The first test proves that a repeat does not create another row. This second exercise checks what to do when the repeat contains useful new information.

Put a decision between the draft and the reply

A dispatcher marks a work slip in pencil beside an outgoing tray.

Start with a manual approval. In the inspection example, the reviewer checks the job address and dispatch availability against the source, then chooses whether the draft is ready. The task has four useful facts to pass along: the request ID, the source message, what the sender wants and what still needs an answer. If the reply promises a time the source never confirmed, return the draft for a correction.

Test the review step with a pending item. A person who opens the queue should be able to see the draft. Any process that takes approved work should return nothing for that item until the reviewer makes a decision. In our local check, approval changed the state of the existing row. It never created another row. No email, CRM update or external write occurred. Keep a record of who approved the item and which version they saw if you extend the workflow beyond this test.

OpenAI says that an app action that requires approval may pause a scheduled task. Inspect the specific action and the connection’s permissions. Where you need every reply approved, keep the reply in Work for someone to copy or use a queue that enforces approval. Avoid granting send access during a read-only rehearsal. A pending ChatGPT result and your own approval record serve different purposes.

Decide when the inbox needs something more

For a small team, approving the draft in Work and replying from the inbox can be enough. Keep track of what the team actually checks and whether it can find the original message quickly. If the draft creates work because staff keep looking up missing addresses or rejecting vague classifications, change the intake fields before you add another action.

A separate queue earns its place when several people share one inbox, different paths can see the same request or you have to prove who approved a reply. Make a short list of the events that can arrive, what should happen if they repeat and where each decision is recorded. Include an example that should be accepted and one that should wait. If you want help turning those rules into a system, use the AI project scoping guide or bring the two examples to a custom software discussion.

FAQ

Can ChatGPT Work trigger from any webhook?

OpenAI documents supported events from connected Gmail, Slack and GitHub apps. The source and event depend on the app, eligible plan and workspace settings. Check the current list before designing a workflow around another source.

Does an app event prevent duplicate requests?

An app event starts a task. If repeat delivery must create one item, use a stable request ID and a queue that rejects duplicates. Test a repeated event and a new event for the same request.

Can I send a reply automatically after approval?

Check which actions your connected app allows and which require approval. Start by keeping the draft in Work and replying manually. If you add automated delivery later, verify both the approval record and the result visible in the destination.

Free AI Automation Snapshot

Find the work worth automating first

Tell us how your team works today. We map the first workflows worth automating and reply within 24 hours.

Your data is safe. We never share details without permission.

Free growth audit

Find out what's costing you leads

We check your site, ads and tracking and send the fixes that matter most within 24 hours. Your first 15 days are free on a new plan.