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

# 自動化

> 繰り返しタスクをスケジュールし、データベースイベントやコネクターの webhook イベントに基づいて関数を自動的にトリガーします

<div className="dev-docs-banner">
  <div className="dev-docs-banner-content">
    <div className="dev-docs-banner-title">
      開発者向けドキュメントを表示しています
    </div>

    <div className="dev-docs-banner-text">
      このドキュメントは、Base44 開発者プラットフォームで作業する開発者向けです。アプリエディタ内の自動化については、<a href="/Building-your-app/Creating-automations">アプリ用の自動化の作成</a>を参照してください。
    </div>
  </div>
</div>

自動化により、[バックエンド関数](/developers/backend/resources/backend-functions/overview)をスケジュールに沿って、データベースイベントに応じて、または接続されたインテグレーションが webhook イベントを送信したときに自動的に実行できます。自動化を使用して、定期的にデータを処理し、エンティティの変更を処理し、外部サービスイベントに反応し、特定のタイミングで一度きりのタスクを実行できます。

各バックエンド関数には複数の自動化を関連付けることができ、関数の `function.jsonc` ファイルで設定します。`entry.ts` または `entry.js` ファイルのみがある場合は、自動化を使用するためにこの設定ファイルを追加する必要があります。[`deploy`](/developers/references/cli/commands/deploy) または [`functions deploy`](/developers/references/cli/commands/functions-deploy) を実行すると、自動化は[関数コードと一緒にアトミックにデプロイ](#deploy-automations)されます。

## 自動化のタイプ

Base44 は 4 種類の自動化をサポートしています:

* **[cron によるスケジュールされた自動化](#cron)**: 正確なスケジュール制御のために cron 式を使用します。
* **[シンプルスケジュールによるスケジュールされた自動化](#simple-schedule)**: cron 式なしで間隔で繰り返しタスクを設定します。
* **[エンティティイベント自動化](#entity-events)**: データベースレコードが作成、更新、または削除されたときに関数をトリガーします。
* **[コネクター自動化](#connector-automations)**: Gmail の新しいメールや Google Drive のファイル変更など、接続されたサービスのイベントにリアルタイムで応答します。

## 共通フィールド

### すべての自動化に共通のフィールド

すべての自動化タイプは、次のフィールドを共有します:

| フィールド           | 型         | 必須  | 説明                                                        |
| --------------- | --------- | --- | --------------------------------------------------------- |
| `type`          | `string`  | はい  | 自動化のタイプ。可能な値: `"scheduled"`、`"entity"`、または `"connector"`。 |
| `name`          | `string`  | はい  | 自動化の一意の識別子。                                               |
| `description`   | `string`  | いいえ | 人間が読める説明。                                                 |
| `function_args` | `object`  | いいえ | トリガー時に関数に渡される引数。[関数引数](#function-arguments)を参照してください。     |
| `is_active`     | `boolean` | いいえ | 自動化が有効かどうか。デフォルトは `true`。                                 |

### スケジュールされた自動化に共通のフィールド

cron とシンプルなスケジュールされた自動化の両方は、これらの追加フィールドを共有します:

| フィールド              | 型        | 必須   | 説明                                                                                                             |
| ------------------ | -------- | ---- | -------------------------------------------------------------------------------------------------------------- |
| `schedule_mode`    | `string` | はい   | スケジュールが繰り返されるかどうか。可能な値: `"recurring"` または `"one-time"`。                                                        |
| `schedule_type`    | `string` | はい   | 使用するスケジューリング方法。可能な値: `"cron"` または `"simple"`。                                                                  |
| `ends_type`        | `string` | いいえ  | 繰り返しスケジュールが停止するタイミング。可能な値: `"never"`、`"on"`、または `"after"`。デフォルトは `"never"`。                                    |
| `ends_on_date`     | `string` | 条件付き | 繰り返しスケジュールが終了する日付 (含む)、UTC。`ends_type` が `"on"` の場合に必要。形式: `YYYY-MM-DDTHH:MM:SSZ`。例: `"2026-12-31T23:59:59Z"`。 |
| `ends_after_count` | `number` | 条件付き | 繰り返しスケジュールが停止する実行回数。`ends_type` が `"after"` の場合に必要。                                                            |

## 自動化の設定

`function.jsonc` ファイルで、以下のアプローチのいずれかを使用して自動化を設定します。すべての自動化は、上記の[すべての自動化に共通のフィールド](#common-fields-for-all-automations)と、各タイプ固有のフィールドを使用します。

### Cron

[すべての自動化に共通のフィールド](#common-fields-for-all-automations)と[スケジュールされた自動化に共通のフィールド](#common-fields-for-scheduled-automations)に加えて、ここにリストされている cron 固有のフィールドを使用します。

正確なスケジュール制御のために cron 式を使用するには、`type` を `"scheduled"`、`schedule_type` を `"cron"` に設定します。

cron 自動化は、標準の 5 フィールド構文を使用します: `minute hour day-of-month month day-of-week`。インタラクティブな cron 式エディタと構文リファレンスについては、[crontab.guru](https://crontab.guru/) を参照してください。

| フィールド             | 型        | 必須 | 説明               |
| ----------------- | -------- | -- | ---------------- |
| `cron_expression` | `string` | はい | 5 フィールドの cron 式。 |

#### Cron の例

この例では、関数を毎日 UTC 真夜中に実行します:

```jsonc theme={null}
{
  "name": "sendDailyReport",
  "entry": "entry.ts",
  "automations": [
    {
      "type": "scheduled",
      "name": "daily_midnight_report",
      "description": "Runs every day at midnight UTC",
      "function_args": { "mode": "full_sync" },
      "is_active": true,

      "schedule_mode": "recurring",
      "schedule_type": "cron",
      "cron_expression": "0 0 * * ?"
    }
  ]
}
```

### シンプルスケジュール

[すべての自動化に共通のフィールド](#common-fields-for-all-automations)と[スケジュールされた自動化に共通のフィールド](#common-fields-for-scheduled-automations)に加えて、ここにリストされているシンプルスケジュールフィールドを使用します。

簡単なスケジューリングニーズには `type` を `"scheduled"`、`schedule_type` を `"simple"` に設定します。

cron 式を書かずに、分、時間、日、週、または月などの間隔で繰り返しタスクを設定できます。

| フィールド                    | 型          | 必須   | 説明                                                                                                                 |
| ------------------------ | ---------- | ---- | ------------------------------------------------------------------------------------------------------------------ |
| `one_time_date`          | `string`   | 条件付き | 自動化が一度実行される日付と時刻、UTC。`schedule_mode` が `"one-time"` の場合に必要。形式: `YYYY-MM-DDTHH:MM:SSZ`。例: `"2026-02-15T10:00:00Z"`。 |
| `repeat_unit`            | `string`   | 条件付き | 繰り返し自動化の時間単位。`schedule_mode` が `"recurring"` の場合に必要。可能な値: `"minutes"`、`"hours"`、`"days"`、`"weeks"`、または `"months"`。 |
| `repeat_interval`        | `number`   | 条件付き | 実行間の間隔。`repeat_unit` が `"minutes"`、`"hours"`、または `"days"` の場合に必要。                                                  |
| `start_time`             | `string`   | 条件付き | 自動化が実行される時刻、UTC。`repeat_unit` が `"days"`、`"weeks"`、または `"months"` の場合に必要。形式: `HH:MM`。                              |
| `repeat_on_days`         | `number[]` | 条件付き | 自動化が実行される曜日。`repeat_unit` が `"weeks"` の場合に必要。曜日番号の配列、`0` が日曜日、`6` が土曜日。                                            |
| `repeat_on_day_of_month` | `number`   | 条件付き | 自動化が実行される月の日。`repeat_unit` が `"months"` の場合に必要。有効な値: `1`-`31`。                                                     |

#### シンプルスケジュールの例

以下の例は、シンプルスケジュールで自動化をスケジュールするさまざまな方法を示しています:

<CodeGroup>
  ```jsonc Every 30 minutes theme={null}
  {
    "type": "scheduled",
    "name": "every_30_minutes",
    "description": "Runs every 30 minutes.",
    "is_active": true,

    "schedule_mode": "recurring",
    "schedule_type": "simple",
    "repeat_unit": "minutes",
    "repeat_interval": 30
  }
  ```

  ```jsonc Weekdays at 9am theme={null}
  {
    "type": "scheduled",
    "name": "weekday_morning_report",
    "description": "Runs at 9 AM Monday through Friday.",
    "is_active": true,

    "schedule_mode": "recurring",
    "schedule_type": "simple",
    "repeat_unit": "weeks",
    "repeat_interval": 1,
    "start_time": "09:00",
    "repeat_on_days": [1, 2, 3, 4, 5],

    "ends_type": "after",
    "ends_after_count": 52
  }
  ```

  ```jsonc One-time execution theme={null}
  {
    "type": "scheduled",
    "name": "one_time_cleanup",
    "description": "Runs once at a specific date and time.",
    "function_args": { "cleanup": true },
    "is_active": true,

    "schedule_mode": "one-time",
    "schedule_type": "simple",
    "one_time_date": "2026-02-15T10:00:00Z"
  }
  ```
</CodeGroup>

### エンティティイベント

[すべての自動化に共通のフィールド](#common-fields-for-all-automations)に加えて、ここにリストされているエンティティイベントフィールドを使用します。

データベースレコードが作成、更新、または削除されたときに関数を自動的にトリガーするには、`type` を `"entity"` に設定します。

エンティティ自動化は、特定のエンティティで 1 つまたは複数のイベントタイプをリッスンできます。

| フィールド         | 型          | 必須 | 説明                                                                    |
| ------------- | ---------- | -- | --------------------------------------------------------------------- |
| `entity_name` | `string`   | はい | 監視するエンティティの名前。                                                        |
| `event_types` | `string[]` | はい | リッスンするデータベースイベント。可能な値: `"create"`、`"update"`、`"delete"`。少なくとも 1 つは必須。 |

#### エンティティイベントの例

以下の例は、エンティティイベントに基づいて関数をトリガーする方法を示しています:

<CodeGroup>
  ```jsonc All order events theme={null}
  {
    "name": "processOrders",
    "entry": "entry.ts",
    "automations": [
      {
        "type": "entity",
        "name": "on_order_changes",
        "description": "Triggered on order create, update, or delete.",
        "function_args": { "notify_slack": true },
        "is_active": true,

        "entity_name": "orders",
        "event_types": ["create", "update", "delete"]
      }
    ]
  }
  ```

  ```jsonc New records only theme={null}
  {
    "type": "entity",
    "name": "on_customer_create",
    "description": "Triggered when a new customer is created.",
    "is_active": true,

    "entity_name": "customers",
    "event_types": ["create"]
  }
  ```
</CodeGroup>

### コネクター自動化

[すべての自動化に共通のフィールド](#common-fields-for-all-automations)に加えて、ここにリストされているコネクター固有のフィールドを使用します。

接続されたインテグレーションが webhook イベントを送信したときに関数をトリガーするには、`type` を `"connector"` に設定します。これらを使用して、外部サービスのアクティビティにリアルタイムで反応します。例えば、新しいメールを解析したり、カレンダーの変更を同期したり、Google Drive のファイル更新に応答したりできます。

[トリガー条件](#trigger-conditions)をオプションで追加して、定義したルールにペイロードが一致する場合のみ関数が実行されるようにイベントをフィルタリングできます。

コネクター自動化が発火すると、関数はイベントタイプ、インテグレーションの詳細、外部サービスからの生データを含む構造化された [webhook ペイロード](#webhook-payload)を受信します。

<Note>
  コネクターは、デプロイ前にプロジェクトで構成され、認可されている必要があります。セットアップ手順については、[共有コネクター](/developers/backend/resources/connectors/shared-connectors)を参照してください。
</Note>

| フィールド                | 型          | 必須   | 説明                                                                                                                                       |
| -------------------- | ---------- | ---- | ---------------------------------------------------------------------------------------------------------------------------------------- |
| `integration_type`   | `string`   | はい   | リッスンするコネクタータイプ識別子。有効な値については、[サポートされるインテグレーション](#supported-integrations-and-events)を参照してください。                                             |
| `events`             | `string[]` | はい   | 購読する 1 つ以上の webhook イベント名。コネクターごとに利用可能なイベントについては、[サポートされるインテグレーション](#supported-integrations-and-events)を参照してください。                        |
| `resource_id`        | `string`   | 条件付き | 自動化を特定のリソースにスコープします。予想される形式はコネクターによって異なります。下記の[リソース ID の形式](#resource-id-formats)を参照してください。Google Drive のファイルスコープイベントに必要。他のコネクターではオプション。 |
| `trigger_conditions` | `object`   | いいえ  | 関数を実行する前に受信イベントに一致する必要があるルール。イベントが一致しない場合、実行はスキップされます。完全なリファレンスについては、[トリガー条件](#trigger-conditions)を参照してください。                             |

#### サポートされるインテグレーションとイベント

| コネクター                | `integration_type` | `events` の値             | 説明                                           |
| -------------------- | ------------------ | ----------------------- | -------------------------------------------- |
| Gmail                | `gmail`            | `mailbox`               | 新しいメッセージ、ラベル更新、既読ステータスの変更を含む、すべてのメールボックスの変更。 |
| Google Calendar      | `googlecalendar`   | `events`                | 作成、更新、削除を含むカレンダーイベントの変更。                     |
| Google Drive         | `googledrive`      | `changes`               | 追加、変更、または削除されたファイルを含む、ドライブ内の変更。              |
| Google Drive         | `googledrive`      | `file`                  | 特定のファイルへの変更 (`resource_id` が必要)。             |
| Google Drive         | `googledrive`      | `file.update`           | ファイルの内容またはプロパティが変更された (`resource_id` が必要)。   |
| Google Drive         | `googledrive`      | `file.trash`            | ファイルがゴミ箱に移動された (`resource_id` が必要)。          |
| Google Drive         | `googledrive`      | `file.untrash`          | ファイルがゴミ箱から復元された (`resource_id` が必要)。         |
| Google Drive         | `googledrive`      | `file.delete`           | ファイルが永久に削除された (`resource_id` が必要)。           |
| Microsoft OneDrive   | `one_drive`        | `updated`               | 作成、変更、削除を含むファイルまたはフォルダの変更。                   |
| Microsoft Outlook    | `outlook`          | `created`               | 新しいメール、カレンダーイベント、または連絡先が作成されました。             |
| Microsoft Outlook    | `outlook`          | `updated`               | メール、カレンダーイベント、または連絡先が更新されました。                |
| Microsoft Outlook    | `outlook`          | `deleted`               | メール、カレンダーイベント、または連絡先が削除されました。                |
| Microsoft SharePoint | `share_point`      | `updated`               | リストアイテムまたはドキュメントが作成、変更、または削除されたとき。           |
| Microsoft Teams      | `microsoft_teams`  | `created`               | 新しいチャットメッセージが投稿されたとき。                        |
| Microsoft Teams      | `microsoft_teams`  | `updated`               | チャットメッセージが更新されたとき。                           |
| Microsoft Teams      | `microsoft_teams`  | `deleted`               | チャットメッセージが削除されたとき。                           |
| Slack                | `slack`            | `message`               | メッセージがチャンネルに投稿されたとき。                         |
| Slack                | `slack`            | `message.im`            | ダイレクトメッセージが投稿されたとき。                          |
| Slack                | `slack`            | `message.groups`        | メッセージがプライベートチャンネルに投稿されたとき。                   |
| Slack                | `slack`            | `message.channels`      | メッセージがパブリックチャンネルに投稿されたとき。                    |
| Slack                | `slack`            | `message.mpim`          | メッセージが複数人 IM に投稿されたとき。                       |
| Slack                | `slack`            | `reaction_added`        | メッセージにリアクションが追加されたとき。                        |
| Slack                | `slack`            | `reaction_removed`      | メッセージからリアクションが削除されたとき。                       |
| Slack                | `slack`            | `member_joined_channel` | ユーザーがチャンネルに参加したとき。                           |
| Slack                | `slack`            | `member_left_channel`   | ユーザーがチャンネルを離れたとき。                            |
| Slack                | `slack`            | `file_shared`           | ファイルが共有されたとき。                                |

<Tip>
  Gmail の `mailbox` イベントは、新しいメッセージだけでなく、すべてのメールボックスの変更で発火します。新しいメールが届いたときのみ関数を実行するには、トリガー条件を追加します: `{ "field": "has_new_messages", "operator": "equals", "value": true }`。
</Tip>

<Note>
  Slack コネクター自動化にはトリガー条件が必要です。Slack コネクター自動化に条件が設定されていない場合、デプロイは失敗します。
</Note>

#### リソース ID の形式

`resource_id` の予想値はコネクターによって異なります:

* **Google Drive:** ファイル ID。ファイルスコープイベント (`file`、`file.update`、`file.trash`、`file.untrash`、`file.delete`) に必要。
* **Gmail:** 監視するラベル ID のカンマ区切りリスト。省略した場合はデフォルトで `"INBOX"`。
* **Microsoft Teams:** 特定のチャンネルを監視するには `{teamId}/{channelId}`、特定のチャットを監視するには `{chatId}`。
* **SharePoint:** 特定のリストを監視するには `{siteId}/{listId}`。

#### トリガー条件

`trigger_conditions` を使用して、定義したルールにペイロードが一致する場合のみ関数が実行されるように webhook イベントをフィルタリングします。条件が設定されていない場合、関数はすべての受信イベントで実行されます。完全な構成については、[コネクター自動化の例](#connector-automation-examples)を参照してください。

<ResponseField name="logic" type="string">
  条件を結合する方法。可能な値: `"and"` (すべて一致する必要があります)、`"or"` (いずれかが一致する必要があります)。デフォルトは `"and"`。
</ResponseField>

<ResponseField name="conditions" type="array" required>
  1 つ以上の条件オブジェクトまたはネストされた条件グループ。最大 20 個の葉条件と 5 レベルのネスト。

  <Expandable title="条件オブジェクトのフィールド">
    <ResponseField name="field" type="string" required>
      webhook ペイロードへのドット区切りパス。例えば、`"status"` は `payload.data.status` を読み取り、`"sender.email"` は `payload.data.sender.email` を読み取ります。
    </ResponseField>

    <ResponseField name="operator" type="string" required>
      フィールド値を比較する方法。

      <Expandable title="サポートされる演算子">
        | 演算子            | 説明                                               |
        | -------------- | ------------------------------------------------ |
        | `equals`       | フィールド値が `value` と完全に一致。                          |
        | `not_equals`   | フィールド値が `value` と一致しない。                          |
        | `contains`     | フィールド値が部分文字列として `value` を含む。                     |
        | `not_contains` | フィールド値が部分文字列として `value` を含まない。                   |
        | `starts_with`  | フィールド値が `value` で始まる。                            |
        | `ends_with`    | フィールド値が `value` で終わる。                            |
        | `gt`           | フィールド値が `value` より大きい。                           |
        | `gte`          | フィールド値が `value` 以上。                              |
        | `lt`           | フィールド値が `value` より小さい。                           |
        | `lte`          | フィールド値が `value` 以下。                              |
        | `in_list`      | フィールド値が `value` (配列) 内のアイテムのいずれか。                |
        | `not_in_list`  | フィールド値が `value` (配列) 内のアイテムのいずれでもない。             |
        | `exists`       | フィールドが存在し、null ではない。`value` は不要。                 |
        | `not_exists`   | フィールドが null または欠落。`value` は不要。                   |
        | `is_empty`     | フィールドが null、空文字列、空配列、または空オブジェクト。`value` は不要。     |
        | `is_not_empty` | フィールドが null、空文字列、空配列、または空オブジェクトではない。`value` は不要。 |
      </Expandable>
    </ResponseField>

    <ResponseField name="value" type="any">
      比較する値。`exists`、`not_exists`、`is_empty`、`is_not_empty` には不要。
    </ResponseField>
  </Expandable>
</ResponseField>

#### Webhook ペイロード

コネクター自動化が関数をトリガーすると、リクエストボディには次の構造の `payload` オブジェクトが含まれます。ペイロードを読み取る関数については、[コネクター自動化の例](#connector-automation-examples)を参照してください。

| フィールド                               | 型         | 説明                                                                      |
| ----------------------------------- | --------- | ----------------------------------------------------------------------- |
| `payload.automation.id`             | `string`  | この実行をトリガーした自動化の ID。                                                     |
| `payload.automation.name`           | `string`  | 自動化の名前。                                                                 |
| `payload.automation.type`           | `string`  | 常に `"connector"`。                                                       |
| `payload.event.type`                | `string`  | webhook イベント名。例: `"mailbox"`、`"events"`、または `"changes"`。                |
| `payload.event.integration_type`    | `string`  | コネクタータイプ。例: `"gmail"` または `"googlecalendar"`。                           |
| `payload.event.provider_identifier` | `string`  | ルーティングに使用されるプロバイダーアカウント識別子。                                             |
| `payload.data`                      | `object`  | 外部サービスからの生の webhook ペイロード。`payload_too_large` が `true` の場合は `null` に設定。 |
| `payload.payload_too_large`         | `boolean` | webhook ペイロードが約 200 KB を超え `data` が `null` の場合に `true`。                 |

#### コネクター自動化の例

<CodeGroup>
  ```jsonc Basic connector automation theme={null}
  // Triggers the function whenever a new email arrives in Gmail.

  {
    "name": "processInboundEmails",
    "entry": "entry.ts",
    "automations": [
      {
        "type": "connector",
        "name": "on_new_gmail",
        "description": "Runs when a new email arrives in Gmail.",
        "is_active": true,

        "integration_type": "gmail",
        "events": ["mailbox"]
      }
    ]
  }
  ```

  ```jsonc Single trigger condition theme={null}
  // Triggers only when a Google Calendar event has status "cancelled".

  {
    "type": "connector",
    "name": "on_event_cancelled",
    "description": "Runs only when a Google Calendar event is cancelled.",
    "is_active": true,

    "integration_type": "googlecalendar",
    "events": ["events"],
    "trigger_conditions": {
      "logic": "and",
      "conditions": [
        { "field": "status", "operator": "equals", "value": "cancelled" }
      ]
    }
  }
  ```

  ```jsonc Nested trigger conditions theme={null}
  // Triggers only for Gmail messages that are both in the inbox and unread.

  {
    "type": "connector",
    "name": "on_unread_inbox_email",
    "description": "Runs only for unread emails in the inbox.",
    "is_active": true,

    "integration_type": "gmail",
    "events": ["mailbox"],
    "trigger_conditions": {
      "logic": "and",
      "conditions": [
        { "field": "labelIds", "operator": "contains", "value": "INBOX" },
        { "field": "labelIds", "operator": "contains", "value": "UNREAD" }
      ]
    }
  }
  ```

  ```typescript Reading the payload theme={null}
  // Reads the structured payload from the request body.

  Deno.serve(async (req) => {
    const body = await req.json();
    const { payload } = body;

    const eventType = payload.event.type;            
    const integration = payload.event.integration_type; 

    if (payload.payload_too_large) {
      console.warn("Webhook payload was too large and was not included.");
      return Response.json({ ok: false, reason: "payload_too_large" });
    }

    const data = payload.data; 
    
    // Your function logic
    console.log(`Received ${eventType} event from ${integration}`, data);

    return Response.json({ ok: true });
  });
  ```
</CodeGroup>

### 関数引数

自動化設定に `function_args` フィールドを含めることで、関数がトリガーされたときにデータを渡すことができます。これは、1 つの関数が異なる動作で複数の自動化を処理する場合に役立ちます。例えば、15 分ごとに増分実行されるが日次でフルシンクを行う同期関数などです。

これらの引数は、リクエストボディを介して関数コード内でアクセスできます。

#### 関数引数の例

この例は、自動化設定に基づいて増分とフルシンクモードの両方を処理する関数を示しています:

<CodeGroup>
  ```typescript Function code theme={null}
  Deno.serve(async (req) => {
    const body = await req.json();
    const args = body.args ?? {};

    // Use the arguments from automation config
    const mode = args.mode ?? "incremental";

    // Your function logic
  });
  ```

  ```jsonc Automation config theme={null}
  {
    "name": "syncData",
    "entry": "entry.ts",
    "automations": [
      {
        "type": "scheduled",
        "name": "incremental_sync",
        "description": "Runs every 15 minutes with incremental mode.",
        "function_args": { "mode": "incremental" },
        "is_active": true,
        "schedule_mode": "recurring",
        "schedule_type": "simple",
        "repeat_unit": "minutes",
        "repeat_interval": 15
      },
      {
        "type": "scheduled",
        "name": "full_sync",
        "description": "Runs daily at midnight with full sync mode.",
        "function_args": { "mode": "full" },
        "is_active": true,
        "schedule_mode": "recurring",
        "schedule_type": "cron",
        "cron_expression": "0 0 * * ?"
      }
    ]
  }
  ```
</CodeGroup>

## 自動化のデプロイ

CLI [`functions deploy`](/developers/references/cli/commands/functions-deploy) コマンドまたは統合 [`deploy`](/developers/references/cli/commands/deploy) コマンドを使用して、自動化付きのバックエンド関数をデプロイします。`functions deploy <names...>` で名前で特定の関数をデプロイできます。

デプロイは関数ごとにアトミックです。関数は、Deno デプロイメントとそのすべての自動化の両方が成功した場合にのみデプロイされたと見なされます。自動化のデプロイに失敗した場合、関数のデプロイ全体がロールバックされます。

デプロイ後、CLI は関数ごとのステータスを表示します: deployed、unchanged、または error。

## ダッシュボードで自動化を管理する

<Warning>
  ダッシュボードで行った変更は、次回 [`functions deploy`](/developers/references/cli/commands/functions-deploy) を実行したときに上書きされます。ダッシュボードとローカルファイル間には双方向同期はありません。ローカルの `function.jsonc` ファイルで定義された自動化が真実の源です。

  自動化を変更したい場合は、ローカルの `function.jsonc` ファイルを更新して再デプロイしてください。実行ログの監視や必要に応じた手動でのトリガーには、ダッシュボードを使用してください。
</Warning>

**Automations** タブの下で Base44 ダッシュボードで自動化を表示・管理できます。ダッシュボードから次のことができます:

* 実行ログと履歴を表示
* テストのために自動化を手動で実行
* 自動化のステータスを監視

## 関連項目

* [Backend Functions](/developers/backend/resources/backend-functions/overview): バックエンド関数について学ぶ
* [`functions deploy`](/developers/references/cli/commands/functions-deploy): 自動化付き関数をデプロイ
* [`deploy`](/developers/references/cli/commands/deploy): すべてのリソースを一度にデプロイ
* [`logs`](/developers/references/cli/commands/logs): 関数ログを表示

<Note>このページは AI を使用して翻訳されました。最も正確で最新の情報については、[英語版](/) を参照してください。 </Note>
