Skip to main content

Connect

Establishes a connection to WordPress using Basic Authentication and returns a client ID for subsequent WordPress operations.

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

  • Url - The WordPress site URL (e.g., https://yoursite.com). This is the base URL of your WordPress installation.

Options

  • Credentials - WordPress username and application password for authentication. The credentials should be created in your WordPress admin panel under Users > Profile > Application Passwords.

Output

  • Client Id - A unique identifier for the WordPress client connection that must be used in subsequent WordPress operations.

How It Works

The Connect node is the first step in any WordPress automation flow. It establishes an authenticated connection to your WordPress site using the REST API.

When executed, the node:

  1. Validates the provided URL and credentials
  2. Creates an HTTP client with Basic Authentication
  3. Tests the connection by making a simple API request to verify credentials
  4. Stores the authenticated client in memory
  5. Returns a unique client ID that references the stored connection
  6. This client ID is then used by other WordPress nodes to access the API

Requirements

  • A WordPress site with REST API enabled (enabled by default in WordPress 4.7+)
  • An application password generated for a WordPress user account
  • The WordPress user must have appropriate permissions for the operations you want to perform
  • HTTPS connection is strongly recommended for security

Generating Application Passwords

To generate an application password in WordPress:

  1. Log in to your WordPress admin panel
  2. Go to Users > Profile
  3. Scroll down to the "Application Passwords" section
  4. Enter a name for the application (e.g., "Robomotion")
  5. Click "Add New Application Password"
  6. Copy the generated password (it will only be shown once)
  7. Store this password in Robomotion credentials
warning

Application passwords are different from your regular WordPress login password. Never use your regular password for API authentication.

Error Handling

The node will return specific errors in the following cases:

  • Missing or empty URL
  • Missing or empty username in credentials
  • Missing or empty password in credentials
  • Invalid URL format
  • Connection timeout or network errors
  • Authentication failure (invalid credentials)
  • WordPress REST API is disabled or not accessible

Usage Notes

  • The Connect node should be executed before any other WordPress operations
  • The returned Client Id must be passed to subsequent WordPress nodes
  • Each Connect node creates a new client connection
  • For security, always use the Disconnect node to remove the stored connection when it's no longer needed
  • The client connection is stored in memory only and is automatically removed when the flow stops
  • Modern WordPress installations (4.7+) have the REST API enabled by default

Best Practices

  • Store your WordPress credentials as a credential in Robomotion rather than hardcoding them
  • Use application passwords instead of regular WordPress passwords
  • Use HTTPS for your WordPress site to ensure secure communication
  • Use a single Connect node at the beginning of your flow
  • Always pair Connect with Disconnect nodes to properly clean up resources
  • Test your connection with a simple operation (like List Categories) before performing complex operations
  • Ensure the WordPress user has appropriate permissions for the operations you plan to perform

Example Flow

A typical WordPress automation flow structure:

  1. Connect (establish connection)
  2. Perform operations (Create Post, List Posts, etc.)
  3. Disconnect (cleanup connection)

Security Considerations

  • Application passwords can be revoked at any time from the WordPress admin panel
  • Each application password is unique and can be used to track API usage
  • If a password is compromised, revoke it immediately and generate a new one
  • The credentials are transmitted using Basic Authentication, so always use HTTPS
  • Store credentials securely in Robomotion's credential vault