Mark the end of conditional blocks - closes For Loops, If Conditions, and other control flow actions.
Common uses:
- Close every For Loop
- Close every If Condition
- Close every If/Else block
- Define the boundary of conditional actions
end_condition
What This Does (The Simple Version)
Think of this like a closing bracket or parenthesis. When you open a For Loop or If Condition, you need to close it. End Condition tells the workflow “this is where the conditional block ends.” Real-world example: You have a For Loop that updates 50 deals. The End Condition marks where the loop ends, so the workflow knows to jump back to the top and process the next deal, or continue to the next action if all deals are done.How It Works
The End Condition action closes any conditional block (For Loop, If Condition, If/Else). When the workflow reaches this action: For Loops:- Checks if there are more items to process
- If yes → Jumps back to For Loop, updates current item, runs actions again
- If no → Exits and continues with actions after End Condition
- Marks where the “if true” actions end
- Workflow continues with actions after End Condition
- Marks where the entire if/else block ends
- Workflow continues with actions after End Condition
Setting It Up
When to Add It
Add the End Condition action after all the actions inside your conditional block.For Loops
Structure:If Conditions
Structure:If/Else Blocks
Structure:How to Add It
When building your workflow:- Add your conditional action (For Loop, If Condition, etc.)
- Add all the actions that should be inside that block
- Add the End Condition action
- (Optional) Add actions after End Condition that should run after the block
What Happens at End Condition
In a For Loop
Loop continues:- If more items exist, current item variable updates and workflow jumps back
- All actions between For Loop and End Condition run again
- If no more items, workflow continues with action after End Condition
- Loop variables no longer exist
In an If Condition
After true actions:- End Condition marks where the “if true” actions end
- Workflow continues with actions after End Condition
- If condition was false, these actions were skipped entirely
In an If/Else Block
After entire block:- End Condition marks where the entire if/else block ends
- Either the “if true” or “else” actions ran (never both)
- Workflow continues with actions after End Condition
Common Workflows
For Loop with End Condition
Goal: Update multiple deals and send confirmation when done-
Search HubSpot (V2)
- Find deals
- Output Variable:
target_deals
-
For Loop
- Loop through:
target_deals
- Current item:
current_deal
- Loop through:
-
Update HubSpot Object (inside loop)
- Update the deal
- End Condition ← Closes the For Loop
-
Send Email (after loop)
- Confirmation that all deals were updated
If Condition with End Condition
Goal: Only update high-value deals-
Lookup HubSpot Object (V2)
- Get deal details
- Output Variable:
deal
-
If Condition
- Check if
deal.properties.amount
> 10000
- Check if
-
Update HubSpot Object (only runs if true)
- Update the deal stage
-
Send Email (only runs if true)
- Notify sales team
- End Condition ← Closes the If Condition
-
Log to Console (runs regardless)
- Log that workflow completed
If/Else with End Condition
Goal: Send email if contact has email address, otherwise log-
Lookup HubSpot Object (V2)
- Get contact
- Output Variable:
contact
-
If Condition
- Check if
contact.properties.email
is not empty
- Check if
-
Send Email (runs if true)
- Send to contact’s email
- Else Condition
-
Log to Console (runs if false)
- Log “No email address found”
- End Condition ← Closes the entire if/else block
-
Update Contact (runs regardless)
- Update last contacted date
Real Examples
Loop with Count Tracking
Scenario: Update deals and count how many were updated-
Set Variable
count
=0
-
Search HubSpot (V2)
- Output Variable:
deals
- Output Variable:
-
For Loop
- Loop through:
deals
- Current item:
current_deal
- Loop through:
-
Update HubSpot Object
- Update deal
-
Set Variable
- Increment
count
- Increment
- End Condition ← Closes For Loop
-
Send Email
- Subject: “Updated [count] deals”
Conditional Update
Scenario: Update contact only if they’re in a specific lifecycle stage-
Lookup HubSpot Object (V2)
- Get contact
- Output Variable:
contact
-
If Condition
- Check if
contact.properties.lifecycle_stage
equals “lead”
- Check if
-
Update HubSpot Object
- Set lifecycle_stage to “marketingqualifiedlead”
-
Create Timeline Event
- Log stage change
- End Condition ← Closes If Condition
-
Log to Console
- “Workflow complete”
Troubleshooting
”Missing End Condition” Error
Error: Conditional block without End Condition How to fix:- After all actions inside your conditional block, add an End Condition action
- Make sure there’s exactly one End Condition for each conditional block
- Check that End Condition is after all the actions you want inside the block
Actions After End Condition Don’t Run
Actions after End Condition are skipped Possible causes:- Error inside conditional block stops execution
- For Loop timeout
- Check execution log for errors
- Fix errors in actions inside the block
- For loops: reduce item count to test
Wrong Actions Repeating
Actions outside the block are repeating (For Loop) Possible causes:- End Condition is in the wrong place (too far down)
- Move End Condition to immediately after the last action you want repeated
- Actions after End Condition should only run once
If/Else Not Working as Expected
Wrong branch is executing Possible causes:- End Condition missing or in wrong place
- Else Condition missing
- Structure should be: If Condition → [true actions] → Else Condition → [false actions] → End Condition
- Make sure End Condition is after both branches
Tips & Best Practices
✅ Do:- Always add End Condition after every conditional block
- Place End Condition after all actions you want inside the block
- Use one End Condition per conditional block (For Loop, If, If/Else)
- Check execution log to verify blocks executed correctly
- Forget to add End Condition (conditional blocks won’t work)
- Put End Condition in the middle of actions you want in the block
- Add multiple End Conditions for one conditional block
- Try to access loop variables after End Condition (they’re gone)
- Conditional actions and End Condition are like opening and closing brackets
- Everything between them is inside the block
- Everything after End Condition runs after the block completes
- Keep blocks simple - complex nested conditions are harder to debug
Related Actions
Always used together:- For Loop - Starts a loop (requires End Condition)
- If Condition - Conditional execution (requires End Condition)
- Set Variable - Save data from inside blocks
- Variable System - Understanding variable scope
Last Updated: 2025-10-01