TeamDesk Knowledge Base & Support

   Home      FAQ      Forum      Idea Exchange      Ask a Question      My Stuff      Help   
  
How to pass a document (image) in an API Call from TeamDesk to a third party service ?
Hello to you all

I am trying to use an OCR service to analyse receipts and invoices (I am trying TAGGUN).
I do not know how to send the File Attachment to TAGGUN.
https://api.taggun.io

TAGGUN, as most services I expect, accepts:
- files transmitted in FORM format
- base64 encoded files in JSON format
- URL addresses of images.

I know how to make it work using URL adresses of images ... if I accept to give the TeamDesk field a public access, which is not entirely satisfying. I can place the image in a Teamdesk public file for a couple of seconds, then remove it, but it seems there should be a simpler way.

Could you give me an example of instruction transmitting a file in FORM format or in JSON format ?

Thanks for your attention

Pierre
ID
1401
Category
Integration/API
Author

Pierre
Date Created
12/12/2020 8:03:01 AM
Date Updated
12/14/2020 9:39:59 AM
Comments
Slava Shinderov  Staff  12/14/2020 6:55:24 AM
@Pierre currently only "URL addresses of images" is possible if we're talking about Call-URL action.
Pierre 12/14/2020 7:08:06 AM
Good Morning Slava

Thanks again for your answer.

URL works with two issues - I have a question for the second issue
1) the confidentiality (I can live with it)
2) the image is available too late in TeamDesk via URL:
- I create a record (from the mailbox) with the image
- immediately after, I send a request with the image in URL to the third party service
- the third party service tells me he has not access to the image
- If I try again a few seconds later (with the same request), it works
- I conclude that I need to wait a little bit before I send my request to the third party service until the image is ready.

Is there a way to delay an action in TeamDesk
- Either to wait for a few seconds
- Either to have my request run a few seconds after the creation of the record

The Time-Dependent Triggers would be nice but it deals with days and not with minutes

Kind regards,

Pierre

Slava Shinderov  Staff  12/14/2020 7:14:51 AM
@Pierre if you're working from record change trigger then while transaction is not complete you can't access to the record data via external url.
Please consider using time-dependent trigger with 0 days after/before [Date Modified].
Usually it will be executed with 3-5 minutes delay.
Pierre 12/14/2020 9:39:59 AM
@Slava : Thanks one more time - it works very well now :-)
Feedback
Back to Search Results