[Tasker Tips & Tricks] MishaalRahman:
If you're the kind who likes to post screenshots of your device (...like, say, you're making a picture guide to help people with Tasker tasks ;)), then you'll probably find it a bit tedious having to manually open your screenshot in an image editor app, edit it, and then manually uploading the edited file to an image hosting service such as Imgur. If you would like to automate some of these steps, then look no further!

Please note that my guide is set up with some particular free apps that I'm using, but it can be generalized to edit in other image editor apps or upload to other hosting services so long as you find out the proper intent. Thankfully, you can use apps such as Intent Intercept to capture the proper intent you'll need. On the other hand, I'm also using a few paid apps to make things a bit easier, but if you're getting into Tasker I highly recommend you purchase them as it will make things significantly easier.

Prerequisites

OPTIONAL: Snackbar Tasker Plugin to implement the prompt. Can be replicated using a Tasker scene, but Snackbar is free so I recommend grabbing it anyways.

AutoNotification or Notification Listener. You will need either in order to intercept notifications and toast messages.

OPTIONAL: AutoShare. You can use regular intent broadcasts from within Tasker to do this, but if you don't know what intent to use then AutoShare can help.

Uploader for Imgur (or any other hosting app with a sharing receiver)

Instructions

Enable the notification listener for AutoNotification or Notification Listener in Settings. Enable the Accessibility service for either app so it can intercept toast notifications.

Open a new profile and name it 'Screenshot Edit.'

Create an Event context and go to Plugin --> AutoNotification/Notification Listener and set it up to listen to the screenshot posted notification. Here's the information you'll need to do so. I recommend you set it to react to Only Created Notifications so it doesn't trigger when the notification is dismissed.

Notification Title: Screenshot captured.
Notification Text: Touch to view your screenshot.
Package Name: com.android.systemui

Exit the configuration for AutoNotification and create a new task named whatever it is you want. For me, I left the name blank because I won't be using the task anywhere else.

Now for the task...

Plugin --> Snackbar Tasker Plugin. For the title, put "Edit Screenshot?" or whatever else you want. For the items, put 'Yes,No.' For the commands, put 'yes,no.' Edit the colors to theme the snackbar however you would like.

Task --> If. Set it to %bs_command ~ yes. This is so you'll only edit/upload the screenshot if you want, otherwise it'll do nothing.

Code --> Run Shell. You'll want to run the following command:

ls /sdcard/Pictures/Screenshots

Write %File under "Store Output In". This will get the filenames of all the screenshots you have in your screenshot folder and put it into a variable.

Variables --> Variable Split. Under name put %File, but leave Splitter blank. This splits the filename variable into an array from File1...FileN with each variable holding an individual filename.

Variables --> Variable Set. Under name put %new and set it to %File(#). This gets the pointer to the latest filename in the filename array.

Variables --> Array Pop. Under Variable put %File, for the Position put %new, and for the To Var put down %file. In %file now you've got the filename of the screenshot you just took!

System --> Send Intent. This is the intent information you'll need to fill in:

Data: file:///storage/emulated/0/Pictures/Screenshots/%file
Package: com.iudesk.android.photo.editor
Class: app.activity.PhotoViewActivity
Target: Activity

If you have AutoShare installed like I recommended, then you can easily use its find intent option to find and automatically fill in most of this information. You will still need to manually specify the file using the %file variable, though.

Task --> End If.

[IMG="Note: I left out task 1, which is the snackbar, from this screenshot to save space."]https://i.imgur.com/CPVLHdM.jpg[/IMG]

Okay, so what we've done so far is set-up Tasker to automatically send the screenshot you took to your image editor app. Now you'll want it to automatically upload it to Imgur. Take note of which folder you're saving your edited screenshots in, because you'll need to reference it below when sending the path to the edited file.

Create a new Profile and name it Screenshot Upload.

Create an Event context, go to Plugin and choose AutoNotification Toast Intercept.

Choose Photo Editor for the app you want to intercept, and for the Notification Text you want to intercept write down "saved successfully."

Back out, and create a task with any name you want.

Code --> Run Shell. For the command, put this down:

ls /sdcard/Pictures/Edited

For Store Output In, put it in %File (just like the previous task).

Variables --> Variable Split. Split %File.

Variables --> Variable Set. Set name as %new and set it to %File(#)

Variables --> Array Pop. For variable put %File, under position put %new, and in the to var put %file.

System --> Send Intent. Here's the information you need:

Package: net.moosen.imgur
Class: net.moosen.imgur.DoUpload
Data: file:///storage/emulated/0/Pictures/Edited/%file

That's it! Enjoy the new automation of screenshot editing. You can go a little further to automate things by perhaps immediately sharing the Imgur link to your app of choice or push it with Pushbullet, but that's up to you. For me, this profile has been an immense help in putting together these guides. Let me know if there are any changes you would make.