Reddit Widget

Update your widgets using integration services.

Use Zapier to update a widget when there's a new hot post on a subreddit.

Step 1: Create the Reddit Widget and its Content

Create your Reddit Content by importing the provided JSON. Learn more about how to do this on our support page.

Then, create a new Reddit Widget and set its default content to your new Reddit Content.

Step 2: Create a zap

Go to Zapier and add a new zap.

Select Reddit as the trigger and choose the triggering event.

This example uses the New Hot Post in Subreddit event with space as the subreddit. Feel free to choose whichever one you like.

Step 3: Choose the Update Widget action

Moving along on the creation of your zap, you now need to choose an action. Choose Pushcut as the app and Update Widget (with JSON configuration) as the Action Event.

The first time you will be prompted to link your account. Follow the instructions and scan the QR code with the Pushcut app (Account > Scan Code).

Select the Reddit Widget you created before from the drop-down and pass the following JSON object as the parameter. Notice that there are a couple of markers between curly braces on the code: these are the representation of the reddit post data provided by Zapier, such as title, number of upvotes, downvotes and comments. You can insert those by using the Insert data… drop-down provided by Zapier. For more information regarding Pushcut's JSON API, check our support page.

{
  "content": "Reddit Content", 
  "inputs": {
    "input0" : "", 
    "input1" : "", 
    "input2" : "", 
    "input3" : ""
  }
}

Step 4: Finish the zap and you're done!

Click Test & Continue and verify that your widget updates correctly. Keep in mind that, because of how iOS controls widget updates, it may take a while (up to 15 minutes) before the widget is actually updated.

When all is set up to your liking, do not forget to toggle the On switch to activate your zap.

Once the zap is activated, all you need to do is add a Pushcut Widget to your home screen and configure it to display the Reddit Widget you created, by long pressing on it and choosing Edit Widget.

If you'd like, you can also make it open the subreddit when you tap it, by choosing Open URL on the On Tap field and then setting the subreddit URL.

Widget JSON

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
{
  "type": "column",
  "properties": {
    "background": {
      "type": "gradient",
      "value": {
        "colors": [
          "rgba(97.26%, 42.59%, 77.95%, 1.00)",
          "rgba(7.62%, 13.89%, 36.68%, 1.00)"
        ],
        "startPoint": {
          "x": 0.7107142857142857,
          "y": 0
        },
        "type": "linear",
        "endPoint": {
          "x": 0.35,
          "y": 1
        }
      }
    },
    "horizontalAlignment": "leading",
    "padding": {
      "trailing": 20,
      "top": 20,
      "leading": 20,
      "bottom": 20
    },
    "spacing": 8
  },
  "children": [
    {
      "type": "text",
      "value": "🚀 /r/space",
      "properties": {
        "font": {
          "weight": "bold"
        }
      }
    },
    {
      "type": "spacer",
      "value": "horizontal"
    },
    {
      "type": "row",
      "properties": {
        "verticalAlignment": "top",
        "fillDirection": "none"
      },
      "children": [
        {
          "type": "text",
          "value": "[[input0]]"
        },
        {
          "type": "spacer",
          "value": "vertical"
        }
      ]
    },
    {
      "type": "column",
      "properties": {
        "fillDirection": "width",
        "horizontalAlignment": "trailing"
      },
      "children": [
        {
          "type": "row",
          "properties": {
            "font": {
              "size": 12
            },
            "foregroundColor": "rgba(100.00%, 100.00%, 100.00%, 0.70)",
            "fillDirection": "none"
          },
          "children": [
            {
              "type": "symbol",
              "value": "arrow.up.square"
            },
            {
              "type": "text",
              "value": "[[input1]]"
            },
            {
              "type": "symbol",
              "value": "arrow.down.square",
              "properties": {
                "padding": {
                  "leading": 10
                }
              }
            },
            {
              "type": "text",
              "value": "[[input2]]"
            },
            {
              "type": "symbol",
              "value": "message",
              "properties": {
                "padding": {
                  "leading": 10
                }
              }
            },
            {
              "type": "text",
              "value": "[[input3]]"
            }
          ]
        },
        {
          "type": "spacer",
          "value": "horizontal"
        }
      ]
    }
  ]
}
Check the Widget documentation for more details.