Press J to jump to the feed. Press question mark to learn the rest of the keyboard shortcuts
0

HTTP upload

0

HTTP upload

How to UPLOAD a FILE via the HTTP REQUEST block to a site?

1 comment
50% Upvoted
Log in or sign up to leave a commentlog insign up
Sort by
level 1
Automate developer2 points · 17 days ago

Depends on the site, but you'll likely need to create a multipart/form-data request body, see: https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/POST

An example...

  • Content type= "multipart/form-data;boundary=boundary"

  • Content body= [ "--boundary\r\nContent-Disposition: form-data;name="field1"\r\n\r\nvalue1\r\n--boundary\r\nContent-Disposition: form-data;name=\"field2\";filename=\"example.txt\"\r\n\r\n", "\r\n--boundary--\r\n" ]

  • Content path: example.txt

More posts from the AutomateUser community
7

This app is quite unintuitive which is okay but because it has the worst name ever i couldn't find tutorials online. Can anyone link me some basic tutorials for beginners on this app?

7
3 comments
5

Hi,

What would be the best method to store data that can continuosly be updated by automate?

Where should the data be stored? How would you update it?

I want to store SMS data somewhere and then update it.

If anyone has experience in this, any pointers would be greatly appreciated.

Thanks

5
5 comments
3

I'm using a block that gets the number in a file, then divides it by 210, but it results in a long number. I'm looking for a way to display only the first 4 characters of the result. Does anyone know a way to do this?

3
1 comment
3
3
1 comment
2

I created a fiber to automate setting ringer or vibrating depending on the day and time during my workdays and for the weekend. I had a separate one for vacation. Now I'm trying to combine them.

So on flow start I ask vacation or working, on vacation I use a date picker to ask for the first working day after the vacation. The selection is stored in a variable from which I derive variables for day, month, year by using setVariable blocks and dateParts function like this: 'dateParts(myDate)[0]'.

Now I have a TimeWindow block where day, month, year variable get used to check if current date is the same as in the variables. If so it would jump out of the vacation loop into the working loop. The problem is the month variable. dateParts sets the month as number from 0-11. The month field in the TimeWindow block uses some kind of Hex pattern which I do not understand (Jan=0x1, Feb=0x2, Mar=0x4, Apr=0x8, Mai=0x10, Jun=0x20, Jul=0x40, Aug=0x80, Sep=0x100, Oct=0x200, Nov=0x400, Dec=0x800).

How do I get from 0-11 to this pattern? Or is there another way to get this?

2
2 comments
2

Would it be possible for the min() function to accept an array as the only parameter, and return the smallest value in that array? And for the max() function to work similarly?

Edit: It might be good if the function returned an array of the indexes corresponding to the smallest (or largest) value(s). There are valid use cases for both returns. Maybe a flag in the function? Or even a whole new function?

2
6 comments
2

Hi, I'm new to this app so I'm having difficulties. I want to create a multiple choice thing that, depending on your choice, will change the thing it does. So like, press Guy1 and it says "Hi, Guy1!" And if tou press Guy2 it says "Hi, Guy2!" And so on. Please help me!

2
2 comments
2

On my unlocked Galaxy S10e, when I enable BT from the button in the notification shade, I get this dialog box: https://i.imgur.com/wsNiIcc.png
It's handy because when [BT device] connects, it shows how much battery the device has remaining.

I could tinker with some of the BT battery flows posted to the community, but I'd prefer the dialog box pictured above if possible

2
2 comments
2

I am wanting to detect when the phone is unlocked with the PIN or code. I've tried to mess with the "Device unlocked?" block but not sure how to filter out the biometric unlock from the PIN/code unlock.

Thanks,

J

2
1 comment
2

also, is there a block force the keyboard to be visible ?

thanks

2
3 comments
2

Is it possible to access the developer options?

Specifically, I'd like to be able to access the colour space options to make a toggle switch for monochromacy.

2
1 comment
1

Hey everyone!

I'm trying to make it so that when I receive a number via SMS from a certain phone number, my volume adjusts to that level. The issue is that it stores the number in the SMS as text rather than number, so the volume won't be set to that. Is there any way to convert a text to a value?

Example: SMS receives "100" Tries to set volume to "100" Fails

Versus

SMS receives "100" Variable is converted to 100 Volume set to 100

I'm new here so this may be a stupid question. All help would be appreciated!

1
3 comments
1
  1. Await time 15:30 awake

  2. Timer add 7m30s

  3. Delay 7m35s awake

  4. App start. Package: com.google.android.deskclock. Action: Dismiss timer (Android 9+)

  5. Delay. Proceed: Exact. Duration: 0h 0m 5s

  6. Timer add 7m30s

  7. Delay 7m35s awake

  8. App start. Package: com.google.android.deskclock. Action: Dismiss timer (Android 9+ )

Problem is that it doesn't dismiss the timer, the timer just continues forever until manually dismissed.

any methods to fix?

1
6 comments
1

Has anyone been able to detect phone calls over apps like Facebook Messenger or WhatsApp?? If so how? Tia

1
1 comment
1

I'm trying to automate buying items in a game and the items aren't always in the same position. I'm wondering if I could get the coordinates of where I am currently touching, where I last touched the screen, or maybe use the coordinates of some UI element overlaying the game?

1
3 comments
1

Below is a simple flow I created for configuring Bluetooth and system volume based on connection to my home network.

If the wifi connected block is changed from "when changed" to "immediate", the flow works just fine. The problem I'm running into is that sometimes at random points during the day the phone (Pixel 3a / Android 10) appears to drop and reconnect very quickly. When this happens, the disconnect is acknowledged and the "NO" path gets executed. However, the reconnection doesn't get detected and the "YES" path is never run.

My hunch is that this might have to do with the phone switching between 2.4 and 5GHz. My home network has the same SSID for both frequencies.

Any ideas?

https://i.redd.it/yqy4szfec5151.png
1
10 comments
1

It would be cool to have a drop text on the notification telling which flow is on, currently we can only see the number of flows on, not very useful...

1
3 comments
1

I want to create a flow that sends a message from a database once a day. I don't need a huge database, i cant manage it myself with my notes on my phone (android). How would i go about Automate reading text from a note or whatever is easiest, separating one section and setting it to a variable?

1
17 comments
1

Hiya,

I would like to be able to save URLs from all opened tabs in Chrome. How would you guys do that?

Thanks!

1
10 comments
1

in SMS received block, in input arguments there's option to enter a number (shows number keypad) but what if it's a promotional or transactional sms? in these kind of sms sender is usually a 6 letter word like CITIBNK, ICICIB etc. Please allow to enter text also in input argument.

1
4 comments
Continue browsing in r/AutomateUser
Official subreddit of Automate for Android.
2.3k

Members

10

Online


Created Jan 10, 2019