Step 2 is to save the uploaded files URL to my db (the field type its being saved to is file).
Step 3 is I have a postmark email going out, I want to attach the saved PDF to this email, but when I try and attache the file it looks like something is missing (as seen in pics…
The workflow doesn’t like the expression I am using…
Can you offer any advice, is there something obvious I am not doing?
It seems like you are probably doing it correctly. The only thing you might need to add is ‘converted to list’ at the end. It is expecting a list and you are only sending one file.
Thanks so I have got step one working, downloading a pdf of the webpage to the file manager.
Step 2 is working and I am then saving the file to the file type field in the db!
Step 3, I have an accepted expression (pic below), but then when running the workflow I get an error showing that the file couldn’t be fetched.
The privacy settings on this field type should not affect it being fetched to attach to the email unless there are separate settings for the file manager?
Email error:
Plugin action Postmark - Send email error:
FetchError: request to https://https//s3.amazonaws.com/appforest_uf/f1653644780244x535793004769310000/Candidate%20%20%20|%20Mojo%20Profile failed, reason: getaddrinfo ENOTFOUND https
at ClientRequest. (/var/task/node_modules/node-fetch/lib/index.js:1491:11)
at ClientRequest.emit (events.js:314:20)
at TLSSocket.socketErrorListener (_http_client.js:427:9)
at TLSSocket.emit (events.js:314:20)
at emitErrorNT (internal/streams/destroy.js:92:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
Error: Outer Error (see above for inner error)
at Block.wait (/var/task/u.js:420:34)
at Object.async_fn [as async] (/var/task/index.js:316:35)
at eval (eval at build_function (/var/task/index.js:86:21), :37:39)
at /var/task/index.js:349:23
at run_fn (/var/task/u.js:594:18)
You might be trying to retrieve the PDF before it is done being created. I don’t think you can do the whole pdf creation in one workflow. I think you have to start it, then in the other workflow, save it or email it from there.
@J805 Thanks! Yes I have tried splitting it up in to two different workflows, the file is being successfully converted and saved (I have confirmed this by check in the DB between steps).
Once the file is saved I then press the second button to attach the file but the error appears that the fetch request for the file has failed.
I believe whats going wrong is to do with the other postmark plugin Rich Postmark emails Plugin | Bubble but there is limited documentation on this