Chapter 20

Secrets and connected services

Store the logins your automations use in Secrets, and connect Google, Slack, GitHub and other APIs. That way, no password or key ever sits in a script or a run input.

20.1Secrets: logins for your automations

Many automations sign in to another website before they do their work. Secrets is where your organization stores those logins: the username, the password, and the authenticator key if the site asks for a one-time code. An automation reads the login it needs at the moment it runs.

Open it from Menu, then Secrets. The page says what it holds: "Login accounts an automation can use to sign in, plus saved details for the forms it fills."

Use Secrets every time an automation needs a credential. Never type a password, an API key or a one-time code into any of these places:

  • a run input or the automation's default values
  • the automation's script, name or description
  • a Teach description, a chat with the AI, or a comment for a teammate

Anything typed there is stored as ordinary text that teammates can read. Run inputs also appear in the grid and in results. A password an automation reads from Secrets is kept out of the run's prompts, logs and report.

Store it in What it is for
Secrets, Add account A username and password, with or without an authenticator key, that an automation types into a website.
Secrets, Saved details Names, addresses, phone numbers, member numbers, API keys and ID numbers an automation types into forms.
Organization, Integrations Google Sheets, Google Drive, Google Calendar, Slack and GitHub, connected with the service's own sign-in.
Organization, HTTP connections An API key or token for any other web API that a script calls by name.

Important

Secrets belong to the organization, not to you. Every automation in the organization can sign in with every login listed, whoever started the run. Store only logins your organization is allowed to use.

Secrets is not for your own Autoworklet password or two-factor codes. Those live on your profile (see Two-factor authentication).

You can also save a login without opening this page. When you add a ready-made automation that needs a login, the dialog saves it to Secrets for you (see Save a login while you add). Scripts read a stored login by its website and username (see Use saved logins and one-time codes).

20.2Add a login

Add a login when an automation has to sign in to a site. Also add one when you change the password of a login that an automation already uses.

  1. Open Menu, then Secrets.
  2. In the Add account box, click Add an account. The form opens and the button changes to Cancel.
  3. In Website / service 1, type the site, for example github.com.
  4. In Username / email 2, type the account name the site expects. The website and username must match what the automation asks for. Use the same spelling that the automation or its builder gave you.
  5. In Password (optional) 3, type the password. If the site signs in with a one-time code only, leave it blank.
  6. Optionally, type a Description (optional) 4, for example "shared ops account", so teammates know what the login is for.
  7. If the site asks for an authenticator app code, select how to add its key next to MFA 5:
    • QR / URI: paste the otpauth:// address into OTP Auth URI (otpauth://...). Or click Upload QR Image and select a screenshot of the site's QR code. Or click Scan with Camera and point your camera at the QR code. A pasted address or a QR code also fills Website / service and Username / email when they are empty.
    • Manual seed: paste the key the site shows into TOTP secret (Base32).
    • None: the site has no authenticator code.
  8. Click Save account 6. The button turns on when Website / service and Username / email are filled and there is a password or an authenticator key.
The Add account form in Secrets, open and not filled in yet
Figure 20.1The Add account form in Secrets, open and not filled in yet

The login appears in the Accounts list below the form, with its password shown as dots.

To change a stored password, add the same website and username again with the new password. The new password replaces the old one. Type the description again too, or it is cleared.

Tip

To set a new, strong password on a site, click Password generator 7 before you save. Set Length (8 to 128 characters, 16 by default).

Include symbols and Exclude ambiguous are selected by default. If the site does not accept symbols, clear Include symbols. Then click Generate. The password fills the Password (optional) field. Change the password on the website itself to the same value, then click Save account.

Save details an automation types into forms

Some automations fill in a name, an address, a member number or an API key. For example, they sign up for a service or check out an order. Store those in Saved details at the top of the Secrets page.

  1. In Saved details, click Add details.
  2. Under What are you saving?, select the kind: Person, Address, Business, Membership or account, API key or Other. Each kind shows its own fields.
  3. In Name, type what the details are for, for example billing or shipping. Do not type what they contain. Use letters and numbers joined by single hyphens, up to 64 characters. The automation reads the details by this name.
  4. Fill the fields you need. For something the kind does not cover, click Add a custom field. Type a Field name, select how it is Kept as, and type its Value.
  5. Click Save details.

