iOS shortcut from share sheet fails

I have created a shortcut to convert PDF receipts to JPG and save to Photos so that I can upload them to my health insurer (annoying). I activate this from the share sheet of the relevant doc within DTTG: https://www.icloud.com/shortcuts/af564b6bb1154ca78a6565ac1794a262

Unfortunately, the shortcut does not save any JPG to the Photos app when I run this from DTTG. It does work from the Apple Files app, which means I have to save the receipts to Files, then run the shortcut from there! This negates the value of DTTG altogether (in this respect).

Any solutions or thoughts? I look forward to hearing from you.

The shortcut appears incomplete.

Hi Jim,

The issue is with the first part, where an image is extracted from the PDF, then saved to Photos. I don’t know whether DTTG is allowing the first step, but no image is added to Photos.

The reason the shortcut might appear incomplete is because, firstly, the “open app” step is to open my health insurance app, and secondly, the last copy to clipboard step was intended to pass on a time stamp to another shortcut that can then delete the images after I’ve submitted them to the insurer (I couldn’t work how to have the shortcut wait until I’d uploaded the images and then ask me if I was ready to delete them).

Thanks for your reply, and let me know if you have any further questions.

I can’t reproduce this.
I’d suggest you extend the shortcut for “debugging” purposes to e.g. a “Get Type” Step at the beginning and use a quick look action to see which type was handed over to the shortcut. Additionally add a “Quick Look” Step after the Convert step to see the resulting image.

Either you’re PDFs aren’t handed over as PDFs to shortcuts, or your documents fail to convert.

Good idea Floh, thanks. I’ve done what you’ve suggested. I’ve attached a screen shot of the error, and one of the successful pass with the same PDF in Files.

Can you verify that the type of the document you are sharing in the share sheet is referenced as „PDS document“

Yes, it is a PDF doc, if that’s what you mean.

Is the DEVONthink App providing a PDF file in the sharesheet. You can see in my screenshot, where I shared a PDF document, that below the title of the document, the iOS Sharesheet shows “PDF-document”.

Also I’m not sure, are your screenshots from one single test, or did you test a PDF from the files app, and a PDF from DEVONthink?
Did the “Get Type” Action always return “PDF”?

Hi Floh, I only tested it once. The top screenshot is from the Files app, which works, the bottom is from the DTTG attempt, where the Get Type said it hadn’t received anything.

Spooky

thats why I asked you if you can look to the part which is not censored in my screenshot.
When you share the PDF from DTTG, what type is the sharesheet receiving?

another thing you can try:
do you have the same issue with more pdf files or just the ones you are using for the medical app?