Create a bot executor job
import botfleet
botfleet.api_key = "YOUR_API_KEY"
botfleet.BotExecutorJob.create(
bot_id="15d19ca3-26f1-4adb-9cea-3955b73d9b4e",
payload={"foo": "bar"},
)
Returns a BotExecutorJob
object.
By creating a bot executor job, bot with given bot_id
will be executed. payload
is an optional parameter that can be used to pass data to the bot. The bot can access the payload via the request
parameter:
def main(request, store):
print(request.payload["foo"]) # prints "bar"