In order to get your desired data you need to use the Call Rest activity in your microflow and set it to GET operation. Use this in combination with your read API key from ThingSpeak.
To control your sensor use the Call Rest activity and set it top POST. Use this one in combination with your write API key from ThingSpeak.
Your documentation link is for publishing a rest service. This is not your usecase as you are consuming a rest service.
Hi Sjors Schultz,
Thank you for your very fast response. I will try to attempt now.
Hi. I managed to get the receiving of data from Thingspeak to Mendix thanks to your advice and https://academy.mendix.com/link/path/44/Importing-and-Exporting-Your-Data but I still have troubles sending data from Mendix to Thingspeak. My end goal for this part is that whenever a switch is pressed, a value of “1” or “0” will be sent to thingspeak.
May I know if the steps for sending data from Mendix to Thingspeak the same as receiving data? ( Like creating an import mapping from WRITE api in thingspeak and creating a JSON). What I have tried was to first create a JSON and an addition thing called “ Export Mapping”. I created this Export mapping because according to this link, it says that it is used to convert Mendix objects into XML or JSON format. https://docs.mendix.com/refguide/mapping-documents
Here is my entities. Send_Data entity is the only entity I have created so far solely to send data from Mendix to Thingspeak. I associated it with System:User because I want it so that whenever a user logs in, it will show up to every account.
Here is my microflows: ( I am showing the URL link as well as I am not that sure that it is the correct format to type in)
I feel that I am on the wrong track and I really need some professional help. I have no knowledge of programming as well as IOT-related stuff so I am learning a lot of stuff all at once which results in getting myself confused even more. I would really be grateful if there is an example that I could refer to. I am really sorry for asking a lengthy question.