Trigger Attachments Table
Hello,
The costumer will send 2 email files and when he sends the email, the bot will start.
So I would like to know how can I get the links from the file? Because i saw that we can get the trigger attachments output where we have the Column file that storage the link, but I don't know how i can get this output.
Best Answer
-
@Leonardo_186052 - if you have an email trigger configured, you will automatically have a table as a standard output of
Trigger attachments
.You'll want to use the below two actions to get the file itself out of the
Trigger attachments
table (assumption here is that I'm trying to retrieve a PDF specifically):- Action Type: Tables: Look up data in a column
- Data table: {{trigger-attachments}}
- Lookup column name: Extension
- Search term: pdf
- Output field prefix: extract-pdf
- Action Type: Text: Find text next to other text
- Text to search: {{extract-pdf--file}}
- Start type: after-text
- Start value: https://[insertteamnamehere].pushbot.com/v1/teams/[insertteamnamehere]/files/
- End type: before-text
- End value: /download
- Output field prefix: pdf-file-id
Then you can use the output from step 2 for the file
{{pdf-file-id--first-match}}
Hope that helps!
5
Answers
-
Hi @Meghan_904209,
Thank you for help.1 -
Hi @Meghan_550057 ,
This was really helpful in my build! One question, though: How can I then find the field reference once I identify the attachment I need? I've found the PDF file, I now need to extract the text, but I don't know how to refer to the file I've found, because the field reference isn't isolated in the table. Considering how critical field references are to the core of building in Catalytic, I would think they would be readily available.
Thanks!0 -
Hi @Anna_272419 ,
Thank you for your message!In the output of Step 1 from what Meghan shared there should be a field named {{extract-pdf--file-value}}. For this field to be available, Columns to return should be blank in the Tables: Look up data in a column action.
This field can be used in a PDF: Extract text to a field action to extract the text from the PDF file. Let me know if this helps and if you have any other questions.
0 -
Hi @Kalin_126161 ,
Thanks so much for your response! I tried following your steps, but receive an invalid handlebar reference error when testing. The instance doesn't show {{extract-pdf--file-value}} as an available field:
[IMAGE REDACTED]
Is it something that I'm doing wrong, or is the field just missing?
Thanks!
0 -
Hi @Anna_272419 ,
Thank you for your update! I will reach out via email to see if we can schedule a time to connect and walk through this together in greater detail.
Thank you!0