{
  "openapi": "3.0.1",
  "info": {
    "title": "Morning Brief",
    "description": "Fetch your daily context from Slack, Gmail, Google Calendar, iCal, and Notion — then generate a formatted morning brief via Claude API and deliver it to Slack. Supports up to 3 accounts per integration. Schedule it before you start your day for a fully automated brief in Slack. No code required.",
    "version": "0.1",
    "x-build-id": "3uhfchkgfcKW4n12N"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/intimate_hourglass~morning-brief-prefetcher/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-intimate_hourglass-morning-brief-prefetcher",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/intimate_hourglass~morning-brief-prefetcher/runs": {
      "post": {
        "operationId": "runs-sync-intimate_hourglass-morning-brief-prefetcher",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/intimate_hourglass~morning-brief-prefetcher/run-sync": {
      "post": {
        "operationId": "run-sync-intimate_hourglass-morning-brief-prefetcher",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "hours_lookback": {
            "title": "Hours lookback",
            "minimum": 1,
            "maximum": 168,
            "type": "integer",
            "description": "How many hours back to fetch messages and emails. Default is 24 (daily brief). Use 48 to catch up after a weekend.",
            "default": 24
          },
          "slack_1_label": {
            "title": "Account label",
            "type": "string",
            "description": "A name for this account, used to identify it in the output (e.g. personal, work).",
            "default": "personal"
          },
          "slack_1_token": {
            "title": "Bot or user token",
            "type": "string",
            "description": "Starts with xoxb- (bot) or xoxp- (user). Only user tokens support mention search."
          },
          "slack_2_label": {
            "title": "Account label",
            "type": "string",
            "description": "A name for this account (e.g. work)."
          },
          "slack_2_token": {
            "title": "Bot or user token",
            "type": "string",
            "description": "Starts with xoxb- (bot) or xoxp- (user)."
          },
          "slack_3_label": {
            "title": "Account label",
            "type": "string",
            "description": "A name for this account."
          },
          "slack_3_token": {
            "title": "Bot or user token",
            "type": "string",
            "description": "Starts with xoxb- (bot) or xoxp- (user)."
          },
          "google_1_label": {
            "title": "Account label",
            "type": "string",
            "description": "A name for this account (e.g. work, personal).",
            "default": "work"
          },
          "google_1_client_id": {
            "title": "Client ID",
            "type": "string",
            "description": "From Google Cloud Console → APIs & Services → Credentials. Ends in .apps.googleusercontent.com"
          },
          "google_1_client_secret": {
            "title": "Client secret",
            "type": "string",
            "description": "From the same OAuth client in Google Cloud Console."
          },
          "google_1_refresh_token": {
            "title": "Refresh token",
            "type": "string",
            "description": "Generated by running google_auth_setup.py and authorizing in the browser."
          },
          "google_1_calendar_ids": {
            "title": "Calendar IDs (one per line)",
            "type": "string",
            "description": "Which calendars to fetch events from. Use 'primary' for your main calendar. Find other IDs in Google Calendar → Settings → specific calendar → Calendar ID.",
            "default": "primary"
          },
          "google_1_fetch_gmail": {
            "title": "Fetch Gmail",
            "type": "boolean",
            "description": "Fetch unread emails from the last N hours.",
            "default": true
          },
          "google_1_fetch_calendar": {
            "title": "Fetch Calendar",
            "type": "boolean",
            "description": "Fetch events for today and tomorrow.",
            "default": true
          },
          "google_2_label": {
            "title": "Account label",
            "type": "string",
            "description": "A name for this account (e.g. personal)."
          },
          "google_2_client_id": {
            "title": "Client ID",
            "type": "string",
            "description": "From Google Cloud Console → APIs & Services → Credentials. Ends in .apps.googleusercontent.com"
          },
          "google_2_client_secret": {
            "title": "Client secret",
            "type": "string",
            "description": "From the same OAuth client in Google Cloud Console."
          },
          "google_2_refresh_token": {
            "title": "Refresh token",
            "type": "string",
            "description": "Generated by running google_auth_setup.py and authorizing in the browser."
          },
          "google_2_calendar_ids": {
            "title": "Calendar IDs (one per line)",
            "type": "string",
            "description": "Which calendars to fetch events from. Use 'primary' for your main calendar.",
            "default": "primary"
          },
          "google_2_fetch_gmail": {
            "title": "Fetch Gmail",
            "type": "boolean",
            "description": "Fetch unread emails from the last N hours.",
            "default": true
          },
          "google_2_fetch_calendar": {
            "title": "Fetch Calendar",
            "type": "boolean",
            "description": "Fetch events for today and tomorrow.",
            "default": true
          },
          "google_3_label": {
            "title": "Account label",
            "type": "string",
            "description": "A name for this account."
          },
          "google_3_client_id": {
            "title": "Client ID",
            "type": "string",
            "description": "From Google Cloud Console → APIs & Services → Credentials. Ends in .apps.googleusercontent.com"
          },
          "google_3_client_secret": {
            "title": "Client secret",
            "type": "string",
            "description": "From the same OAuth client in Google Cloud Console."
          },
          "google_3_refresh_token": {
            "title": "Refresh token",
            "type": "string",
            "description": "Generated by running google_auth_setup.py and authorizing in the browser."
          },
          "google_3_calendar_ids": {
            "title": "Calendar IDs (one per line)",
            "type": "string",
            "description": "Which calendars to fetch events from. Use 'primary' for your main calendar.",
            "default": "primary"
          },
          "google_3_fetch_gmail": {
            "title": "Fetch Gmail",
            "type": "boolean",
            "description": "Fetch unread emails from the last N hours.",
            "default": true
          },
          "google_3_fetch_calendar": {
            "title": "Fetch Calendar",
            "type": "boolean",
            "description": "Fetch events for today and tomorrow.",
            "default": true
          },
          "ical_1_label": {
            "title": "Account label",
            "type": "string",
            "description": "A name for this calendar feed (e.g. work, personal).",
            "default": "work"
          },
          "ical_1_urls": {
            "title": "iCal URLs (one per line)",
            "type": "string",
            "description": "One or more iCal feed URLs. Each URL fetches one calendar. All events are merged into a single list for this account."
          },
          "ical_2_label": {
            "title": "Account label",
            "type": "string",
            "description": "A name for this calendar feed."
          },
          "ical_2_urls": {
            "title": "iCal URLs (one per line)",
            "type": "string",
            "description": "One or more iCal feed URLs."
          },
          "ical_3_label": {
            "title": "Account label",
            "type": "string",
            "description": "A name for this calendar feed."
          },
          "ical_3_urls": {
            "title": "iCal URLs (one per line)",
            "type": "string",
            "description": "One or more iCal feed URLs."
          },
          "notion_1_label": {
            "title": "Account label",
            "type": "string",
            "description": "A name for this Notion workspace (e.g. main, work).",
            "default": "main"
          },
          "notion_1_token": {
            "title": "Integration token",
            "type": "string",
            "description": "Starts with secret_. Found in your integration settings at notion.so/my-integrations."
          },
          "notion_1_database_ids": {
            "title": "Database IDs (one per line)",
            "type": "string",
            "description": "The 32-character ID at the end of a database URL. Open the database in Notion and copy the ID from the browser address bar."
          },
          "notion_1_page_urls": {
            "title": "Page URLs (one per line)",
            "type": "string",
            "description": "Full Notion page URLs. The Actor extracts the page ID automatically. Share each page with your integration first."
          },
          "notion_2_label": {
            "title": "Account label",
            "type": "string",
            "description": "A name for this Notion workspace."
          },
          "notion_2_token": {
            "title": "Integration token",
            "type": "string",
            "description": "Starts with secret_. Found in your integration settings at notion.so/my-integrations."
          },
          "notion_2_database_ids": {
            "title": "Database IDs (one per line)",
            "type": "string",
            "description": "The 32-character ID at the end of a database URL."
          },
          "notion_2_page_urls": {
            "title": "Page URLs (one per line)",
            "type": "string",
            "description": "Full Notion page URLs. The Actor extracts the page ID automatically."
          },
          "notion_3_label": {
            "title": "Account label",
            "type": "string",
            "description": "A name for this Notion workspace."
          },
          "notion_3_token": {
            "title": "Integration token",
            "type": "string",
            "description": "Starts with secret_. Found in your integration settings at notion.so/my-integrations."
          },
          "notion_3_database_ids": {
            "title": "Database IDs (one per line)",
            "type": "string",
            "description": "The 32-character ID at the end of a database URL."
          },
          "notion_3_page_urls": {
            "title": "Page URLs (one per line)",
            "type": "string",
            "description": "Full Notion page URLs. The Actor extracts the page ID automatically."
          },
          "anthropic_api_key": {
            "title": "Anthropic API key",
            "type": "string",
            "description": "Your Anthropic API key (starts with sk-ant-). Required to generate the formatted morning brief. Without this, only raw data is stored."
          },
          "brief_model": {
            "title": "Claude model",
            "type": "string",
            "description": "Claude model used for brief generation. Default: claude-haiku-4-5-20251001 (fast and cheap). Use claude-sonnet-4-6 for higher quality.",
            "default": "claude-haiku-4-5-20251001"
          },
          "brief_slack_channel": {
            "title": "Slack channel or DM to deliver the brief",
            "type": "string",
            "description": "Channel ID or DM ID to post the formatted brief to. Find the ID by right-clicking a channel or DM in Slack → View channel details → copy the ID at the bottom (starts with C for channels, D for DMs). Leave empty to skip delivery."
          },
          "brief_slack_token": {
            "title": "Slack token for delivery (optional)",
            "type": "string",
            "description": "Slack bot or user token to use for posting the brief. Defaults to Slack Account 1 token if left empty."
          },
          "brief_instructions": {
            "title": "Custom brief instructions (optional)",
            "type": "string",
            "description": "Extra instructions appended to the system prompt. Use this to adjust tone, add skip rules, change section focus, or give context about your role. Plain text, no special format needed."
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}