Invision Community 5: A video walkthrough creating a custom theme and homepage By Matt Thursday at 04:02 PM
700newtons Posted April 9 Posted April 9 Hello , I trying to set up an arrangement so that if someone joins a Club, they automatically follow its content. I have successfully set up the trigger on zapier which recognises when someone joins a club. However, after an afternoon of trying, I can't get POST to create follow the update. I'm trying to use the API post function with core/members/{id}/follows Here are the text boxes on zapier. URL: https://{my_URL_here}/api/core/members/{member_id}/follows/?key={my key here} Payload: json Data followApp core followArea club followId {id number of club here} Wrap Request in array: no File: {left blank} Unflatten: yes Basic Auth: {left blank} Headers: {left blank ?} I have tried all sorts of combinations, but no joy. Any advice? Thanks in advance. Simon
Solution 700newtons Posted April 9 Author Solution Posted April 9 Ah, fixed it by posting with python code in zapier. Probably a weird way to do it but it works... import requests api_url_follow = '{my_URL}/api/core/members/'+input_data['member_id']+'/follows/?key={the_API_key}' todo_follow = { "followApp":"core", "followArea":"club", "followId":int(input_data['club_id']), "followNotify":1, "followAnon":0, "followType":"daily" } response = requests.post(api_url_follow, data = todo_follow)
Jim M Posted April 9 Posted April 9 Seeing if you're passing the same information over the two mediums, it really would like be an issue with the variables which are created and passed. I would just verify the variables being passed in Zapier.
700newtons Posted April 9 Author Posted April 9 Yes - thanks - I just couldn't make it work that way. No idea why.
Recommended Posts