email trigger
Hi nocoders, currently I'm having an issue with the email trigger; I've been trying to get the attachment but with no success. I already get the json using:
${(x)body.fields[
attachment-info]}
Do you have any idea how to access to: attachment1 > filename ?
Thankyou in advance!Solution:Jump to solution
Hi @Zarcco, extract the data received from the response of the which you require to an empty script node and then edit the node with the AI to with prompt extract the require data from this json, give the above json as example in the prompt as well.
For using with the dot notation, you'll be require to add
email
variable instead from body, as the body you are referencing it from the request not from the Email Trigger request body. Use this expression. Please note you might encounter while adding this expression in editor, we'll are tracking and will add a fix soon....16 Replies
I tryed this code too but no lucky...
can you try body.fields.attachment1.filename
Hi Henry, thanks for answer my thread, I tried with that code but doesn't work. Here's the console log:
Ok give me one sec!
Also I'm trying to route by editing the email trigger node but in the console doesn't show any data.
here is the full log:
Are you able to hop in this channel, so I can help? https://discord.gg/7FJyEKqJ
yes no problem... in advance, my spoken english is bad haha!
Hey @Gaurav Chadha just making sure I give the team viability on this. Is it possible for us to pull in an actual URL or base64 file from the email trigger node.
@Zarcco is working to pull in the PDF and pass it to an openAI node.
@Zarcco Keep me updated on what the client says and we can drive this to the finish.
Sure Henry, thanks for all your support!
Anytime
Hi, I think I found the issue...
the bracket is wrapped by colons " " because when I try to access to attachment1 using -> attachment-info[0].attachment1
the console print just -> 0: "{"
Did it work?
Hello Henry, thank you for asking but I cannot find a proper solution to remove those extra characters.
Solution
Hi @Zarcco, extract the data received from the response of the which you require to an empty script node and then edit the node with the AI to with prompt extract the require data from this json, give the above json as example in the prompt as well.
For using with the dot notation, you'll be require to add
email
variable instead from body, as the body you are referencing it from the request not from the Email Trigger request body. Use this expression. Please note you might encounter while adding this expression in editor, we'll are tracking and will add a fix soon.