Gmail send with attachment referencing older node

When using the Gmail send feature, how do I reference a property from a node multiple steps back?

In this workflow, I’m receiving an email with an attachment, and then resending it later.

It works if I have the send immediately after the trigger, but that doesn’t let me get further info. Do I need to do a set style node to create that field/property right before the send node?

Here’s my workflow.

Hey @j0dan,

The normal approach would be to use a merge node to bring the bring the binary data forwards so it would be something like a merge after the If node that joins the Gmail Trigger data to it.

You can also use a code node just before it and do something like…

for (const [index, item] of $input.all().entries()) {
  item.binary = $('Gmail Trigger').itemMatching(index).binary;

return $input.all();


I seem to have the binary data, but the final node says binary data not found. Am I using the merge node correctly?

Here’s the workflow:

Rather than append can you change the merge to Combine and try Merge By Position and see if that works.

1 Like

That did it. Thanks!

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.