Is it possible to send emails with attachments using Atlassian Forge? If so, what implementation approaches are available?
I am looking for a way to generate a file (such as a PDF report) within a Forge app and send it as an email attachment.
Is it possible to send emails with attachments using Atlassian Forge? If so, what implementation approaches are available?
I am looking for a way to generate a file (such as a PDF report) within a Forge app and send it as an email attachment.
Welcome to the Atlassian developer community @VarshaBisht,
Yes, it’s possible, but not with “native” Forge capabilities. There isn’t anything in the runtime libraries or modules that provides email capabilities to a Forge App. Your app would need to utilize a back-end “email as a service” like Twilio SendGrid, Mailgun, or Amazon SES. Attachment handling would be a matter for one of those service implementations.
That said, my recommendation would be to consider keeping the report on Atlassian. You could use Forge Object Store to keep the PDFs, exposing them through a global page. This would open further opportunities to ingest the report into the Teamwork Graph via a connector, to create Smart Links so users can reference reports where they like, and to provide Actions about the reports (maybe “publish” and “expire”) which could be used in Automations. That last option would let admins wire up the reporting into workflow as they see fit, including the ability to send emails. Indeed, these would also decouple the report from PDF as a format, allowing your global page to implement richer, interactive reporting.