- An agent to start. See Create an agent or Describe an agent with Assist.
- An account in the app, and permission to sign in to it.
Connect the app
1
Open Integrations
In the sidebar under Connect and tools, click Integrations, then New Integration.
2
Choose the app
Search for the app, for example
Gmail, and choose it. The app is marked Guided setup.3
Name it and sign in
Enter a Name, for example 
Work Gmail. This is what you pick later when an agent uses this account.Click Connect to and the app’s name. The app’s sign-in page opens. Sign in and approve the connection.
4
Check the integration
The sign-in sends you back to Integrations. The account is in the list with the status Enabled.If you leave the sign-in before approving, the account shows Not connected. Open the row’s actions and click Connect integration to try again.
Set the trigger to App event
1
Open the Entry panel
Open the agent in the editor and click the trigger node at the top of the canvas. The Entry panel opens.
2
Choose App event
Under Entry type, choose App event.
3
Pick the app, the event and the account
Under Event:
Some apps are checked for new events about every 15 minutes, so a run can start a few minutes after the event. When that applies, the help under Event says so.
- Under App, choose the app, for example Gmail.
- Under Event, choose what starts the agent, for example New Gmail Message Received Trigger. The help under the field says what the event is.
- Under Account, choose the account you connected.

4
Adjust the settings
If the event has settings, they appear under Settings. A Gmail message, for example, can be narrowed with Label Ids or Query. Leave a setting empty to use the event’s default.
Read the event in the prompt
Under Variables, the Entry panel lists what the agent can read about the event. Each one reads as{{ .event.data.<name> }}. For a new Gmail message, set the first sub agent’s User prompt to something like:
{{ .event.json }}.
The agent does not reply in the app on its own. To reply or act there, give the agent a tool from the same app on the same account. See Add a tool.
Enable and test
1
Test in the editor
Click Run. The dialog asks for the event’s fields, such as the sender and the subject. Fill in the ones the prompt reads and click Run. The run panel shows the agent’s answer.
2
Save and enable
Click Save, then turn on the Enabled switch in the top bar. The agent starts watching the account for the event.
3
Make the event happen
Make the event happen in the app, for example send yourself an email. The run appears on the Runs page with the trigger App event. See Check what your agent did.
Related
Add an integration
Connect other accounts.
Add a tool
Let the agent reply or act in the app.
Connect an agent to Slack
Answer messages as the Servflow bot.
Check what your agent did
Read the runs an event started.