Integrating File Attachments in Zoho Flow Email Notifications

Integrating File Attachments in Zoho Flow Email Notifications

Hi,

I would like to be able to send an email once an entry is made in a form, and in this email, I would like to attach a file that has been added to the form using the ImageUpload (or FileUpload) widget.

So, I started by creating a flow that will trigger when an entry is made on my form, and if one of the fields of my form is equal to "Color," then it sends an email to the address entered by the user in the form.

The SendMail widget in Zoho Flow does not natively allow attaching a file to the email, so I came up with the idea of saving the file in Zoho WorkDrive, then retrieving the name and creating a download link that will be sent in the body of the message rather than as an attachment.


My getFileName function is straightforward; it retrieves the filename from the long string returned by the ImageUpload input:



The name is successfully extracted, so I can use it to retrieve the file in WorkDrive. Where it doesn't work is that the flow triggers before the file is stored in WorkDrive, which seems odd to me because if I understand correctly, if an entry is made, the file should already be uploaded to WorkDrive, thus already existing when my flow starts. However, the email I receive returns nothing. However, if the file is already present in WorkDrive, then everything works, and my download link is created successfully. I tried adding "delays" in different places to ensure that the file is indeed in WorkDrive, but it doesn't change anything.

So, I tried another approach with the Send Mail function of Deluge. I created a custom function named SendMail with a boolean return and properties to make it dynamic:


But once again, for the attached file, the problem is that I cannot directly have the file, but only the "path" text as mentioned above.



And in this case, my function returns "false," so I only receive the error email.

I think there is a solution with "InvokeUrl," but I can't seem to understand how it works and how to link it to my form.

Do you have any ideas on how to receive an email from Zoho Flow with an attachment that is a file uploaded by the user?

To understand my goal, I need a creation request form. I have fields for first name, last name, email, and a list field with multiple choices. Depending on the choice, different new fields appear, and some are ImageUploads. Once the form is submitted, based on the first choice in the list, the email will be sent to different people, and it should be possible to download or view the attached file.

Overview of the Flow:



Thank for your help,
Maxime.

    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
                                              • Sticky Posts

                                              • Take control with geofencing: Manage form access based on location

                                                Hello form builders! Location-based data is not just about knowing where your users are—it's about making better decisions. With Zoho Forms, you can now collect your respondents' coordinates and define virtual boundaries, limiting form submissions to
                                              • Introducing Card Forms!

                                                Hello form builders, Zoho Forms is now introducing an elegant, free-flowing fluid design of Card forms that will give your forms a visually appealing look, while avoiding any visual clutter for users who are attempting to answer multiple questions at
                                              • Important update in Zoho Forms: Enhancements for improved email deliverability

                                                Hello, form builders! We would like to inform you about some changes we're making in Zoho Forms to ensure the deliverability of your outbound emails. Changes to Gmail policies Gmail has updated its DMARC policy which quarantines emails sent with gmail.com
                                              • Form language translation in Zoho Forms

                                                Hello everyone, Any business needs to satisfy its customers to gain favorable results, and it's not always easy. Various factors, like culture, education, and economics, can influence how they react to your products and services. When you're looking to
                                              • Enhancing user experience with Audio/Video Upload in Zoho Forms

                                                Hello form builders! Today, interactive forms are an integral part of websites and applications. While text-based inputs serve a variety of purposes, audio and video uploads can open up a world of possibilities for businesses. Imagine you are a talent


                                              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