I’ve 2 triggers.
Trigger n.1 lets me create a folder in G Drive.
Trigger n.2 lets me create a PDF from specific mails.
How can I let the PDF from trigger n.2 be downloaded and located in the folder created from Trigger n.1?
I know I need to create 1 trigger = 1 scenario. How can scenario n.2 can read Folder from scenario n.1?
How about doing this:
To achieve this using Integromat, you can use the following modules and workflow:
- Add a “Google Drive” module:
- Configure it with your Google Drive account.
- Set the action to “Create a folder”.
- Map the “Folder Name” field to a suitable value. You can use data from the first trigger, like the email subject or any other desired identifier.
- Add a “Gmail” module:
- Set the trigger to “Watch emails”.
- Configure it to monitor the specific mailbox and apply any necessary filters.
- Ensure you select a specific label, so that only relevant emails trigger the workflow.
- Enable the option to “Include attachments”.
- Add an “Iterator” module:
- Configure it to iterate over each attachment from the emails received in trigger n.2.
- Connect the “Attachments” output from the Gmail module to the “Input” of the Iterator module.
- Inside the Iterator module’s loop, add another “Google Drive” module:
- Set the action to “Upload file”.
- Configure it to upload the current attachment from the Iterator loop.
- Map the “Parent folder” field to the “ID” of the folder created from trigger n.1.
- Optionally, you can specify a location or full file name in the “File Name” field.
- Finally, save and activate the scenario.
Now, whenever trigger n.1 creates a new folder, trigger n.2 will be triggered upon receiving relevant emails. The Iterator module will loop through any attached files in the emails, uploading them to the folder created by trigger n.1.