begin
    CREATE OR REPLACE NETWORK RULE slack_rule
    MODE = EGRESS
    TYPE = HOST_PORT
    VALUE_LIST = ('slack.com');
    
    CREATE OR REPLACE SECRET slack_token
    TYPE = GENERIC_STRING
    SECRET_STRING = '{TOKEN}';
    
    CREATE OR REPLACE EXTERNAL ACCESS INTEGRATION slack_apis_access
    ALLOWED_NETWORK_RULES = (slack_rule)
    ALLOWED_AUTHENTICATION_SECRETS = (slack_token)
    ENABLED = true;
end;