A story connecting Slack and google spreadsheets

It's pretty easy to just connect slack and google spreadsheets

I will proceed on the assumption that the API of slackbot has already been created,

Click here for how to make slackbot

I will continue to add settings to my_mention.py here.

And this person has written how to get google API. Probably the easiest to understand here ...

Google API and SpreadSheets API settings

After that, just give instructions to chatbot and output

In slackbot @respond_to ('Responds to what you type here') Receives the value using, and the print-like element of chatbot message.reply ('chatbot reply') You can do it here

my_mention.py


@respond_to('output')
def smart_func(message):
    message.reply('As you say')
    worksheet.update_cell(2,1,str('It's cool Mr. Murakami'))

(Worksheet.updata_cell (*, *) is from the gspread library) After that, it feels like outputting to a csv file just by giving instructions.

スクリーンショット 2020-02-01 22.17.05.png

Recommended Posts

A story connecting Slack and google spreadsheets
Get a global IP and export it to Google Spreadsheets
[Google Photo & Slack Photo Bot] A story about making a bot that acquires photos in Google Photos and sends them to Slack.
A story about Python pop and append
A story about Go's global variables and scope
A story about modifying Python and adding functions
A story of trial and error trying to create a dynamic user group in Slack
[AWS GCP exam preparation] Utilize udemy and Google spreadsheets
A story of trying out pyenv, virtualenv and virtualenvwrapper
A story about kindergartens, nursery schools, and children's gardens
A story about reflecting Discord activity in Slack Status
A story linked with Google Cloud Storage with a little ingenuity
Get a participant's username and screen name in Slack
Create a slack bot
The story of creating a database using the Google Analytics API