Best answer

Pocket integration & tags

  • 10 March 2020
  • 3 replies
  • 174 views

Userlevel 3

Hey all-


I have an old IFTTT applet set up that integrates Pocket and Airtable, and I'd like to migrate it to Zapier. Ideally it would use built-in functions, but I'm fine with solutions that include Python Requests as well.


I need the Zap to do the following things:

  • Trigger when there's a new favorited item in my Pocket account
  • Extract all of the tags (if applicable) from that favorited item
  • Add a new record to Airtable with the item's Title as primary field in a Links table
  • For each of the item's tags, search the Tags table. If the tag exists, link the Link record to the Tag record. If the tag doesn't exist, create a new record and link it

The issue I have is that Pocket returns tags in a format that Zapier isn't really able to process:

Screen Shot 2020-03-10 at 11.14.22.pngBecause each tag has a different key, and because I can't select the whole Tags object and use it in a Python step, I'm not able to use this Zap on real data - it'll fail whenever it sees a tag that wasn't used when the Zap was set up.


I thought that I could add a Python step and pass the whole Tags object in as an input, but that's not an option.


Anyone know of a workaround to this?



icon

Best answer by Danvers 11 March 2020, 12:05

View original

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

3 replies

Userlevel 7
Badge +12

Hi @pencerw and welcome to the Community! I know that the tags data from Pocket isn't very helpful right now and we do have a feature request open to add them all to one field. I've added you as another vote for this addition. I don't have an ETA of when or if this will happen, but we will definitely email you if it does become a reality. 

In terms of a workaround a very low-tech one is to save something and add every tag that you can think of. Then In the Pocket trigger, go to the Find data section and ask the Zap to look for more samples. That should find your mega-tag item. Select that as the sample to use and continue.

In the action, you can add each tag into the relevant field. Then, whichever tags are used, they will be passed by the Zap.

Of course, this is by no means perfect as it wont work for any new tags that you add after building the Zap.

To hopefully help you find a neater solution, I'm going to move this post to the Developer Discussion to see if anyone has any ideas about how you might do this with a webhook or something similar.



Userlevel 3

@Danvers that's a clever solution, but impractical. My use case depends on using arbitrary tags.


Is there some reason why I can't select the entire Tags object in a Python code step?


Userlevel 7
Badge +12

I’m sorry for the delay in getting back to you on this one. The short answer is that the entire Tags object isn’t given in the trigger data, I’m sorry about that. I think that the only way to do this would be to create a custom integration using the Developer Platform. 

 

I know that’s not a great answer, sorry about that!