Disconnect
Disconnects from Dropbox and releases the client connection by removing the stored access token.
Common Properties
- Name - The custom name of the node.
- Color - The custom color of the node.
- Delay Before (sec) - Waits in seconds before executing the node.
- Delay After (sec) - Waits in seconds after executing node.
- Continue On Error - Automation will continue regardless of any error. The default value is false.
info
If the ContinueOnError property is true, no error is caught when the project is executed, even if a Catch node is used.
Inputs
- Client ID - The client identifier from the Connect node to disconnect.
How It Works
The Disconnect node safely cleans up the Dropbox connection by removing the stored access token from memory. When executed, the node:
- Validates the Client ID input
- Removes the stored access token from the token manager
- Frees up memory resources associated with the connection
- Invalidates the Client ID for future operations
Requirements
- A valid Client ID from a previous Connect node
- The Client ID should not be used in subsequent Dropbox operations after disconnection
Error Handling
The node will return specific errors in the following cases:
- Empty or invalid Client ID
- Client ID not found in the token manager
Usage Notes
- Always use Disconnect at the end of your Dropbox automation flow
- After disconnection, the Client ID becomes invalid and cannot be reused
- Multiple Disconnect calls with the same Client ID may cause errors
- The node is lightweight and executes quickly
- Disconnection is automatic when the flow stops, but explicit disconnection is a best practice
Example 1: Basic Workflow Cleanup
Properly clean up a Dropbox automation:
Connect
↓
UploadFile
↓
ListFiles
↓
Disconnect
Example 2: Error Handling with Cleanup
Ensure disconnection even when errors occur:
Connect
↓
Try
├─ UploadFile
├─ DownloadFile
└─ ProcessFiles
↓
Catch (handle errors)
↓
Finally
└─ Disconnect
Example 3: Multiple Operations with Single Connection
Use one connection for multiple operations:
Flow:
- Client ID: (from Connect node)
Connect (returns client_id)
↓
CreateFolder (uses client_id)
↓
UploadFile (uses client_id)
↓
FileStat (uses client_id)
↓
ListFiles (uses client_id)
↓
Disconnect (uses client_id)
Common Use Cases
- Cleaning up resources at the end of Dropbox workflows
- Ensuring proper memory management in long-running automations
- Implementing security best practices by removing stored credentials
- Preventing token leaks in production environments
- Properly terminating Dropbox sessions
Best Practices
- Always pair Connect nodes with Disconnect nodes
- Place Disconnect in a Finally block to ensure it executes even if errors occur
- Only disconnect once per connection
- Don't attempt to use the Client ID after disconnection
- Use Continue On Error when disconnecting to prevent workflow failures from cleanup issues
Resource Management
The Disconnect node is important for:
- Memory cleanup: Removes stored tokens from memory
- Security: Ensures credentials don't persist longer than needed
- Resource efficiency: Frees up connection resources
- Best practices: Following proper connection lifecycle management
When to Disconnect
Do disconnect when:
- You've completed all Dropbox operations
- An error occurs and you want to clean up
- The workflow is ending
- You're switching to a different Dropbox account
Don't disconnect if:
- You still have Dropbox operations to perform
- You're in the middle of a batch process
- You plan to reuse the connection immediately
Error Recovery
If disconnection fails:
- The token will be automatically cleaned up when the flow stops
- Memory leaks are minimal as tokens are stored in a managed map
- Subsequent connects will create new client IDs
- Failed disconnection rarely impacts workflow functionality
Tips
- Use a Finally block to guarantee disconnection
- Log disconnection for audit trails
- Handle disconnection errors gracefully with Continue On Error
- Consider disconnection as part of your workflow's cleanup phase
- Test that your workflow properly disconnects in all scenarios (success and error cases)
Pattern: Guaranteed Cleanup
To ensure disconnection always happens:
Set client_id = null
Try
├─ Connect → client_id
├─ (Dropbox operations using client_id)
Catch
└─ Log error
Finally
├─ If client_id is not null
└─ Disconnect with client_id
Security Considerations
- Disconnecting removes the token from memory but doesn't revoke it
- The Dropbox access token remains valid until revoked in Dropbox settings
- For maximum security, revoke tokens in the Dropbox App Console when no longer needed
- Disconnection is sufficient for normal workflow cleanup
- Consider token rotation for long-running or highly sensitive applications