Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions functions/billing/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
# See https://api.slack.com/docs/token-types#bot for more info
BOT_ACCESS_TOKEN = 'xxxx-111111111111-abcdefghidklmnopq'

CHANNEL = 'general'
CHANNEL_ID = 'C0XXXXXX'

slack_client = SlackClient(BOT_ACCESS_TOKEN)

Expand All @@ -56,11 +56,10 @@ def notify_slack(data, context):
notification_data = base64.b64decode(data['data']).decode('utf-8')
budget_notification_text = f'{notification_attrs}, {notification_data}'

res = slack_client.api_call(
slack_client.api_call(
'chat.postMessage',
channel=CHANNEL,
channel=CHANNEL_ID,
text=budget_notification_text)
print(res)
# [END functions_billing_slack]


Expand Down