> ## Documentation Index
> Fetch the complete documentation index at: https://intunedhq.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart: Build an authenticated RPA with code

export const CLICommandTabs = ({command, withOptions = true}) => {
  if (!Array.isArray(command)) {
    command = [command];
  }
  function mapAliases(aliases) {
    return aliases.map((alias, index) => <>
        {alias}
        {index === 0 ? "" : " # Alias"}
        {"\n\n"}
      </>);
  }
  return <CodeGroup>
      <CodeBlock language="general" filename="General">
        {mapAliases(command.map(cmd => `${cmd}${withOptions ? " [options]" : ""}`))}
      </CodeBlock>

      <CodeBlock icon="python" language="uv" filename="uv">
        {mapAliases(command.map(cmd => `uv run ${cmd}${withOptions ? " [options]" : ""}`))}
      </CodeBlock>

      <CodeBlock icon="python" language="poetry" filename="poetry">
        {mapAliases(command.map(cmd => `poetry run ${cmd}${withOptions ? " [options]" : ""}`))}
      </CodeBlock>

      <CodeBlock icon="https://d3gk2c5xim1je2.cloudfront.net/devicon/typescript.svg" language="npm" filename="npm">
        {mapAliases(command.map(cmd => `npm run ${cmd}${withOptions ? " -- [options]" : ""}`))}
      </CodeBlock>

      <CodeBlock icon="https://d3gk2c5xim1je2.cloudfront.net/devicon/typescript.svg" language="yarn" filename="yarn">
        {mapAliases(command.map(cmd => `yarn ${cmd}${withOptions ? " [options]" : ""}`))}
      </CodeBlock>
    </CodeGroup>;
};

In this quickstart, you'll build an RPA (Robotic Process Automation) that automates booking a consultation appointment on a website that requires login. You'll use AuthSessions—Intuned's built-in authentication management feature—to create and manage the authentication state. By the end, you'll have a working authenticated automation ready to run on demand.

## Prerequisites

