GoogleCloudPlatform / dialogflow-integrations

Dialogflow integrations with multiple platforms including KIK, Skype, Spark, Twlio, Twitter and Viber
https://cloud.google.com/dialogflow/
Apache License 2.0
256 stars 503 forks source link

Support for other content types in Twilio integration #17

Closed diamondobama closed 4 years ago

diamondobama commented 4 years ago

Twilio accepts location and media sharing from a platform like WhatsApp. When this content comes in, the body.Body parameter is left empty and additional parameters are added for these content types. Dialogflow however, can't process an empty body content, hence the request fails.

For this purpose, if location is shared, we should pass geoLocation in the body parameter; if it's any other media type, we get the type from MediaContentType0 and pass that.

Then, on Dialogflow side, we process this information by providing training data that matches e.g. geolocation, image/jpeg, audio/mp3, application/pdf...etc. And we read additional information through the fulfillment in req.originalDetectIntentRequest.payload e.g. req.originalDetectIntentRequest.payload.MediaUrl0.

googlebot commented 4 years ago

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

:memo: Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

diamondobama commented 4 years ago

@googlebot I signed it!

On Fri, Feb 14, 2020 at 1:28 PM googlebot notifications@github.com wrote:

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.

What to do if you already signed the CLA Individual signers

Corporate signers

ℹ️ Googlers: Go here https://goto.google.com/prinfo/https%3A%2F%2Fgithub.com%2FGoogleCloudPlatform%2Fdialogflow-integrations%2Fpull%2F17 for more info.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/GoogleCloudPlatform/dialogflow-integrations/pull/17?email_source=notifications&email_token=ABXOUQ5UILN3LUKEKMBFTLLRCZ56LA5CNFSM4KVGHVG2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOELYQISQ#issuecomment-586220618, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABXOUQZWPJIFOQBWRKLJE5TRCZ56LANCNFSM4KVGHVGQ .