Build your first automation
In this tutorial, you build an onboarding automation that welcomes new signups, waits for their first upload, and nudges the people who don't upload. You learn how triggers, conversion goals, and Wait until steps work together, and how to test an automation without emailing anyone.
Before you start
- Set up your domain, or use the test sender for now. See set up your domain.
- Capture events for what people do, such as
signed_upanduploaded_file, and identify people with their email. See installation.
Build the automation
Pick how you want to learn. Both paths build the same automation.
Connect your agent
Run npx @posthog/wizard mcp add to connect the PostHog MCP to Claude Code, Cursor, Codex, or another agent. Then copy this prompt into your agent:
The agent explains each part before it builds it, and saves its work as a draft. Check what you see at each checkpoint before you tell it to continue.
Checkpoint 1: The trigger and the goal
What the agent builds: a trigger on signed_up, with a frequency of one time ever, so each person goes through the automation only once. A conversion goal on uploaded_file, with Exit when conversion goal is met.
Why it matters: with exit on goal, a person who uploads a file leaves the automation at once. Nobody gets a nudge for something they already did.
What you should see: the agent names the trigger event, the frequency, the goal event, and the exit condition, and asks you to confirm them.
Checkpoint 2: The welcome email and the wait
What the agent builds: a welcome email after the trigger, then a Wait until step for uploaded_file, with a max time of 2 days. The step has two paths:
- Event received – the person uploaded a file. This path goes to the exit.
- No match within 2d – the person didn't upload. This path sends the nudge email.
What you should see: the agent saves the automation as a draft, and gives you a link to it. It pauses before it tests anything.
Checkpoint 3: A mocked step test
What the agent does: it runs a mocked test on one step at a time with a sample person, with real HTTP requests turned off. A single-step test verifies the welcome email (rendering, subject, and recipient) without sending anything. It does not simulate a later uploaded_file event or advance the two-day wait.
What you should see:
- The welcome email step succeeds for the test person, with no real email sent.
- You confirm the Wait until edges (Event received to exit, No match within 2d to the nudge email) and the
uploaded_fileexit-on-goal setting on the draft canvas.
Checkpoint 4: Review and publish
Open the draft in Workflows. Check the trigger, the goal, both emails, and both paths on the canvas. Read each email in the editor.
What you should see: the automation is still a draft. When it looks right, click Enable. Your agent never turns it on for you.
1. Create the automation
Go to Workflows, and click New workflow. Click Blank workflow. It starts with a trigger and an exit.


2. Pick the trigger
Click the Trigger step. Click Add trigger event, then change the event to signed_up.
Under Frequency, pick One time per period, then change the period to ever. Each person goes through the automation only once.


3. Set the goal
Scroll down to Conversion goal. Under Detect conversion from events, click Add event, and change the event to uploaded_file.
Under Exit condition, pick Exit when conversion goal is met. People leave the automation when they upload a file.


4. Add the welcome email
Click + below the trigger. In the step list, click Email.


5. Write the welcome email
In the email step, pick a sender in From, and type a Subject. Click Start blank to open the email editor.
Write the email. Type / to add a block, such as a Button. Click Done.


6. Wait for the first upload
Click + below the welcome email, and click Wait until. Under Events to wait for, click Add event, and change the event to uploaded_file. Set Max time to wait to 2 Day(s).
The step now has two paths: Event received for people who upload, and No match within 2d for people who don't.


7. Save the automation
Click Create as draft. PostHog saves the automation, but it doesn't send anything yet. From now on, it saves your changes as you go.
8. Nudge the people who didn't upload
Click + on the No match within 2d path, and click Email. Type a subject, click Start blank, write a short tip about how to upload a file, and click Done.
Leave the Event received path empty, so it goes to the exit.


9. Test it
Click the welcome email step, and open the Test tab. Pick a person, and leave Make real HTTP requests off. Click Run test. PostHog shows what the step does, and sends nothing.


10. Turn it on
Click Enable. The automation is now live, and everyone who signs up goes through it.


What you learned
- A trigger with a frequency of one time ever starts the automation once for each person.
- A conversion goal with exit on goal stops messages to people who already did the thing you want.
- A Wait until step splits people into two paths: those who act within the max time, and those who don't.
- A test with real HTTP requests turned off shows what each step does, and sends nothing.
Next steps
- Product data and messaging – why events make your messages better.
- Triggers – every way to start an automation.
- Steps – every step you can add.
- Test and debug an automation – find out why a person took a path.
- Edit a live automation – change an automation after you enable it.