* An active Intuned account ([sign up here](https://app.intuned.io)). No credit card required—Intuned has a free plan
* Basic familiarity with TypeScript or Python

## Create and deploy your first authenticated RPA

You can develop Intuned Projects in two ways:

* **Hosted projects (online IDE)** — Zero setup. Write, test, and deploy directly from your browser.
* **Connected projects (local CLI)** — Develop locally with full version control and CI/CD integration.

Choose your preferred approach below.

<Tabs>
  <Tab title="Hosted project">
    <Steps>
      <Step title="Log in and create project" icon="plus">
        1. Go to [app.intuned.io/projects](https://app.intuned.io/projects) and log in.
        2. Select **Create Project**.
        3. Select your language (TypeScript or Python).
        4. Choose the **rpa-auth-example** template.
        5. Name it `book-consultations-authenticated-quickstart`.
        6. Ensure **Hosted project** is selected as Type.
        7. Select **Create and Open**.

        <img src="https://mintcdn.com/intuned-dev/1Y1SdXzBRrq-Bl5N/assets/quickstart/rpa_auth_template.png?fit=max&auto=format&n=1Y1SdXzBRrq-Bl5N&q=85&s=d5035fe2315e12b1a8ccaf47e733746a" alt="Create RPA with Auth Project" width="2880" height="2048" data-path="assets/quickstart/rpa_auth_template.png" />

        **Expected result:** The Intuned IDE opens with your project loaded.

        > **What you just got:** An **Intuned Project** groups related browser automations together. Each file in the `api/` folder becomes a callable function that controls a browser using Playwright, accepts parameters, and returns results. When working with sites that require login, you can create AuthSessions that store and manage login states, allowing your automation APIs to run authenticated actions without logging in every time. When you deploy the project, all its APIs go live together as a single deployable unit.

        <Tip>
          AuthSessions are a powerful feature of Intuned that simplify handling authentication in your automations. By defining login flows and session checks, you ensure your automations always have valid access to the target site. Learn more in the [Authentication documentation](/main/02-features/auth-sessions).
        </Tip>
      </Step>

      <Step title="Explore the project code" icon="code">
        In the file explorer, you'll see the API file:

        **`api/book-consultations`** - A complete automation that:

        * Navigates to the booking form
        * Fills in personal details (name, email, phone)
        * Selects date, time, and consultation topic
        * Submits the form and verifies success

        **How it works:** This automation controls a browser like a human would—navigating to a website, filling form fields, clicking buttons—but executes these actions automatically based on your code and input parameters.

        Also, you'll notice a special folder named `auth-sessions/` that contains two special APIs:

        * **`auth-sessions/create`** - Defines how to perform your login flow. It receives credentials as input parameters and automates your login process, saving the captured browser state and cookies to be reused later.
        * **`auth-sessions/check`** - Checks if the current session is still valid or if a new login is required. This API executes automatically before every Run, ensuring your automation always has a valid authenticated session.
      </Step>

      <Step title="Validate your AuthSession" icon="shield-check">
        First, let's set up authentication. You'll have a pre-created test AuthSession with credentials that you can use. Let's run an **AuthSession:Validate** Run that will run the `check` API; and if it fails, it will automatically run the `create` API to log in and create a new session state.

        In the top toolbar:

        1. Select **AuthSession: Validate** from the API dropdown.
        2. Select **test-authsession** from the AuthSession dropdown.
        3. Select the **Run** button.

                   <img src="https://mintcdn.com/intuned-dev/afjZxAQhak8dZFgC/assets/quickstart/run_authsession_validate.gif?s=e4e61f0f3ff5f5f20a97f67a37f380ad" alt="Run AuthSession validate" width="2000" height="1133" data-path="assets/quickstart/run_authsession_validate.gif" />

        **Expected result:** You'll notice that the `check` API runs and fails (no session state exists yet), then the `create` API runs to log in and create a new session, and a subsequent `check` API runs and passes. Your AuthSession is now ready to be used by your automations in the IDE!

        <Tip>
          The credentials are pre-configured in the auth session instance for the demo site. When building your own authenticated automations, you'll pass your own credentials when creating your auth session instance.
        </Tip>
      </Step>

      <Step title="Run your automation in the IDE" icon="play">
        Test the automation to see it working right in the IDE.

        1. Select **API: book-consultations** from the API dropdown.
        2. Make sure the **test-authsession** AuthSession is selected as well, so the API can run authenticated with this valid session.
        3. Select **Web Scraping Consultation** next to it—you'll see pre-filled test data already configured.
        4. Select the **Run** button.

                   <img src="https://mintcdn.com/intuned-dev/afjZxAQhak8dZFgC/assets/quickstart/run_auth_rpa.gif?s=6f3bb420dfd3c1419f4bcadc4227c101" alt="Run RPA ide" width="2000" height="1133" data-path="assets/quickstart/run_auth_rpa.gif" />

        **Expected result:** The browser panel on the right shows the automation executing live. First, it will rerun the `check` API to verify your AuthSession. You'll see it navigate to the booking form, fill in all fields, submit, and verify success. The terminal below displays the result of the Run.

        <Expandable title="result of the Run">
          ```json theme={null}
          {
            "input": {
              "name": "John Smith",
              "email": "john.smith@example.com",
              "phone": "+1-555-0123",
              "date": "2024-12-25",
              "time": "14:30",
              "topic": "web-scraping"
            },
            "output": {
              "success": true,
              "date": "2024-12-25",
              "message": "Consultation successfully booked for 2024-12-25 at 14:30"
            }
          }
          ```
        </Expandable>
      </Step>

      <Step title="Deploy your project" icon="rocket">
        Deploy your automation to Intuned's infrastructure.

        1. Select the **Deploy** button in the top-right corner of the IDE.
        2. Leave **Create test AuthSession** toggle selected. This will create a `test-auth-session` AuthSession so you can use for testing.
        3. In the deployment dialog, select **Deploy** to start.
        4. Watch the live deployment logs until you see "Ready".

        **Expected result:** A success message appears. Your automation is now live and ready to run.
      </Step>

      <Step title="Test in the Playground" icon="circle-check">
        Now test your deployed authenticated automation through the API Playground.

        1. In the deployment success dialog, select **Run in Playground**.
        2. In the Playground, you'll see your deployed API **book-consultations** ready to call. The newly created test AuthSession is selected.
        3. The request body is pre-filled with test parameters. Select **Start Run** to execute.

        <Tip>
          The Playground is just an interactive way to test your deployed automation APIs. Your automation is now callable from anywhere via API—use it from your application, service, or any HTTP client. See the [API Reference](/client-apis/api-reference) for authentication and programmatic usage.
        </Tip>

        <img src="https://mintcdn.com/intuned-dev/afjZxAQhak8dZFgC/assets/quickstart/playground_with_auth.gif?s=2ea89848b0195cd80ddb8e4a883caf1f" alt="Playground RPA run" width="2000" height="1132" data-path="assets/quickstart/playground_with_auth.gif" />

        **Expected result:** The automation executes on Intuned's infrastructure. You'll see the run details, AuthSession validation, and results in real-time.

        Your automation is now deployed and fully operational.
      </Step>
    </Steps>
  </Tab>

  <Tab title="Connected project">
    <Steps>
      <Step title="Install and create project" icon="terminal">
        Open your terminal and run:

        ```bash theme={null}
            npx create-intuned-project@latest
        ```

        When prompted:

        1. **Project name:** Enter `book-consultations-authenticated-quickstart`.
        2. **Language:** Select **TypeScript** or **Python**.
        3. **Template:** Choose **rpa-auth-example**.
        4. **Your Workspace Id:** Check [here](/main/03-how-to/manage/manage-workspace) how to find it.
        5. **Your API Key**: Check [here](/main/03-how-to/manage/manage-api-keys) how to create one.

        **Expected result:** The CLI creates a new folder `book-consultations-authenticated-quickstart/` with the project structure and installs dependencies.

        > **What you just got:** An **Intuned Project** groups related browser automations together. Each file in the `api/` folder becomes a callable function that controls a browser using Playwright, accepts parameters, and returns results. When working with sites that require login, you can create AuthSessions that store and manage login states, allowing your automation APIs to run authenticated actions without logging in every time. When you deploy the project, all its APIs go live together as a single deployable unit.

        <Tip>
          AuthSessions are a powerful feature of Intuned that simplify handling authentication in your automations. By defining login flows and session checks, you ensure your automations always have valid access to the target site. Learn more in the [Authentication documentation](/main/02-features/auth-sessions).
        </Tip>
      </Step>

      <Step title="Navigate to project directory" icon="folder">
        ```bash theme={null}
            cd book-consultations-authenticated-quickstart
        ```
      </Step>

      <Step title="Explore the project code" icon="code">
        Open the project in your code editor. You'll see the API file:

        **`api/book-consultations`** - A complete automation that:

        * Navigates to the booking form
        * Fills in personal details (name, email, phone)
        * Selects date, time, and consultation topic
        * Submits the form and verifies success

        **How it works:** This automation controls a browser like a human would—navigating to a website, filling form fields, clicking buttons—but executes these actions automatically based on your code and input parameters.

        Also, you'll notice a special folder named `auth-sessions/` that contains two special APIs:

        * **`auth-sessions/create`** - Defines how to perform your login flow. It receives credentials as input parameters and automates your login process, saving the captured browser state and cookies to be reused later.
        * **`auth-sessions/check`** - Checks if the current session is still valid or if a new login is required. This API executes automatically before every Run, ensuring your automation always has a valid authenticated session.
      </Step>

      <Step title="Validate your AuthSession" icon="shield-check">
        First, let's set up authentication. When you created your project, it came with a pre-created test AuthSession under the `/auth-sessions-instances` folder with credentials that you can use. Let's run a validate command to recreate the session state.

        Run the following command to validate the AuthSession:

        <CLICommandTabs command="intuned dev run authsession validate test-authsession" withOptions={false} />

        **Expected result:** The CLI runs the `check` API and fails (no session state exists yet), then runs the `create` API to log in and create a new session, and runs a subsequent `check` API that passes. Your AuthSession is now ready to be used by your automations.

        <Tip>
          The credentials are pre-configured in the auth session instance for the demo site. When building your own authenticated automations, you'll pass your own credentials when creating your auth session instance.
        </Tip>
      </Step>

      <Step title="Run your automation locally" icon="play">
        Test the automation to see it working on your machine.

        Run the following command:

        <CLICommandTabs command={`intuned dev run api book-consultations '{"name": "Jane Smith", "email": "jane.smith@example.com", "phone": "+1(555)123-4567", "date": "2025-12-10", "time": "14:30", "topic": "web-scraping"}' --auth-session test-authsession`} withOptions={false} />

        **Expected result:** The CLI launches a browser in the background. First, it reruns the `check` API to verify your AuthSession. You'll see it navigate to the booking form, fill in all fields, submit, and verify success. The results appear in your terminal.

        <Expandable title="result of the Run">
          ```json theme={null}
          {
            "result": {
              "success": true,
              "date": "2025-12-10",
              "message": "Consultation successfully booked for 2025-12-10 at 14:30"
            }
          }
          ```
        </Expandable>
      </Step>

      <Step title="Deploy your project" icon="rocket">
        Deploy your automation to Intuned's infrastructure.
        Run the following command to deploy:

        <CLICommandTabs command="intuned dev deploy" withOptions={false} />

        <Note>
          If your project uses environment variables or secrets, configure them in Intuned before deploying. Local `.env` files are only used during local development and are not included in deployments. Set shared values in [workspace environment variables](/main/02-features/environment-variables-secrets#workspace-level-environment-variables) or add them at the project level if they should only apply to this project.
        </Note>

        When prompted, accept creating a test AuthSession. This will create a `test-authsession` AuthSession so you can use for testing.

        **Expected result:** You see deployment progress logs as the CLI deploys your project and creates the test AuthSession. When complete, you'll see:

        ```bash theme={null}
        ✓ Deployment successful
        ```

        Your automation is now live and ready to run.
      </Step>

      <Step title="Test in the Playground" icon="circle-check">
        Now test your deployed authenticated automation through the API Playground.

        1. Navigate to [Playground](https://app.intuned.io/playground) in your browser.
        2. Select your project **book-consultations-authenticated-quickstart** and the API **book-consultations**.
        3. The newly created test AuthSession is selected.
        4. The request body is pre-filled with test parameters. Select **Start Run** to execute.

        <Tip>
          The Playground is just an interactive way to test your deployed automation APIs. Your automation is now callable from anywhere via API—use it from your application, service, or any HTTP client. See the [API Reference](/client-apis/api-reference) for authentication and programmatic usage.
        </Tip>

        <img src="https://mintcdn.com/intuned-dev/afjZxAQhak8dZFgC/assets/quickstart/playground_with_auth.gif?s=2ea89848b0195cd80ddb8e4a883caf1f" alt="Playground RPA run" width="2000" height="1132" data-path="assets/quickstart/playground_with_auth.gif" />

        **Expected result:** The automation executes on Intuned's infrastructure. You'll see the run details, AuthSession validation, and results in real-time.

        Your automation is now deployed and fully operational.
      </Step>
    </Steps>
  </Tab>
</Tabs>

## What's next?

* **[Online IDE](/main/02-features/online-ide)** — Learn more about the Intuned IDE used in this quickstart.
* **[Local development (CLI)](/main/02-features/local-development-cli)** — Learn more about the Intuned CLI used in this quickstart.
* **[Authentication](/main/02-features/auth-sessions)** — Learn more about AuthSessions, how to create them, and best practices for handling authentication in your automations.
* **[Monitoring and traces](/main/02-features/observability-monitoring-logs)** — Every run generates detailed logs, browser traces, and session recordings. Use these tools to debug failures, verify your automation is working correctly, and understand what happened during execution.
* **[Flexible automations](/main/02-features/flexible-automation)** — Build automations your way. Write deterministic code, use AI-driven extraction, or combine both in a hybrid approach. Use any library or package—Intuned is unopinionated by design.
* **[Intuned Agent quickstart](/main/00-getting-started/quickstarts/intuned-agent)** — You can write your automation logic manually like in this quickstart, or use Intuned Agent to generate automations from a prompt and schema. Intuned Agent can also help you update existing automations, fix failed runs, and iterate on your code faster.
* **[Cookbook](/main/01-learn/cookbook)** — Browse full working examples of automations and scrapers. Each example includes complete code you can use as a starting point for your own projects.
