Guides and Examples

Inbox backup to S3 bucket

you can schedule to receive daily dumps of conversations in the inbox from us this is useful if you e g want to routinely analyze your message data, or feed it to your own logging systems for this you will need amazon web services, a s3 bucket, and a user for kindly to use setup user for kindly with s3 permissions step 1 create a s3 bucket (skippable if you already have one) go to the s3 dashboard https //s3 console aws amazon com and click create bucket , go with default settings make sure public access is off step 2 create an iam policy go to the iam dashboard https //console aws amazon com/iam/home?#/policies , and click create a policy go to the json tab, add the following (note the wildcard at the end is needed for allowing all paths within the bucket) { "version" "2012 10 17", "statement" \[ { "sid" "visualeditor0", "effect" "allow", "action" "s3\ putobject", "resource" "arn\ aws\ s3 my bucket/ " } ] } remember to replace my bucket with your actual bucket name step 3 create a group create a group https //console aws amazon com/iam/home?#/groups and attach the policy from step 2 step 4 create a user, and get the public key / private key create a user https //console aws amazon com/iam/home?#/users for kindly to use, it only needs programmatic access, add this user to the group from step 3, skip tags on the success page, copy the access key id (public key), and the secret access key (private key) step 5 use the key pair in kindly navigate to workspace > settings > inbox backup app kindly ai/workspace/\[id]/settings/message backups schedule if enabled in kindly, the job will execute every night it will upload a file for each language in the bot to a path structure like e g yyyy mm dd/inbox (botid) botname locale filepart this file will include norwegian conversations for botname from 12am to 12pm, 31st of aug data payload example payload "data" \[ { "id" "1107ff573fb78f4ffa6666a2", "language code" "en", "taken over" false, "completed takeover" false, "takeover by agent id" 4040, "created" "2023 09 18t07 42 15 265000z", "updated" "2023 09 18t07 42 20 571000z", "messages" \[ { "message" "hi! i'm kindly's chatbot i can answer questions about kindly and our services how can i help you? 🟢\<br>\n\<br>feel free to ask me a question! you can also use one of the buttons below to get started ", "from bot" true, "sender" "bot", "score" null, "created" "2023 09 18t07 42 15 321000z", "exchange id" "c2db8b5d 6386 438c b7ca 00a1cdc969bd", "is followup" false, "exchange type" "greeting", "reply type" "standard", "reply candidates" \[], "suggestions" \[] }, { "message" "how are you?", "from bot" true, "sender" "bot", "score" null, "created" "2023 09 18t07 42 20 526000z", "exchange id" "c83969eb 4486 4612 9d10 d09ee364169c", "is followup" false, "exchange type" "usersays", "reply type" "standard", "reply candidates" \[], "suggestions" \[] } ], "feedback" \[], "context" { " name" "kindly chatbot", " organization name" "kindly chatbot", " web path" "/blog/chatbot faq example", " web host" "www kindly ai", " web url" "https //www kindly ai/blog/chatbot faq example", "some random variable" "some random value", }, "web host" "www kindly ai", "web path" "/blog/chatbot faq example", "labels" \[ { "id" "2g65d747 b644 456e b0a6 0e66c3c2dde9", "name" "support" } ] }, ]