Skip to content

bot to save a pdf uploaded by the user to host computer #266

@mae5357

Description

@mae5357

Hello. I would like to create a bot that can read in an uploaded file (pdf) uploaded by the user and save it to a server (for now on the host computer). I am thinking the files.info method might work, but I am not sure how to get to the specific file. Could you post an example of how to do this?

import os
from slack_bolt import App

app = App(
    token= os.environ.get('SLACK_BOT_TOKEN'),
    signing_secret=os.environ.get("SLACK_SIGNING_SECRET")
)


# # # LISTENING FUNCTIONS # # # 
# This will matc h any message that contains "Hi!"
@app.message("Hi!")
def initial_message_func(message, say):
	say("please upload your pdf")


@app.message("")
def message_to_sam_func(client,message):
    client.file.info(file = file_ID)    #not sure how to get file_ID
                                        

Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you are agreeing to those rules.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions