Best answer

Zapier Newbie Needs Help Connecting WordPress to Instagram Business

  • 7 December 2023
  • 12 replies
  • 84 views

Badge +1

I really need help trying to find actual examples of setting up a post to instagram business.  I’m new to all this and not that techy and everything I can find just sends me to documentation which I don’t understand.  Ultimately I am setting up a zap between wordpress and instagram so that when a post is published in Wordpress it then posts to my instagram account as well.  I have the wordpress and instagram connections setup and they tested successfully, but when I go to select an event it keeps asking me to ‘Create a custom action Beta’.  I have 0 idea what this means and would very much appreciate actual real examples of how someone set that up for me to follow, not documentation and instructions!  

thank you! 

icon

Best answer by steve_AWN 13 December 2023, 08:51

View original

12 replies

Userlevel 7
Badge +14

Hi @steve_AWN 

Good question.

For us to have true context, please post detailed screenshots with how your Zap steps are configured in the EDIT mode and which issue/error you are experiencing.

Badge +1

I’ve progressed a little bit, but can’t get past the code-414 in the screen print attached.  Its a get to wordpress post - I don’t see how the url is too large… 

I’ve followed the two website articles here:

 

https://goldpenguin.org/blog/get-featured-image-from-wordpress-when-using-zapier/#:~:text=In%20the%20URL%20field%2C%20select,but%20may%20contain%20extra%20parameters.

 

 

 

Userlevel 7
Badge +14

@steve_AWN 

Can you post screenshots with how the link is output from step 1?

 

 

Badge +1

Is this what you mean?

 

Userlevel 7
Badge +14

@steve_AWN 

Yes, but it would need to be a screenshot that shows this data point.

 

Badge +1

Hi @Troy Tessalone 

I’m not totally sure what you mean, but maybe one of these two screenshots help?

 

 

Userlevel 7
Badge +14

@steve_AWN 

Here’s the link you are trying to use: https://applewatchnews.com/wp-json/wp/v2/media/2148

It returns JSON.

I got an error too when using the Webhook Zap app to make a GET request.

 

Instead, try using a Zap Code step: https://zapier.com/apps/code/help

You can ask ChatGPT for help with the Code.

Badge +1

Thanks, @Troy Tessalone 

Is there anywhere that can assist me with what I’m actually asking Chat GPT to do?   As I’m not techy, I'm guessing it would be something like “create some javascript code which extracts JSON wp:attachment href to an image url” … that doesn’t make sense to me though.

Regards,

Steve

Userlevel 7
Badge +14

@steve_AWN 

Yes, give that prompt a try.

Badge +1

Hi @Troy Tessalone 

I was able to get something out of chatGPT but unfortunately it was unsuccessful and getting the required information as the code needs to be tweaked and I don’t have the background to do that.   

I then tried a different approach which was to create a custom field against each post using WP Code which works (see below) but then I've not been able to figure out why or how that field (or other custom fields against a post) are selected from the Wordpress trigger information.  Is there some way to get this information in the list of post contents drop down?  I tried refreshing feed, but that does’t work (note the intention was to figure out if I could then use that as the input into the Instagram feed trigger instead of the option above).

add_action('publish_post', 'add_custom_field_automatically');

function add_custom_field_automatically($post_ID) {
// Check if the post has a thumbnail
if (has_post_thumbnail($post_ID)) {
// Get the thumbnail URL
$thumbnail_url = get_the_post_thumbnail_url($post_ID);

// Add the custom field only if the post is not a revision
if (!wp_is_post_revision($post_ID)) {
add_post_meta($post_ID, 'featured-image-thumbnail-url', $thumbnail_url, true);
}
}
}

 

 

Userlevel 7
Badge +14

@steve_AWN 

If you need help with the Code step approach, then consider hiring a Certified Zapier Expert: https://zapier.com/experts

Badge +1

I ended up using this code which has been working.  I’m sure there is another field which is better to use, but at the moment this is successful. 

 

 

Reply