This topic was automatically generated from Slack. You can find the original thread here.
Hi, I’m wondering if this behaviour is normal:
Trigger: new Gmail attachment with certain label
Action 1: (JS) find zip folder attached to email
Action 2: (Gmail Developer) Download zip attachment to tmp using JS return object which has the url
Action 3: (JS) unzip attachment, look for a file starting with VO-ED & download it to tmp/ also return last week number and filename.
Action 4: (gmail developer app) Send email with attachment this is where I’m stuck, I’d like to attach the file found in step 3 to my email, unfortunately when I try to setup the key to the filename using my JS return object property, it doesn’t resolve to the actual filename (see pic).
Action 5 (upload zip folder to Gdrive)
Action 6 (notify on slack)
CCL: I do have the correct file attached to my email, but the filename & extensions are wrong
Custom expressions don’t currently work in object keys, so you’ll need to define the key:value object and pass as a custom expression for that attachments prop.
So in your first screenshot, select the “Enter a custom expression” tab, and either define the object directly in there, or I’d recommend adding a step right before and returning the object you want.
Hi Danny, ok thanks, sorry for the delay but I’m in EU so not the same timezone and I logged out yesterday, didn’t expect the answer to come so quickly!
Tried the custom expression path first, doesn’t seem to work or I’m not setting it up correctly? dynamic variable path get resolved but I get errors
a. when trying with a key value pair I get “ENOENT: no such file or directory, open ‘{’ ”
b. when trying to attach the file directly from tmp I get a “EISDIR: illegal operation on a directory, read”
Now I’ll try to modify the js code from previous action to return an object
→ 2 worked fine, I simply added following code to return object:
Totally independent questions, but did you have any issues setting up the New Attachment Trigger? I set up a polling schedule for every 15 sec to catch a new attachment at 7:00AM daily.
I can trigger with a test email, but by 7:00AM the Gmail event emission does not trigger the workflow.
I’m able to replicate the issue - I’ve opened a bug report here, feel free to follow along!
Michael, I’m not sure what you meant by setting up a polling schedule to catch an attachment at 7:00AM daily - can you clarify your workflow setup? I was able to replicate the trigger not working as expected, by setting up a 15sec polling trigger, and after a while the trigger just stopped emitting new events.
Hi Andrew-- We receive ~10 emails per in this inbox. -I added the “labels” filter and set up a Gmail rule which I agree should be best practice for polling
-I noticed the inbound email was sent to as a “cc” instead of “to” which I’m updating today
I created another 2 workflows to trigger at (1) 7:15 AM EST and (2) every 15 minutes.
The 7:15AM EST appeared successful today, but the 15-min intervals failed to trigger