---
description: 'Estimated tutorial time: 15 minutes'
---

# How to set up the SDK

You can access the SDK here: [https://github.com/Otomatorg/otomato-sdk](https://github.com/Otomatorg/otomato-sdk)

### Let’s first generate an auth token

Navigate to: [https://otomato-dev-portal.netlify.app/](https://otomato-dev-portal.netlify.app/)

* Connect with a wallet - not social login, as you’ll be blocked at a later stage.
* Please note that you will be asked to sign a blind message. We unfortunately don't have any control on that (Thirdweb’s ERC4337 is the issue). If you are not comfortable with signing a blind message, you can create a new wallet without any funds on it. It is going to work.

<figure><img src="https://113901746-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FARjWU7zlvQKoJ01uqhvs%2Fuploads%2Fn7lfuk4OzsucY9IdhWaM%2FScreenshot%202025-05-22%20at%2010.41.04.png?alt=media&#x26;token=b3e5dd61-f141-41ac-83c8-d1de8b2469f4" alt=""><figcaption></figcaption></figure>

You will then see a page similar to this one. You can copy your auth token.

<figure><img src="https://113901746-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FARjWU7zlvQKoJ01uqhvs%2Fuploads%2FMdvS5NvsGuq5vAU5Rmxa%2FScreenshot%202025-05-22%20at%2010.43.04.png?alt=media&#x26;token=7d677bfd-dd66-4b90-8533-bf7323e478de" alt=""><figcaption></figcaption></figure>

### Setting up the SDK

Now that we have an auth token, we can clone the sdk:

```jsx
git clone <https://github.com/Otomatorg/otomato-sdk>
cd otomato-sdk
npm i
```

Then, create a .env with those information:

```jsx
API_URL=https://api.otomato.xyz/api
AUTH_TOKEN=eyJhbGciOiJFUzI1Ni... //replace with your auth token
```

### Running a workflow

We’ll now run a workflow that sends you an email when the WETH balance of `0xEaFB04B5d4fB753c32DBb2eC32B3bF7CdC7f5144` is above 10 WETH.

* Navigate to `examples/Chains/oasis-weth-balance-trigger.ts` and put your email.
* now, run: `npm run build; node dist/examples/Chains/oasis-weth-balance-trigger.js`

The wallet currently owns more than 10 WETH, which means the workflow will be triggered instantly & you will receive an email a few seconds after having created the workflow.

<figure><img src="https://113901746-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FARjWU7zlvQKoJ01uqhvs%2Fuploads%2FCfBGw0k8jm2JVIX6SaGU%2FScreenshot%202025-05-22%20at%2010.56.40.png?alt=media&#x26;token=5952ccc2-eeca-42b1-90d6-36721b23b742" alt=""><figcaption></figcaption></figure>

Now, if we put 12 as a comparison value:

<figure><img src="https://113901746-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FARjWU7zlvQKoJ01uqhvs%2Fuploads%2FIcl5jTmO0J6sPHYAHen7%2FScreenshot%202025-05-22%20at%2010.59.08.png?alt=media&#x26;token=aa4600c0-42c1-48d7-b9b9-88152e474a37" alt=""><figcaption></figcaption></figure>

The workflow will be actively monitoring the balance & will wait for the condition to be true to send you an email.

### Seeing the execution history in the otomato app

{% hint style="info" %}
This is quite useful to debug Please note that you can also access all those information via the API (SDK integration coming soon)
{% endhint %}

Navigate to [https://app.otomato.xyz](https://app.otomato.xyz)

Connect with the same wallet you used for the dev page. (you don’t need to enter the code & can connect directly, as you’re already registered).

Click on Automation Builder > Execution history

You will then see your two workflows, with one that was executed successfully & one that is still monitoring the balance.

<figure><img src="https://113901746-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FARjWU7zlvQKoJ01uqhvs%2Fuploads%2FXMojygdAgMUWMEnKtFRh%2FScreenshot%202025-05-22%20at%2011.02.18.png?alt=media&#x26;token=992e37cf-7e3a-4edc-b961-dcb9864b3849" alt=""><figcaption></figcaption></figure>
