Skip to content

Commit

Permalink
Merge branch 'main' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
Kholid060 authored Aug 29, 2023
2 parents 70ee186 + aaf488c commit 73d413d
Show file tree
Hide file tree
Showing 6 changed files with 635 additions and 639 deletions.
26 changes: 8 additions & 18 deletions docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
import 'dotenv/config';
import { defineConfig } from 'vitepress';
import { createWriteStream } from 'node:fs';
import { resolve } from 'node:path';
import { SitemapStream } from 'sitemap';
import dotenv from 'dotenv';

dotenv.config();

const links: { url: string; lastmod: number | undefined }[] = [];

Expand Down Expand Up @@ -32,13 +27,10 @@ const config = defineConfig({
url: pageData.relativePath.replace(/\.md$/, '.html'),
lastmod: pageData.lastUpdated
})
},
buildEnd: ({ outDir }) => {
const sitemap = new SitemapStream({ hostname: 'https://docs.automa.site/' })
const writeStream = createWriteStream(resolve(outDir, 'sitemap.xml'))
sitemap.pipe(writeStream)
links.forEach((link) => sitemap.write(link))
sitemap.end()
},
sitemap: {
hostname: 'https://docs.automa.site/',
lastmodDateOnly: false
},
themeConfig: {
nav: [
Expand All @@ -49,7 +41,6 @@ const config = defineConfig({
apiKey: process.env.SEARCH_API_KEY,
appId: process.env.SEARCH_APP_ID,
indexName: process.env.SEARCH_INDEX_NAME,
buttonText: 'Search docs',
},
sidebar: {
'/': [
Expand All @@ -62,7 +53,7 @@ const config = defineConfig({
},
{
text: 'Workflow',
collapsible: true,
collapsed: false,
items: [
{ text: 'Overview', link: '/workflow/overview' },
{ text: 'Running a Workflow', link: '/workflow/running-a-workflow' },
Expand All @@ -83,7 +74,6 @@ const config = defineConfig({
},
{
text: 'Blocks',
collapsible: true,
collapsed: true,
items: [
{
Expand Down Expand Up @@ -352,7 +342,7 @@ const config = defineConfig({
},
{
text: 'Reference',
collapsible: true,
collapsed: false,
items: [
{ text: 'Storage', link: '/reference/storage' },
{ text: 'Packages', link: '/reference/packages' },
Expand All @@ -363,7 +353,7 @@ const config = defineConfig({
},
{
text: 'Integrations',
collapsible: true,
collapsed: false,
items: [
{ text: 'Google Drive', link: '/integrations/google-drive' },
]
Expand Down
2 changes: 2 additions & 0 deletions docs/blocks/blocks-group.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@ title: Blocks Group

Groups other blocks together inside one container, this way you can make the workflow look more organized.

The blocks inside the Blocks Group are executed sequentially based on the order of the block from top to bottom.

![Group](https://res.cloudinary.com/chat-story/image/upload/v1642321333/automa/chrome_wH5Q79djOe_wlbudv.png)
10 changes: 9 additions & 1 deletion docs/blocks/insert-data.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,12 @@ Inside the value text field, you can either input the absolute path of the file
- `https://example.com/files/document.pdf`
- `https://example.com/words.txt`

![import file content](https://res.cloudinary.com/chat-story/image/upload/v1662970548/automa/insner_2_mrslmt.png)
![import file content](https://res.cloudinary.com/chat-story/image/upload/v1662970548/automa/insner_2_mrslmt.png)

## Inserting Multiple Table Rows
To insert multiple table rows into a column, separate each value with a double vertical bar (`||`). For example:

```
value 1 || value 2 || value 3
```
![multiple rows](https://res.cloudinary.com/chat-story/image/upload/v1693202468/automa/fieqmvqf5kb5seudggp4.png)
50 changes: 49 additions & 1 deletion docs/workflow/settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,52 @@ It contains the following settings:
It contains the following settings:

- **Block delay**: Add delay before executing each of the blocks
- **Tab load timeout**: Maximum time to load tab in milliseconds
- **Tab load timeout**: Maximum time to load tab in milliseconds

## 4. Workflow Events

Workflow events allow you to perform actions when an event occurs within the workflow.

### Available Events
- **Finish (success)**: Fires when the workflow finishes executing with success status.
- **Finish (failed)**: Fires when the workflow finishes executing with failed.

### Available Actions
- **HTTP Request**: Send an HTTP request
- **Execute JS Code**: Execute JavaScript code

### Available Data

You can access data like the workflow logs, status, error message, etc. using the `workflow` keyword inside an expression or `automaRefData` function within the action.

**Data Type**
```ts
interface Workflow {
status: "success" | "error";
logs:
| {
type: "error" | "success";
description: string;
name: string;
blockId: string;
timestamp: number;
activeTabUrl: string;
duration: number;
id: number;
}[]
| null;
errorMessage: string | null;
}
```

**Examples**
```js
// Expression
{{ workflow.logs }}

// automaRefData
console.log(automaRefData('workflow', 'logs'))
console.log(automaRefData('workflow', 'status'))
```

![Workflow data](https://res.cloudinary.com/chat-story/image/upload/v1693204373/automa/Screenshot_2023-08-28_143223_swcorv.png)
11 changes: 6 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@
"docs:build": "vitepress build docs",
"docs:serve": "vitepress serve docs"
},
"type": "module",
"devDependencies": {
"dotenv": "^16.0.3",
"sitemap": "^7.1.1",
"typescript": "^4.9.3",
"vitepress": "^1.0.0-alpha.29",
"vue": "^3.2.45"
"@types/node": "^20.5.7",
"dotenv": "^16.3.1",
"typescript": "^5.2.2",
"vitepress": "^1.0.0-rc.8",
"vue": "^3.3.4"
},
"dependencies": {
"v-remixicon": "^0.1.4"
Expand Down
Loading

0 comments on commit 73d413d

Please sign in to comment.