Each field is kept in one of three ways, shown by the icon next to it:

  • Plain: ordinary text such as a country or a company name.
  • Personal (a lock): hidden from the text of run reports and from run results. The run's screenshots and screen recording still show it, and the automation's AI can see it while it fills a form.
  • Secret (a key): hidden from the AI, from reports and from run results. Engine 0.84.0 and newer also masks it in screen recordings. Nobody can show it again after you save it.

The list shows each saved name, its kind, and the fields it holds, never the values. Copy the line next to a name, for example ui.details("billing"), to give it to whoever builds the automation.

To change saved details, an admin or manager clicks Edit. Show saved values shows the plain and personal fields. A secret field shows Saved: click Replace to type a new value, or Clear to remove it. Then click Save changes.

If an automation calls an API itself, add an HTTP connection instead of an API key here. Then the automation never holds the key (see Register an API key as an HTTP connection).

ID documents, bank accounts and health insurance

Three more kinds hold numbers that the law protects closely: ID document (a passport, driver's licence, national ID, SSN, ITIN or EIN), Bank account and Health insurance.

  • Under Which automations may use this, select the automations that can read the number. Only runs of those automations, as they were when you approved them, can read it.
  • If someone changes and republishes an automation, it shows Changed since approval. Click Re-approve, then Save changes, to approve its new version.
  • Approving an automation asks you to have signed in within the last 5 minutes. If you get a message about signing in again, sign out, sign back in, and save again. Removing an automation does not need this.
  • Nobody can show the number again after you save it, not even an admin.
  • Only automations on engine 0.84.0 or newer can read it, because that engine masks the number in screen recordings.

Save these only for your organization's own numbers or your staff's. If an automation works through many people's records, for example clients' tax IDs, pass each one into its run instead of saving it here.

Payment cards are not stored. If an automation must pay with a card, use a payment provider that gives you a token instead of the card number.

If something goes wrong

Message What it means and what to do
"No OTP QR code found in image" The picture has no readable QR code. Take a sharper screenshot of the code, or use Manual seed.
"Saved details with this name already exist. Edit them, or choose another name." Ask an admin or manager to edit the saved details, or save yours under another name.
"These details changed since you opened them. Reload and try again." Someone else saved a change while you were editing. Click Reload and make your change again.
"Store ID, bank and health-plan numbers in their own kind (ID document, Bank account, Health insurance)" A custom field's name looks like one of those numbers. Use the matching kind instead.
"Payment card numbers and security codes cannot be stored. Use a tokenized payments provider if checkout must charge a card." Remove the card details.
"Saved details are not available in a HIPAA organization" Saved details are turned off in a HIPAA organization because a name or address can be health information.
"Failed to store secret" The login was not saved. Check your connection and click Save account again.

20.3Who can see what

Every member of the organization can open Secrets and see which logins exist. Only admins and managers can read a stored password or code, or remove a login.

Action Member Manager or admin
See the list of logins and saved details Yes Yes
Add a login or saved details Yes Yes
Show a stored password, or the current one-time code No Yes
Drop a password or an authenticator key, or delete a login No Yes
Show the plain and personal fields of saved details, edit them, or delete them No Yes

A member sees the list without the action buttons, and this line above it: "Only admins and managers can show a stored password or code, or remove a login. Automations still sign in with every login listed here."

The Accounts list as an admin sees it: passwords stay hidden until an admin or manager clicks Show
Figure 20.2The Accounts list as an admin sees it: passwords stay hidden until an admin or manager clicks Show

The Accounts list shows each login's site, username, password and authenticator key. A stored password always shows as dots 1. "No password" or "No MFA" means that part is not stored: it was never saved, or an admin or manager dropped it. To add the missing part, click Add next to it. The Add account form opens with that login's website and username filled in, so the new part joins the same row. Use Search accounts... to find a login by site or username.

As an admin or manager, you can use these buttons on each row:

  • To see the password, click Show 2. A copy icon appears next to it. When you are done, click Hide.
  • On a login with an authenticator key, click OTP to see the current one-time code. It shows the code with the seconds it has left, for example "123456 (24s)". The code disappears when it expires.
  • To remove one part of a login that has both, click Drop password or Drop MFA.
  • To remove the whole login, click Delete 3. In the Delete secret dialog, check the site and username in the sentence. Then click Delete in the dialog.

Deleting is immediate. An automation that still uses the login fails when it tries to read it on its next run.

Note

Autoworklet records each time a login is saved, read or deleted. Deleting an organization also deletes all of its Secrets.

20.4Connect Google, Slack and GitHub

Connect a service when an automation, a trigger or a notification needs to work with it directly. The connection uses the service's own sign-in, so Autoworklet holds access you can take back at any time instead of a password.

Only admins and managers can connect or disconnect a service. Members see the cards with the line "Only organization admins and managers can manage integrations."

Card What a connection is used for
Google Sheets "Connect your Google Sheets to read and write data directly from workflows."
Google Drive "Connect your Google Drive to upload, download, and manage files from workflows." Google Drive triggers also need it.
Google Calendar "Connect your Google Calendar to create, update, and monitor events from workflows." Google Calendar triggers also need it.
Slack "Start automations from Slack messages, and send alerts and reports to your Slack channels."
Microsoft Teams "Start automations from messages in your Teams channels, and send them notifications and run results." It connects one team at a time, by a code you send in the team (Connect a Microsoft Teams team).
GitHub "Connect your GitHub account to automate repository operations, issues, and pull requests."

Connect a service

  1. Open Menu, then Organization.
  2. Scroll to Integrations.
  3. On the service's card, click Connect Account 1, or Connect Workspace 2 on the Slack card. The button reads Connecting... while the service's page loads.
  4. Sign in to the service.
  5. Approve the access it lists.
  6. The service sends you back to the Organization page.
The first Integrations cards on the Organization page
Figure 20.3The first Integrations cards on the Organization page

The card now shows a green Connected badge and one row per connected account. Google rows show the Google email, Slack rows show the Slack workspace name, and GitHub rows show the email and the GitHub username. To add a second account, click Connect Another Account or Connect Another Workspace.

Admins and managers also see a switch on each row, next to the word Active or Inactive. The switch only affects notifications: Autoworklet sends no notifications to a Slack workspace while it is Inactive. Scripts and triggers keep using an Inactive account. To stop them, click Disconnect.

When a Slack workspace stops working, its row shows a warning and a Reconnect button instead of the switch. "Autoworklet was removed from this workspace in Slack" means someone removed the app or its access in Slack. "Slack refused Autoworklet's access" means Slack turned down a notification. Until you reconnect, the workspace's triggers start no runs and its alerts are not sent. Reconnect opens Slack's page again. Select the same workspace there, and its triggers and alert channels work again.

Ten days after the app is removed in Slack, Autoworklet deletes that workspace's Slack data, unless you reconnect it first. That data is the connection, its triggers, its alert channels, and the Slack message, names and emails kept in its runs. The runs themselves stay.

After Slack sends you back, the Slack card says how it went:

Message Meaning
"Slack workspace connected." The workspace is connected. The message lists the next steps.
"Slack connection cancelled. Nothing was changed." You cancelled on Slack's page.
"Slack did not finish connecting the workspace." The connection failed. Try again, or contact support.

Connecting a workspace your organization already has refreshes that connection instead of adding a second row.

For the triggers and alerts that use these connections, see The Triggers tab, Slack, Microsoft Teams and Telegram and Notifications.

Connect a Microsoft Teams team

Microsoft Teams connects one team at a time. You add the Autoworklet app to the team in Teams, then send it a one-time code from Autoworklet inside the team. That proves you manage the organization and belong to the team.

  1. Make the Autoworklet app available in Teams. On the Microsoft Teams card, click Download app package. Give the file to your Microsoft 365 admin. The admin uploads it one time for your company. When the card shows Get it from the Teams Store instead, the app is in the Teams Store and needs no upload.
  2. In Teams, add the app to the team, and let it read the team's channel messages when Teams asks. The app posts its connect steps in the team.
  3. On the Microsoft Teams card, click Connect a team. The Connect a Microsoft Teams team dialog shows a message that starts with link.
  4. Click Copy, then paste and send the message in any channel of the team. If the app can only see messages that @mention it, type @ and select the app first. The code works one time and expires after ten minutes. If it expires, click Get a new code.
  5. Autoworklet replies in Teams that the team is connected, and the dialog says Connected.

The card lists each connected team and its state: Connected, "App removed from this team", or "Can't post to this team". To disconnect a team, click Disconnect on its row. Its triggers and alert channels are kept, and work again if you connect the same team later. The app stays in the team until someone removes it in Teams.

Disconnect a service

  1. On the account's row, click Disconnect.
  2. Read the dialog. It says that Autoworklet's access to the account is revoked at the service. It also says that the connection is removed from this organization, and that automations that use it will stop working.
  3. Click Disconnect.

Autoworklet asks the service to cancel its access first, and only then removes the connection. If the service does not confirm, the connection stays and the card shows a red message ending in "The integration was kept; try again."

Tip

Disconnecting GitHub cancels only the access this connection used. Disconnecting Slack cancels Autoworklet's access at Slack only when no other Autoworklet organization uses the same workspace. Otherwise, only this organization's connection is removed. The Autoworklet app can still be listed in your GitHub and Slack settings. Remove it there too if you no longer use it.

The CAPTCHA solver key

Some sites show a CAPTCHA before they let a run continue. If your organization has its own account at 2captcha.com, an admin or manager can add its key so runs solve captchas with that account. The card explains that usage is then billed to you and kept apart from other organizations.

  1. On the CAPTCHA solver card, click Add 2Captcha key.
  2. Paste the key from your 2captcha.com dashboard into API key.
  3. Click Save key. The button reads Verifying... while Autoworklet checks the key with 2captcha.
  4. The card shows "Key verified - 2captcha balance $N.NN." or "Key verified and saved.", a Configured badge and the last four characters of the key.

The key is never shown again. To change it, click Replace key. To remove it, click the trash icon, then Remove.

Warning

Solve captchas only on sites whose owner allows it. Section 9 of the Terms of Service forbids defeating CAPTCHAs and other access controls without the owner's permission (see Acceptable use).

If something goes wrong

Message What it means and what to do
"Could not start Google Sheets authorization. Please try again later." (or the service's name) The service's sign-in page could not open. Try again in a few minutes.
"Could not disconnect this Slack workspace: ..." The service did not confirm. The connection was kept. Click Disconnect again.
"This organization requires two-factor authentication. Set up an authenticator app to continue." Your organization requires two-factor authentication. Turn it on first (see Two-factor authentication).
"2captcha rejected this API key. Check the key in your 2captcha dashboard." Copy the key again from your 2captcha.com dashboard and paste it whole.

20.5HTTP connections

An HTTP connection stores the key for any other web API, such as a payment, shipping or CRM service. A script names the connection, and Autoworklet adds the key to the request when the run calls the API. The key never appears in the script or in the run inputs.

The card calls these "worklet scripts". "Worklet" is the name the developer pages, the API and scripts use for an automation.

Only admins and managers can add, edit or delete connections. Every member sees the list. A member sees "Only organization admins and managers can manage connections." instead of the Add HTTP connection button. Ask an admin or manager to add a connection for you.

  1. Open Menu, then Organization.
  2. Scroll to the HTTP connections card under Integrations.
  3. Click Add HTTP connection.
The Add HTTP connection dialog
Figure 20.4The Add HTTP connection dialog
  1. In Name 1, type the name scripts will use, for example stripe. Use letters and numbers joined by single - or _, up to 64 characters. You cannot rename a connection later, so use the name that your script or developer expects.
  2. In Base URL 2, type the start of the API's address, including https://, for example https://api.example.com.
  3. In Authentication 3, select how the API expects the key:
    • Bearer token: sent as Authorization: Bearer <secret>.
    • Custom header: sent in a header you name. Type it in Header name, for example X-Api-Key.
    • Query parameter: added to the address. Type the parameter in Query parameter name, for example api_key.
    • No authentication: a public API. No secret is stored.
  4. In Secret 4, paste the API key. The field hides what you type.
  5. Click Add connection 5.

The card now lists the connection with its base URL, its authentication type and "Secret stored", and a badge such as "1 configured".

To change the base URL, the authentication or the key, click the pencil next to the connection. To keep the stored key, leave Secret empty. Then click Save changes. To delete a connection, click the trash icon, then Delete. Scripts that use a deleted connection stop working.

For the script side, see Call other APIs from a script.

Warning

Save only the fields you need from a reply. Some APIs send the key back in their reply. A script that saves the whole reply as an output would then store the key where others can read it.

If something goes wrong

Message What to do
"Use letters and numbers joined by single - or _ (for example: my-api or stripe_v2). No spaces, punctuation, doubled separators, or leading/trailing separators." Change the name to match the rule.
The browser says the address is not a valid URL, for example "Please enter a URL." Add https:// to the start of the address.
"A connection named "..." already exists in this organization." Use another name, or edit the existing connection.