Skip to main content

Login

Authenticates with Instagram using your credentials and establishes a session for subsequent Instagram operations. Supports session persistence to enable faster logins and reduce authentication requests.

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

  • Session File Path - Optional path to save/load session file for faster subsequent logins. When provided, the node will attempt to load an existing session before performing a fresh login.

Options

  • Credentials - Instagram account credentials (username and password) stored in Robomotion's vault.
  • Save Session - Save session to file for faster subsequent logins. Default is true. When enabled and a Session File Path is provided, the session will be saved after successful login.

Output

  • Session ID - A unique session identifier that must be used with all other Instagram nodes to maintain the authenticated session.
  • Username - The logged-in Instagram username.

How It Works

The Login node is the entry point for all Instagram automation workflows. When executed, it:

  1. Retrieves your Instagram credentials from the vault
  2. Checks if a session file exists at the specified path (if provided)
  3. Attempts to load and validate the existing session
  4. If no valid session exists, performs a fresh login with username and password
  5. Saves the session to the specified path (if Save Session is enabled)
  6. Returns a unique Session ID for use in subsequent operations

Session persistence significantly improves performance by reusing authenticated sessions instead of logging in every time.

Requirements

  • A valid Instagram account
  • Instagram credentials stored in Robomotion's vault
  • Write permissions to the session file directory (if using session persistence)

Error Handling

The node will return specific errors in the following cases:

  • ErrAuth - Invalid credentials or two-factor authentication is required
  • ErrNetwork - Failed to connect to Instagram's servers
  • ErrRuntime - General login failure or unexpected error

Common Errors

Invalid Credentials:

Invalid Instagram credentials. Please check your username and password.

Solution: Verify your credentials in the vault are correct.

Two-Factor Authentication Required:

Two-factor authentication required. Please use an app password or disable 2FA temporarily.

Solution: Generate an app-specific password from Instagram or temporarily disable 2FA.

Connection Failed:

Failed to connect to Instagram: [error details]

Solution: Check your internet connection and firewall settings.

Usage Notes

  • The Login node should be the first Instagram node in your flow
  • The returned Session ID must be passed to all subsequent Instagram nodes
  • Session files are stored locally and contain authentication tokens
  • Keep session files secure as they provide access to your Instagram account
  • Sessions may expire over time; the node will automatically re-authenticate if needed
  • For security, delete session files when they're no longer needed

Example: Basic Login

Setup:

  1. Create Instagram credentials in the vault with your username and password
  2. Configure the Login node with these credentials
  3. Optionally specify a Session File Path like /path/to/sessions/instagram_session
  4. Enable Save Session option

Flow:

Login (returns Session ID) → Get Profile Info (uses Session ID) → Logout

Result:

  • Session ID: "550e8400-e29b-41d4-a716-446655440000"
  • Username: "your_username"

Example: Session Persistence

First Run:

Login Node
├─ Session File Path: "./sessions/my_account"
├─ Save Session: true
└─ Result: Fresh login, session saved to file

Subsequent Runs:

Login Node
├─ Session File Path: "./sessions/my_account"
├─ Save Session: true
└─ Result: Loads existing session (much faster)

Best Practices

  • Always store credentials in the vault, never hardcode them
  • Use session persistence to reduce login frequency and improve performance
  • Store session files in a secure directory with restricted permissions
  • Use a single Login node at the beginning of your workflow
  • Always pair Login with Logout to properly clean up resources
  • Handle authentication errors gracefully with try-catch patterns
  • Add delays between login attempts to avoid rate limiting
  • Use different session file paths for different Instagram accounts
  • Regularly rotate credentials for improved security

Tips for Effective Use

  • Session File Organization: Use descriptive session file names like session_brandmonitor or session_contentcurator to manage multiple accounts
  • Performance: Reusing sessions can reduce login time from 5-10 seconds to under 1 second
  • Debugging: If experiencing authentication issues, delete the session file to force a fresh login
  • Rate Limiting: Instagram may temporarily block logins if you authenticate too frequently; session persistence helps avoid this
  • Account Safety: Avoid logging in from multiple locations simultaneously to prevent account flags