sendgrid-csharp icon indicating copy to clipboard operation
sendgrid-csharp copied to clipboard

Using templates in Azure Logic Apps

Open freemstr opened this issue 4 years ago • 3 comments

Are there any plans to add an option to use templates with Azure Logic Apps? .NET API takes template ID and object for paramters Same would be great from Azure Logic Apps Thank you.

freemstr avatar Feb 03 '21 16:02 freemstr

No, we do not currently have any plans to add templates as an option. Can you please expand on what we'd need to do to support this use case?

Thanks

eshanholtz avatar Feb 09 '21 00:02 eshanholtz

@eshanholtz

in .NET projects we are able to supply template ID and data (which is effectively JSON) which results in formatted email being sent

For example:

            msg.SetTemplateId(templateguid);
            msg.SetTemplateData(new { 
                body = mailbody, 
                subject = subject, 
                preheader = preheader 
            });

            var code = client.SendEmailAsync(msg)

Same would be great to have in Azure After all, templating is what differentiates SendGrid from using SMTP

From the UX perspective it would likely be an additional optional parameter on the connector for the Template Id

Thank you for looking into it

freemstr avatar Feb 10 '21 15:02 freemstr

If anyone is looking to do this in logic apps image but building the body json could be easier done with a dedicated action

I was not able to find other SendGrid logic apps resources on GitHub so I am posting it here as an idea and a workaround solution.

freemstr avatar Feb 24 '21 07:02 freemstr