Hi Everyone,
i’m having a very weird error when trying to use the @MailerSend API.
i’ve setup my API Connector and call accordingly to this setup : Using MailerSend for transactional emails - #2 by MailerSend
If i use this payload :
{ "from": { "email": "hello@hyperplugs.com", "name": "Hyperplugs" }, "to": [{ "email": "guillaume@guillaumemaison.fr", "name": "Guillaume Maison" }], "subject": "[Hyperplugs] a New Request has been added", "variables": [{ "email": "guillaume@guillaumemaison.fr", "substitutions": [{ "var": "user.firstname", "value": "Guillaume" }, { "var": "request.link", "value": "https://hyperplugs.com/" }, { "var": "account.name", "value": "Hyperplugs" }, { "var": "support_email", "value": "support@hyperplugs.com" }, { "var": "user.profile", "value": "https://hyperplugs.com/" }] }], "template_id": "my_template_id" }
to initialize the call, everything runs fine and i receive the email.
But if i use the API call in a workflow (a scheduled backendworkflow), i receive an error message as a response :
422 Unprocessable Entity "{\""message\"":\""The to field is required. (and 5 more errors)\"",\""errors\"":{\""to\"":[\""The to field is required.\""],\""from.email\"":[\""The from.email field is required.\""],\""subject\"":[\""The subject field is required.\""],\""text\"":[\""You must provide one of html, text or template_id.\""],\""html\"":[\""You must provide one of html, text or template_id.\""],\""template_id\"":[\""You must provide one of html, text or template_id.\""]}}"
and people at @MailerSend tell me that i send an empty body (ie the payload above isn’t sent).
It seems that if the call is triggered by Initializing it, it works, but if trigger from a Workflow, it doesn’t send the JSON body …
Does anyone has already had that same problem ?
Thanks for any hint !