Base64 Encoded Webhook Data

Base64 Encoded Webhook Data

I have my merchant services provider (Braintree) sending a webhook to Flow when a disbursement is made. The webhook payload is Base64 encoded, and the Deluge function for decoding doesn't seem to work with the string I have.

The webhook is being sent and received properly. The raw payload data is sent in URL encrypted format, which the receive webhook functionality from Zoho interprets and makes available as a variable as below:
  1. PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPG5vdGlm\naWNhdGlvbj4KICA8a2luZD5jaGVjazwva2luZD4KICA8dGltZXN0YW1wIHR5\ncGU9ImRhdGV0aW1lIj4yMDIxLTA3LTIyVDEzOjU4OjAxWjwvdGltZXN0YW1w\nPgogIDxzdWJqZWN0PgogICAgPGNoZWNrIHR5cGU9ImJvb2xlYW4iPnRydWU8\nL2NoZWNrPgogIDwvc3ViamVjdD4KPC9ub3RpZmljYXRpb24+Cg==\n

Through testing with a B64 decoding tool, I realized that the "\n" separators were interfering with the decoding. So I tried to use the 'remove' Deluge function to eliminate them.

If I execute the function from the Deluge composing window, the \n separators are removed in the output. However, when I put that same function in a Flow and re-send the test webhook, the output of the function still has those "\n" values present.

This seems to be interfering with the zoho.encryption.base64Decode function within Deluge. It can't decode without the "\n" separators removed, but I'm not seeing how using the .remove string function doesn't seem to be the way to remove them.

Any suggestions for how to proceed?

    Access your files securely from anywhere

        Zoho Developer Community




                                  Zoho Desk Resources

                                  • Desk Community Learning Series


                                  • Digest


                                  • Functions


                                  • Meetups


                                  • Kbase


                                  • Resources


                                  • Glossary


                                  • Desk Marketplace


                                  • MVP Corner


                                  • Word of the Day



                                      Zoho Marketing Automation


                                              Manage your brands on social media



                                                    Zoho TeamInbox Resources

                                                      Zoho DataPrep Resources



                                                        Zoho CRM Plus Resources

                                                          Zoho Books Resources


                                                            Zoho Subscriptions Resources

                                                              Zoho Projects Resources


                                                                Zoho Sprints Resources


                                                                  Qntrl Resources


                                                                    Zoho Creator Resources



                                                                        Zoho Campaigns Resources


                                                                          Zoho CRM Resources

                                                                          • CRM Community Learning Series

                                                                            CRM Community Learning Series


                                                                          • Kaizen

                                                                            Kaizen

                                                                          • Functions

                                                                            Functions

                                                                          • Meetups

                                                                            Meetups

                                                                          • Kbase

                                                                            Kbase

                                                                          • Resources

                                                                            Resources

                                                                          • Digest

                                                                            Digest

                                                                          • CRM Marketplace

                                                                            CRM Marketplace

                                                                          • MVP Corner

                                                                            MVP Corner





                                                                              Design. Discuss. Deliver.

                                                                              Create visually engaging stories with Zoho Show.

                                                                              Get Started Now