Integrating Drupal 8 Webforms Submissions and Rocket Chat
Use Case Wanted form submissions to be posted to a Rocket Chat channel. Drupal 8 Webform has Remote Post Handlers ( Email & Remote Post Handlers section). First learned Rocket Chat API , specially the authentication part, and practiced with PostMan . Once got it working, started the integration. Got stuck on a point where Rocket Chat needed custom headers ( Example Call section) to be sent but Webforms module would require the development of a custom module to address it. Gladly the main developer of Drupal 8 Webforms, Jacob Rockowitz , was kind enough to add custom header capabilities to the module ( this is the issue ). The patch has just been committed and the feature is expected to be available in the next release of Webforms. I had to get the git version to get the patch. It easily worked! Then it was just a matter of: figuring out how to submit a YAML array (Webforms) to a JSON array (RocketChat) for the attachments field of...